Rendering for Virtual Reality

CC-BY: Tom Haines, 3Dami

Virtual reality is about immersion - making you feel like you are really there! This is done by ‘hiding’ the real world. You wear a headset so all you can see is the virtual world, and it reacts to head movement, so you can look around as normal. It is often combined with ‘stereo rendering’, which provides a slightly different image to each of your eyes. As a result you see normally, in 3D, instead of the 2D of a computer monitor.

High end setups will allow you to get up and walk around, tracking your every motion and fooling you into believing it’s real. We will be trying something simpler. Head motion will be ignored, but you can still look around. To do this we render an image (or film) that covers every single direction you can look - a panorama.

victor_360.jpg

(Images CC-BY Dalai Felinto/Blender Institute)

A VR viewer then shows you only the part of the image for the direction you are looking in, updating as you turn your head:

victor_360_view.jpg

You render for VR in the exactly the same way as before, but have to adjust a few settings first.

  1. Watch the video to see how it's done.
  2. Or continue with the description below.

Cycles renderer

VR rendering is only available in Cycles, so use the drop down on the top bar to switch from Blender Render. Cycles is a more realistic renderer, that does a better job of matching the real world, but you may have to redo your materials.

to_cycles.jpg

Camera settings

Now select the camera, go to the Camera tab, and set the Lens to be Panoramic and the Type to be Equirectangular.

setting_2D.jpg

Render output resolution

You should set the output resolution to be 2048 x 1024 or 4096 x 2048 however, as this is what VR headsets expect.

blender-render-resolution.png

Level the camera

You should rotate the camera so that it is level - if it is at a wonky angle anyone viewing your scene will feel dizzy. This is because the virtual world is telling them they are at an angle, whilst their sense of balance is telling them they are standing straight. This is similar to why people get travel sick, except much worse, and it will make almost anyone feel ill.

3D stereo (optional)

To be more immersive we can enable 3D stereo rendering. To do that we need to adjust a few more settings:

Be aware that now everything is 3D scale matters - the size of objects in Blender will affect how big they look to you. Cubes start at 2 meters across, so you may want to scale them down!

If you do decide to render out a VR animation you will need to use the MPEG4 container with H264 compression.

In Blender versions up to 2.8:

blender-render-file-format.png

In Blender 2.79:

blender-279-render-settings.png

It is best to keep any camera motion gradual. Sudden changes of direction will make you feel ill, and you might even fall over!

Don't forget to save your .blend file.

Viewing your 3D VR image

Having rendered a 3D image or film you can upload it to http://vrviewer.b3d101.org/ and then view it on a mobile phone using Google glass. You must include ‘stereo’ in the filename if the image has been rendered with stereo!

NOTE The Google VRviewer has some problems on certain Android mobile phones. On the Iphone it works okay.

Print