Tuesday, August 5, 2014

Creating Stereo Renders in Blender

Recently I've been playing around with my Google Cardboard Viewer, and one of the things that I wanted more of was 3d content that could be viewed through cardboard. I eventually fired up blender and looked around for some resources on making stereoscopic 3d images. The first thing I found was Sebastian Schneider's plugin that automates the creation of a number of stereo cameras. The plugin didn't work great in the latest version of blender (2.71 while I was working on this) but does get most of the flow done.

I started with an animated cube, coming from behind the zero-parallax plane towards the cameras, and then retreating back behind it. In order to be able to render two cameras at once in blenders node compositor, you have to duplicate the scene, and then set default cameras for each scene. So after setting up the cameras, I duplicated the scene (Something I learned later that Sebastian's plugin does... although it complains while doing it). I then set up some nodes to render, lens distort, scale, transform, and mix the two scenes. Here's a shot of the node graph:

Unfortunately the effect wasn't great. Perhaps because there wasn't anything to compare distance against.

I then decided that maybe some more complex geometry would help. So I went and grabbed Andy Goralczyk's Creature Factory 2 turntable asset. I turned on the stereo cameras, set up the nodes, and rendered a shot. I quickly found that with a scene that takes ~20 minutes to render, that it might actually not be a great idea to render both shots together, distort, scale, and transform the beautiful renders while tweaking with the params. So I decided to go through a slightly different workflow. I would render each camera separately to a sequence folder. Then set up a different blend file to composite, and produce the images/videos. Here's the first render, that I posted on g+ that went through the original workflow:

Here's a few shots of the new workflow, that allowed me to scale out my renders to 4 different machines to make the overall process a bit faster. Also note that I scaled down the distance between the cameras to improve the perception of the size of the creatures.

And finally here is the HD Turntable Render, viewed best in Google Cardboard:

No comments:

Post a Comment