The AVPro Live Camera plugin for Unity allows you to capture video camera devices (such as webcams) directly into Unity. Unity already has WebCamTexture but it has poor performance on Windows and doesn’t support many high-end cameras and capture cards.
We developed this plugin for some interactive installations that required high-end capture card support and have since used it on many projects with webcams.
We hope this plugin is useful to other people. Please let us know your comments/suggestions.
The demo has just been updated to allow multiple cameras to stream at once. We also fixed 2 quality bugs with DeckLink capture cards.
There’s already been quite a bit of interest so far, but no action on this forum yet Anyone have any opinion to offer? Much call for DeckLink / advanced camera support?
Hi Andrew,
Looks pretty cool. Couple of questions for you:
Does the type of camera matter much in terms of video quality?
Have you tested this much with Ultra HD video?
Also, is it possible to stack the capture cards on one system?
Have you toyed around with running this on multiple PC’s?
Genlock capability with more than 1 feed?
We don’t have a specific need for this now, but could see using it in a large environment in pretty cool ways. Nice work! thanks,
d
Hi droderick, thanks for your interest in the plugin To answer your questions:
Yes, the type of camera usually matters when it comes to quality Lower end digital cameras often perform unwanted filters and chroma-subsampling which are best avoided. I also think it’s best to get a truely progressive camera as interlacing can be a real pain. Our plugin does support deinterlacing though
We haven’t tested it on UHD as we don’t have access to such equipment but if you’d like to supply it we can have a look The code currently is limited to a frame buffer of 4K however we have only tested it to up hardware that does 1080p.
I’m not sure what you mean by ‘stack’ capture cards. Certainly it supports multiple capture cards.
Currently it doesn’t support gen-locking but this is something we are thinking of adding in the future.
The asset has just been released on the Asset Store!
We’ve also updated the downloadable demo which now includes the 3 demo scenes that ship with the asset:
Default Camera Demo
This is the most basic demo as it requires no scripting at all. The demo simply draws the default
camera to the screen and is built from drag 'n drop components.
Camera Explorer Demo
This demo doesn’t use any of the drag ‘n drop components (except the required
AVProLiveCameraManager component) and demonstrates how easily the a demo can be written
using a few lines of scripting. The demo is created by a single 120 line script file, most of which is
GUI related.
Material Mapping Demo
This demo shows how to integrate AVProLiveCamera into your 3D scene. No scripting is required and
you can just use either of the 2 included components to map live camera images to your meshes or materials.
For more information, documentation and to download the demo just visit the web site.
Hi all, I wanted to let everyone know about an exciting new feature we have planned for an upcoming release of AVPro Live Camera: Overlays.
Overlays allow us to display videos in Unity really FAST and using very little CPU. It works by leveraging the graphics API (DirectX and OpenGL) directly and completely bypassing Unitys texture system. Currently our plugin plays camera strems to Unity textures and it works really well, however there is some extra overhead when using DirectX as we can’t update the textures directly like we can in OpenGL.
The current method of camera streams to Unity textures will remain however we will offer the new Overlay mode as an extra option for those that need faster video playback using DirectX.
The overlays are 2D rectangles that are drawn on top of the final scene. They can be positioned, alpha blended and have their depth set.
If you have any comments or questions about this upcoming feature let us know!
We just bought it at Interativa and it works really good, we are really satisfied by the results.
One question, AndrewRH:
Do you know any good way to make the video in FULL HD to run with better FPS?
Currently it is running under ~15 FPS, using a Core i7 with 8GB Win7 64Bits, with a good 1 GB graphic card.
With HD resolution it is really good.
You should also verify the incoming framerate from the webcam(s). Not all webcams can actually capture at 30 fps in 1080p - as you increase the resolution, the framerate in general decreases. Many webcams only do 15 fps in 1080p so it might be worth checking that first. Also check the exposure settings - in anything else other than a bright environment, many webcams automatically increase exposure time which can make the video look jerky instead of smooth.
You can use a utility like VirtualDub to play around with camera settings.
All versions work with DirectX and OpenGL, however it works fastest in OpenGL mode. We plan to add a fast ‘overlay’ mode that’ll also run fast in DirectX but only for 2D overlay rendering. We may wait to see whether Unity 4.0 supports DirectX texture access, in which case we’ll skip the ‘overlay’ mode implimentation.
Also a lot of those ‘full hd’ cameras only support 1080p using strange pixel formats that aren’t commonly supported. If you’re still having trouble drop us an email (contact@renderheads.com) and we’ll try to figure out which pixel format the webcam is using and add support to it for you.
We are trying now to use it with the Blackmagic Decklink. Looks like it reads from driver (because it is showing in Unity GUI test).
Also drivers are well installed. Do I have to do anything more to make it running? Right now is not running, but because we cannot make the input video to work (we will try with HDMI soon).
It should work just fine as we’ve used it with several BlackMagic devices. One thing we found was that it can be tricky working out exactly which mode to set it to. There’s no automatic mode selection, instead you have to make sure the mode you set your DeckLink to is the exact mode of the camera you plug in to it. Have a fiddle and let us know how you get on.