A stereoscopic image consists of two versions of the same image, except one view is offset from the other. One image is meant for the left eye and the other is meant for the right eye. When these images are combined it gives the perception of 3D depth. There are various techniques for combining images and the most traditional is anaglyph which uses the red and cyan filters. One of the images is displayed in red and the other in blue. The user wears glasses that filter the images by the two colours. Another common technique uses polarising filters which react with light; this method is typically used in cinema screens.
If you would like access to the scene files used in this tutorial please click here to download.
V-Ray can output a stereoscopic image using a simple tool called the VRayStereoscopic helper. The end result is a side by side image that can be later used to generate a 3D image or film. Previous methods required you to build a camera rig where two physical cameras were offset from each other. You also had to set constraints so that the camera target does not move out of alignment and possibly skew the 3D effect. The VRayStereoscopic helper creates two virtual cameras offset from the original camera, so it is much easier to manage the process. One camera is offset to the right and the other is offset to the left. The position of the camera target is automatically adjusted to avoid any skew effects.
Place the VRayStereoscopic helper in your scene. This will automatically generate a side by side rendered image using two virtual cameras.
Once you have your camera view set up and you are happy with it, go to the helpers menu and choose VRay from the drop down menu. Select VRayStereoscopic and click to place the helper in your scene. It does not matter where you place the helper.
Within the VRayStereoscopic helper, adjust the parameters to match the scale of your scene. The eye distance will be different depending on the size of your objects.
Within the VRayStereoscopic parameters, the first option is eye distance which adjusts the distance between the two virtual cameras. Ideally this would be a distance that is typical to that of the human eyes. On average the human eyes are 65mm apart. If the setting is too low the 3d effect will be minimal to nothing at all and if the settings are too high the effect will be too great that it will not work. The eye distance will vary slightly depending on scale, so providing your scene is set up using real world scale set the eye distance to 65mm. If you are working in inches then adjust accordingly to match 65mm.
The focus method determines how each camera will focus for the two views. The default setting of none means that both images will carry on converging into infinity, objects that are very far in the distance will still be overlapped to keep the 3D depth effect throughout. In some cases this might become undesirable so other methods can be used instead, such as shear or rotate. These start to converge less beyond the camera target meaning objects further away have a lesser 3D effect.
The interocular method determines how the two virtual cameras will be placed relative to the original camera in the scene. By default, the method is set to both so that both virtual cameras are equally offset, one to the left and one to the right of the original camera. In most cases it is best to keep this setting as both.
View determines the final output. If only left or right are selected then the final render will be only one of these. However, if both is selected you will get a side by side image as the end result. This setting will be dependent on the software you will be using to combine the two images. For example, in Adobe After Effects it is best to have the left and the right views as separate images on separate layers.
Finally check the adjust resolution option. When this is on, V-Ray will automatically adjust the resolution for the final image to include both the left and right views. So if your default resolution for a single image is 1600 x 1200 pixels, the final rendered image would be 3200 x 1200 pixels.
Use the V-Ray frame buffer to view the final result side by side and as an anaglyph image by clicking on the stereo red/cyan option.
Once the rendering is complete save out the side by side image. To view this outside of V-Ray as an anaglyph image you can use a viewer called Stereoscopic Player. This is free to download and you can find it here: www.3dtv.at. To view the image as an anaglyph, drag and drop the side by side image into the Stereoscopic Player. This player can be used for both still images and animations.
Shade map speeds up the rendering process. If you have a complex scene using depth of field you can save time by not having to render the image twice as the rendering calculation is shared between both images.