How To Render 3D "in-3D" (Tutorial)

I ran into some rendering issues while preparing my 3D simulation for submission. The test renders took about 10 hours per frame and there were issues with the render client when splitting multiple scenes into multiple parts. I figured 10 hours per workunit would be too demanding on the crunchers, and would probably have too many timed out results for the farm.

But I still wanted to show how to make 3D anaglyph images inside blender (and render on the farm), so here's my first ever tutorial. With this tutorial, you will be able to turn your scenes into 3D images that can be viewed with those red/blue 3D glasses.

(click any image below for full sized versions)

Here's a starting .blend of a basic scene.

3DTut-Start.blend

The main scene is called "Left" for the left eye.

Step 1 - Create Duplicate Camera

Create a duplicate camera next to your existing camera. Select the existing camera. Press "Alt-D" to duplicate the camera, then "xx" to move along the local X axis. For this scene, the cameras are 0.25 blender units apart.

The distance depends on your scene. A larger distance will have a greater 3D effect, but too large will be hard on the eyes. Experiment to see the difference.

Step 2 - Parent R/L Cameras

For convenience, parent the Right camera to the Left camera so when you move/animate the Left camera, the Right camera will move with it. Select the Right camera, Shift-Select the Left camera, then press Ctrl-P to create a parent/child relationship.

Step 3 - Create Duplicate Scene

Create a copy of your scene. Click the "+" button next to the scene pulldown and select "Link Objects".

Copying the scene should be done after your modelling is complete. Any items added or deleted after this point will require re-copying the scene.

Step 4 - Rename "Right" Scene

Rename the new scene to "Right".

Step 5 - Set the "Right" Active Camera

To make the "Right" camera as the active camera for the "Right" scene, select the Right camera, then select View / Camera / Set Active Object as Camera (Ctrl Numpad 0) from the menu.

Change back to the "Left" scene - you should see the camera view change slightly when you switch scenes.


The scene and camera setup is now complete. Next we will create the composite nodes to link the scenes/cameras together and overlay the red/blue tint.

Step 6 - The Input Nodes

There are 4 inputs (technically 3). The two rendered images, and two color fields (to apply the tint). Switch to the Node Editor. Add the second scene input (Shift-A / Input / Render Layers) and select the "Right" scene. Then add an RGB input (Shift-A / Input / RGB) and set to full red. Add a Color / Invert node to create a cyan node and connect it to the red RGB node.

Note: This tutorial is for red/cyan glasses. There are also red/green, green/magenta, and yellow/blue glasses. If you have different glasses, do some research to determine actual color settings and adjust your color nodes accordingly.

Step 7 - The Mix Nodes

There are 3 mix nodes. The "Left" scene is mixed with the Cyan node, and the "Right" scene is mixed with the Red node. They are then mixed together to create the 3D anaglyph.

The color mix nodes are set to "Screen" type, with a Fac value of 1.0.
The node to mix them together is set to "Multiply", with a Fac value of 1.0.

Step 8 - Final Output

Connect the last mix node to your output node and you're done.

You can now press F12 and both scenes will be rendered and composited together into a 3D anaglyph. Remember to put on your glasses.

Here's the finished .blend file...

3DTut-Finish.blend

Some things to consider...

  • Since the node setup is contained in the "Left" scene, you need to render the Left scene to create the anaglyph. Rendering the "Right" scene will only render the Right camera (no compositing will be done).
  • When animating, try to keep the entire object in both camera's field of view (Left & Right) so the 3D effect can be visible.
  • Make sure both scenes have the same rendering parameters. For some reason, dimensions don't seem to matter, but anti-aliasing does. To be safe, keep the render settings for both scenes identical.
  • You may edit objects and change settings, but if you create or delete an object, you need to repeat steps 3 thru 6 to update the other scene.
  • If you submit to the farm, you must render as 1 part per frame. I believe there's a bug with the render client properly cutting the second scene into parts. So for now, 1 part per frame is necessary (and the reason I couldn't submit my original scene).
  • As far as efficiency and usability, you would probably be better off rendering a "Left" version, and "Right" version of your animation separately then composite them together offline. That way you would also have a 2D version of your clip. This "experiment" was to show that if you setup your .blend file properly you can render directly to your final animation without the need to post process frames. Either way it's the same rendering time. I think the post processing is just additional work (if you don't want a 2D version).

I've modified materials, animated my own version, and submit it to the farm. Here's the final animation. Thanks for crunching.

If you have 3D glasses, I recommend the high resolution video played at fullscreen in a dark room for best results.

As always, post any questions or comments you may have. I'm interested to see any work you've created based on this tutorial.

User offline. Last seen 9 weeks 5 days ago. Offline
Fellow
Joined: 2010-07-15
Great and interessent tutorial ;)

I'm working on a stereosopic scene on my animation, and I used almost all of the steps you mentioned above ^^

However may I suggest a better node setup ?

You'll just have to use the "Separate RGBA" node, then every (left & right) image will be separaetd to its color chanels :D You'll just have to take the Red channel from the Left one and the Blue and Green ones from the right one and combine them with the "Combine RGBA" node ;)

here's a simplified screenshot of my setup:

screenshot

And thanks for the tutorial :)

User offline. Last seen 1 day 20 hours ago. Offline
Fellow
Joined: 2010-05-31
Wow, that is much easier.

Wow, that is much easier. Thanks jackred!

User offline. Last seen 5 weeks 3 days ago. Offline
Fellow
Joined: 2010-07-12
Thats great Overkill, been

Thats great Overkill, been waiting for this!

 

But why did a single frame take 10h for rendering?

User offline. Last seen 1 day 20 hours ago. Offline
Fellow
Joined: 2010-05-31
10 hours per frame.

The 10 hour render was for my previous attempt. Lots of AO and soft lighting in that version. Made this animation instead of trying to "convert" an existing .blend to 3D.

jbk
User offline. Last seen 4 days 10 hours ago. Offline
BURP Ninja
Joined: 2008-10-05
You may also want to read

You may also want to read about off-axis rendering - specifically it can become very important for scenes with great depth differences. Having the view frusta intersect perfectly on the zero parallax plane can add a great deal of realism to your scene.

And here's a link to a nice script: http://www.noeol.de/s3d/

User offline. Last seen 1 day 20 hours ago. Offline
Fellow
Joined: 2010-05-31
Toe In

Thanks jbk,

I had inadvertantly used the "Toe-In" setup in the .blends (where both converge on the camera target).

Thanks for the link to the script.

User offline. Last seen 33 weeks 6 days ago. Offline
Sceptic
Joined: 2011-04-22
Thank you so much!

Hi,

I'm working on fulldome (fisheye projection) content  production and want to try out a cubemap render on the farm and your tutorial answered all my questions about multiple cameras and workflow. Thank you!

I'll be sure to report the results on renderfarm.fi and quote your article.

I made a still render test yesterday and animated it with another software I wrote to get the 180° fisheye from the cubemap.

Here is the animation : http://vimeo.com/23205035

Here is the interactive software that turns cube map to fisheye : http://openprocessing.org/visuals/visualID=25607

 

I'll make some final setup to my test scene and try to submit it today.

 

User offline. Last seen 5 weeks 2 days ago. Offline
Believer
Joined: 2011-04-15
I did one differently