Hi, I’d like to know if I can display what appears in my webcam as a media texture in Unity3D
Sorry, but I couldn’t find the search feature in this forum.
Thank you,
Unity3D rules!
Hi, I’d like to know if I can display what appears in my webcam as a media texture in Unity3D
Sorry, but I couldn’t find the search feature in this forum.
Thank you,
Unity3D rules!
First off, welcome to the forums! ![]()
Unity by default cannot display web cam images at all, as we don’t offer access to the camera. With that in mind there are creative ways to make things work, like the HTML Texture Plugin and whatnot. But regardless, it will take some extra work on your part and likely require a plugin and those aren’t supported in the web player (you’d be limited to desktop content).
Thank you for your reply.
So, I’d be better off developing a plugin for that, right?
Are plugins supported by the indie version?
Would some tcp/udp connection be good for transmitting images locally? Do you know if it would be too slow?
Maybe could I try some render to texture approach
It seems I’ll have to dive into C# plugin programming ![]()
Thank you a lot for your help!
A plugin seems like a good way to go, yes.
Nope, you need Unity Pro in order to use plugins. And again, plugins are not supported in the web player, they can only be used in stand-alone content.
I don’t know for sure, experiment? ![]()
Post up if you work out a good solution as I’m sure you’re not going to be the last person to want something along these lines. Rock on!
Higgy I do believe that C# plugins are supported by a webplayer build. I’ve used ones such as the perlin noise generator plugin before. Whether or not they’re supported by Unity indie, I’m not sure as I have Pro.
As far as the OP’s query, iirc someone created a plugin last year that interfaced with Apple’s old external camera and used it to place real-time video on blocks or some such. Unfortunately I can’t seem to find that thread again.
Once you realize you not only need to interface with say Apple’s built in laptop camera, but also the bazzilion combinations of winblows cameras, your task will be much more difficult.
Those are not “plugins”, they are C# libraries (and they are web player capable), not the same thing as they nowhere near the same capabilities.
Big thanks!
I’ll dive down into some documentation instead of making you waste your times.
I’ll post back when I get some results.
Quietus idea also seems fine. We can use some good library to grab fast information from webcam and only send the results to Unity3D through sockets.
Kind regards,
Daniel
Hi,
I can write a webcam server (in C++) and provide a socket interface - ie. serve image data over a socket.
But I’m new to Unity3D and can’t find info on handling the unity side of a socket connection.
Anyone want to collaborate?
Carl
I don’t know if you’ve posted there or not but we have a section for Collaboration in specific. ![]()
thanks HiggyB - I’ll try that
cheers
Carl