Friday, February 28, 2014

Getting my feet wet with Blender

Whenever I watch movies, I am always on the lookout for parts where CGI is used.  I used to be good at catching those part but these days, you just don't know what's real or not anymore. Most of the time, I enjoy watching the visual effects (or VFX) breakdown more than the actual film because I know what it takes for them to be believable. Every small detail has to fit well in the scene or it will give away the illusion.

The most serious VFX not only take a lot of computing power but the tools they use are very expensive.  Something which are not available to the average Joe.  The best tool around for VFX is arguably Adobe After Effects but I just can't afford it.  Luckily, there is an open source alternative - Blender.

I know they are not exactly comparable.  Blender is mainly for 3D modeling but it also has a video and node editor which can do things that After Effects can (like compositing, keying, camera solving).  I just need to learn how to use it.  As for the animation part, you will need a modern PC with a beefy GPU.  I am currently stuck with an old PC and not lucky to have a graphics card that can help speed up rendering so it takes a loooong time to render animations using blender's cycles rendering engine.  But hey, beggars can't be choosers, right?

Since blender is a big and complex tool, I don't think I will be good enough to use it without the help of guides and tutorials, anytime soon.  So just to get the hang of it, I tried to do something simple but challenging.  Something that involves camera tracking and animation. 

To get some raw footages, I shot a video of my son pretending to be fighting with someone.  It was hard getting him to act continuously but after a few tries, I had my raw material. The letters scattered around are markers to help track the camera.

Turns out, tracking the camera movement was the easiest part.  The next thing was model a 3D character to animate. This is where I got stuck. I was starting to think that I might have bitten off more than I could chew.  Modeling a character is something I would do if I really have to, but something I would avoid if possible since it takes a lot of time to do.  This time, it was blendswap that saved me.  Put simply, blendswap is a library of 3D models shared by artists.  Some of the models can be used for your projects for free.

For my video, I was going for a Real Steel type of thing so I used a model called Nomad by Mennoknight. The model is completely rigged so it made it a little easier to put into my scene.
Animating this model took me around 7 nights just to get the movement right. What's difficult is that you have to make the character move in a way that matches the movement of the actor in the raw footage. Planning and choreographing those movements take a lot of time.
Once i got the animation right, the next step was to get the lighting right.  The direction of light and the shadow should match to sell the effect. Since the raw footage was taken in a room with only one light, it wasn't hard to get it right. After approximating where the light should be, adjusting the intensity, and adding the shadow, it was time to render the clip.  This is when you have to summon all of your patience. Or maybe not if you have a powerful PC and GPU. No wonder why it takes years for animated films to be made. Just for a 10-second clip like this, it took overnight for my core2duo processor to render all the frames.  If that's what it takes, then fine.

The next morning, I watched the result. It was good but not great. The movement was fluid, the hits are natural, everything looked good and yet, something seemed out of order. There was just no impact. And you know why? You guessed it - there was no sound!  Just when I thought I was done. Where do I turn to? Another open source software of course! I used Audacity to edit the robot sounds and plugged it back to blender video editor. This time, I had to match them with the movement of the robot and the punches. Another time consuming task but the result is very rewarding. You can see it for yourself here in case your browser does not play the video below.

I'll try to make a VFX breakdown video and post it.

Update:
You can check out the mini VFX breakdown here.  Enjoy!


No comments:

Post a Comment