Project: MOBZ

For the past year (2011) I’ve been working at Movares on a simulator for the training of bridge & lock operators. Operators of what??? the people that control locks/sluices for boats and plus some bridges.
More info about MOBZ can be found here and here
I now know a lot about them. I built the interface and logic behind the simulator all of it was done in the Unity Engine. Check out this video to see what is all about (sorry the voice is in dutch can’t help you there).

Unity Video Remake: Webcam Textures

A while back I posted something about video capture in Unity with a sad plea for beta access to version 3.5 which is now finally in public beta, so I decided to do a new post.

Setting up a Webcam Texture in Unity

Now as you may have seen in the Script Reference (the only place to actually find something about a WebcamTexture) there is no Object like a RenderTexture for a WebCamTexture which makes it a tad more harder to work with (read: not as easy to drag and drop in to materials).

Quickest way to get this working is to drop the following script on an object.

Checkout this script in action Webcam Example

Keep in mind that this in not the best way for multiple objects unless they all have the same material with the script on one object.
You can only have one WebCamTexture per webcam!

By the way.. Once 3.5 goes fully public I’ll put up a working example to give you a starting point, and so you can see yourself (if you have a camera connected of course) so keep an eye on my site 😉

If you’d like more help or a better example please donate any amount you wish and i’ll get to it..

Once you’ve got the camera running it’s possible to do all kinds of things.. I Look forward to the future of Webcams in Unity all over the internets. 😉

Issues: Cannot use web cam, since the user has not authorized this!

In your attempt at getting the webcam running you may have come across the following error: (I did at least)

Cannot use web cam, since the user has not authorized this!

You can squash this little one by changing your build platform to Standalone Mac/PC. Go to Build Settings -> Select “PC and Mac Standalone” then click that little button at the bottom left “Switch Platform”, this, I think is something new.

The whole reason for this is because you probably have the Web player platform setup by default. This requires the user to first give permission to use their webcam because of privacy reasons. If you want to do this then you need to request the users permission by using the following piece of code:

IEnumerator Start()
yield return Application.RequestUserAuthorization(UserAuthorization.WebCam);
if(Application.HasUserAuthorization(UserAuthorization.WebCam)) Debug.Log("Authorized");

Same goes for UserAuthorization.Microphone. When you use a standalone platform the authorization is no longer needed.

Issues: The type or namespace name `WebCamTexture’ could not be found.

Thanks to solehome for commenting on this one. The public beta 3.5 seems to have an error when using WebCamTextures in Flash builds.
If you choose to build on a flash platform the following errors occurs:

error CS0246: The type or namespace name `WebCamTexture’ could not be found.

Are you missing a using directive or an assembly reference?

Error building Player because scripts had compiler errors
Solution to this problem… euhm dont build flash?


Unity Video Capture

There once was a Unity Engine roadmap without any means of capturing video or audio, conclusion: If you wanna do it right do it yourself or hope unity implements it themselves.. w00t v3.5 🙂 well anyway before 3.5 my little plugin named Video Grabber was born…

Built on the basis of OpenFrameworks (being one of the frameworks to handle video for windows & mac at the same time) and also allowing for alot more fun.
I successfully built this library as a plugin into Unity. In doing this I can now capture pixels from the camera and transfer them to a texture in a scene. I even added in some face recognition to the whole shebang…
It works quite well with a slight delay of a few milliseconds, but who really cares about that. BTW oF is doing some really cool stuff 🙂

So what happens when you’ve almost finished a functioning Video Grabber (except for a couple of problems when stopping the plugin) you find out that Unity is going to implement it themselves.. of course.. Unity wouldn’t be Unity if they didn’t.. you need video we’ll put it right in there, how about some audio as well then.. whut? you want AI pathfinding… sure no problem. While we’re at it we’ll mix in a little UI update and some extra goodies… What can we expect in version 4.0? A “Generate AAA Game Concept” buttonâ„¢ all ready and waiting?

