Unity3D Webcam Toolkit for Windows

This Plugin gives access to local connected Webcams. The Plugin grabs a single Webcam Image and copies the pixel data in an ordinary Unity3D Texture which can be used by any Unity3D Shader. It’s possible to grab a single image or a whole webcam stream.

A known performance issue appears when using higher cam-resolutions. That’s because the Unity3D function SetPixel() for every pixel of the webcam image is called every frame. If someone has an idea to speed up the transfer between cpu and gpu memory, please let me know.

A free beta version is available on our website: http://produktion.weltenbauer.com on the “entwicklungen.” section.

This project uses the CodeVis VidCap library.

199973--7365--$01_138.jpg

Good work, but does it support sound?

Sound support is not included but could be an option in the future.

Hopefully webcam support will make it sometime into the webplayer. Shame to see Unity3d miss on the AR hype …

This sounds great, but I have installed it on several machines with different cameras, and all I get is a screen with a white box and a blue box with ‘webcam control’ at the top. I’ve seen it work on another machine, so I know what to expect.
The docs are non-existant? Or where are they?
What DLL’s do I need, and where to they go (I put ImageGraber.dll and VidCapDll.dll in the same folder as my exe, no luck).
Thanks

Hi all,
I especially re registered on the forum to ask about the Webcam plugin.

Does it not work on Windows Vista 64?
the moment I try to run the demo it crashes Unity3D rather badly.

My webcam works fine in other programs, so i know its accessible properly.

Any clues?

Thnkas

Thanks for this resource!

Works well with Windows XP 32

Download VidCapture here VidCapture - Browse Files at SourceForge.net

Unzip, install the.exe of VidCapture,

Then, Unrar WebCamToolkit_v01_beta, and from the folder /UnityWebcamToolkit/Assets/Plugins/ copy the file ImageGraber.dll into WINDOWS/System32

launch Unity on the demo, that’s work fine !

But… Any idea how to start for networking use? I’m using Unity with SmartFoxServer…

Thanks again!

Christian,

This is great stuff !

Hopefully, Unity’s texture writing/pixel-setting will be extended soon so that we can experience your plugin with optimal framerates.

Have you looked into blitting (then possibly rendering to texture if the texture needs to be mapped)?
Could it be a possible workaround in the meantime?

Hi, I have been trying to get both the Unity AR - tool kit as well as just the webcam Toolkit to run. But All I get is a blank white box, and a “error connecting to device” while running on the editor.

I have looked into http://forum.unity3d.com/viewtopic.php?t=32669 as well. Tried copying the ddls and running in editor as standalone - nothing has worked!

Can someone please throw some light on what else I am missing? I got Unity Pro2.6 trial, and using Microsoft LifeCam

Just added Mac support for UnityAR. The XCode project is in the project root folder.
Now it only use ARToolKit, No CodeVis VidCap dependence.
Some functions removed because they don’t support by ARToolKit.
If you find image is flipped due to some reason, I added the flip implementation to the demo for easy of use.

There are some dirty macros to make it built on both VS and Xcode. I have no idea how to clean them up sorry.:cry:

edit: I re-uploaded the file. I have no idea why everytime I attach it to here, it will show uploading empty file error.
If this link is not work, I may upload it to other free space.

Source + demo:
http://rapidshare.com/files/406910210/UnityAR_v01_beta_Mac.zip.html

Mirror:

http://cid-b09cde3cb849642d.office.live.com/self.aspx/Public/UnityAR^_v01^_beta^_Mac.zip

Very Nice! But the OSX-version download does not seem to work.
Could you upload it again?

Thanks!
kaaJ

I opened it up and when I press play it crashes. What do I do?

Is there no way you can use setPixels instead of setPixel?

you can but the difference is not really impacting.

setpixel isn’t the bottleneck, Apply is, cause the whole texture must be reuploaded to the gpu every frame.

That wasn’t my experience, setPixels is way quicker than looping through every pixel and using setPixel. Sure there is probably a much bigger bottle neck with Apply but if you are looking for every bit of performance increase.
Of course if you still have to loop through every pixel to build the array that setPixels uses then I can see there won’t be much benefit.

The Mac link is invalid. (both of them) after download, decompression fails.

Why leave this to be another piece of digital junk in the wasteland that is the net? Why not fix it by re-uploading or provding a valid link?

This is a shame.

The guy wrote the code and made it available to everybody. He could just keep it to himself and most probably has his own schedules and work to do besides sharing his code for free. If you think it´s a shame, don´t bother going there to download it and write your own code.

I’m very much excited about this camera toolkit and possibilities in Unity thanks for the toolkit. I’m using windows Vista 64 and unity3d 2.6 pro trial. Every time i play the example project unity crashes. But whenever i build run the project everything looks fine and it works. does anyone know what could be the problem?
thanks

HI,Christian .first,thanks for your UnityAR_v01_beta.Can I ask you a question?about UnityAR_v01_beta. i’m having a problem with “getDetectedTranslationRotation” when i took out the marker, the object stays in the plane, and don’t go to the standard position. How dofix that?

hi,
just a quick one.
Cant find the exe, when I unpack the VidCap.rar
Any guides?
Im on Win7