One thing’s for sure.. I’ve temporarily stopped working on my Video plugin with high expectations of Unity 3.5 coming.. 🙂
[insert plea to beta group owner for a membership here with a cherry on top]

If your interested in looking at what I’ve currently got for video grabbing add a comment below make sure to add your email address in the proper field (which will stay private) i’ll add you to the private repo and we maybe could start an open source project for the community. 🙂


Updated Site Theme

Ok first of all, it was definitely needed wasn’t it.. the old Twenty Ten template has been and gone… plus it dont look that swiffy anymore..

So yes i’ve updated the theme and I think it’s a definite improvement! Saves me a huge hassle making one and this one is customizable enough for me… and i’ve always said “I’ll update my site sometime soon” with slight “Yeah Right” feeling.. Anyway it is done..

I still need to figure out what im going to do with some content areas.. I may also just disable them as they don’t really add very much to the whole shebang just yet… other solution is to start brainstorming a bunch and come up with some really superb content.. but theres that “Yeah Right” again…

So for now I hope you like this new layout if not let me know.. I’m bursting to make your life easier 😉 YEAH RIGHT!


Video Animations

As I’m a fanatic video and audio person I like to experiment with various applications and tools. I like to endeavour into unknown territory, learn a bit and move on to new horizons ever expanding and not always getting extremely deep into one thing. Below are a few animations I once made. I may add to some of these with what I now know sometime in the near future. First I want to capture some interesting video fragments to add stuff to.


Continue reading “Video Animations”

Gameplay: Starcraft II Wings of Liberty

Just finished the Wings Of Liberty campaign this weekend. Good story and I like the gameplay around it. It be cool to know a bit more behind the scenes and how on earth they created such a game, in terms of game logic and mechanics behind it. It must be one huge amount of variables and such from a programmers point of view. I do like the “Thanks To” part in the credits.. “Your Mother” 😛 some smart aleck put that in there. It’s really the only part I took the time to read, because it seems to genuinely come from the developers.
Anyway, I enjoyed playing it thats for sure.. So now I’ve also played a bit against the A.I. on “Medium”, I’m missing a Normal level.. Medium seems to be just a little bit on the easy side. Next game I’ll go for Hard, hoping I can still win.
Your thinking I could also just play online against someone.. well yes thats true I could get my ass whooped by some guy that only plays online all day and end up losing and getting all depressed about it… I like my #winning 🙂 Currently my strategy against A.I. is to teister it a bit and then come a long with a huge amount of a few types and just waste the **** out of them, most of the time it works too. It sure helps blocking the way in the beginning, otherwise I do lose.

By the way the visuals in some cutscenes are just amazing I’m stunned by the way they did the rain flowing over the metal. That is some really nice work! (even though it is the Havok engine and i’m all into Unity at the moment) I’m guessing thats a custom made shader of somekind, well it cant be default Havok stuff right?

Photography Assignment

Once upon a time a few years back, I did a 10 week photography minor at Uni, These pictures were part of an assignment, they are a few of the best images I took during that course. Including the photos I took with a Pinhole camera.. I do miss doing that.. it was fun and gave unexpected results.. and it was real photography at the core 🙂

I mostly enjoyed spending time actually going out and standing in one place for 10 to 15 minutes to get enough exposure, plus it was a major kick to see the actual result after developing the photo, also sometimes a major dissappointment… I remember standing outside in the cold for around 20 minutes with my paint can duct-taped to a streetlight.. only to find out when developing that i had nothing but extremely dark patches…. so be warned 😉 Continue reading “Photography Assignment”

Unity GLSL Shaders

Hello Again,

In an earlier post of mine about WebGL I describe a few methods to enable WebGL on a Mac (Safari) the reason I did this was to view a few interesting shaders.. (is now Now comes the cool part..
I actually got those same GLSL shaders I wanted to view running in Unity (yes for me that is a big thing).. Check out a few of these screenshots I took… It wont be long now and I may even integrate them into Image Effects on Cameras.. Continue reading “Unity GLSL Shaders”