Skip to content
07-848 2005

Application SDK

Stereoscopic Rendering

In this chapter we'll cover stereoscopic rendering in V-Ray. We'll cover plugins, which can be used to achieve this effect - VRayStereoscopicSettings.

Last updated 7 April 2026

In this chapter we'll cover stereoscopic rendering in V-Ray. We'll cover plugins, which can be used to achieve this effect - VRayStereoscopicSettings.

VrayStereoscopicSettings

It is a helper plugin for stereoscopic (side by side) rendering. It turns the camera into 2 virtual cameras placed on some distance. It also implements Shademap mode: used to accelerate the stereoscopic rendering. It's also usable for accelerating DOF & motion blur.

Parameters

The following parameters are located in the VRayStereoscopicSettings plugin:

  • eye_distance – Specifies the eye distance for which the stereoscopic image will be rendered.
  • specify_focus – When enabled, defines the point of focus with the focus distance parameter.
  • focus_method – Specifies one of the three following focus methods for the two views.
    • None (0) – Both cameras have their focus points directly in front of them.
    • Rotation (1) – The stereoscopic effect is achieved by rotating the left and right views so that their focus points coincide at the distance from the eyes where the lines of sight for each eye converge called fusion distance.
    • Shear (2) – The orientation of both views remain the same but each eye's view is sheared along z so that the two frustums converge at the fusion distance.
  • interocular_method – Specifies how the two virtual cameras will be placed in relation to the real camera in the scene.
    • Shift both (0) – Both virtual cameras will be shifted in opposite directions at a distance equal to half of the eye distance.
    • Shift left (1) – The virtual cameras are shifted to the left so that the right camera takes the position of the original camera. The left camera is shifted to the left at a distance equal to the eye distance.
    • Shift right (2) – The virtual cameras are shifted to the right so that the left camera takes the position of the original camera. The right camera is shifted to the right at a distance equal to the eye distance.
  • view – Specifies which of the stereoscopic views will be rendered.
    • Both (0) – Both views will be rendered side by side.
    • Left (1) – Only the left view will be rendered.
    • Right (2) – Only the right view will be rendered.
  • adjust_resolution – When enabled, this option will automatically adjust the resolution for the final image rendered. For example, if Both is selected for view and the specified image resolution for the render is 640x480, the resulting render will be a single image with a resolution of 1280x480 with both views side by side.
  • output_layout – Specifies the format in which the Stereoscopic renders are output to the V-Ray frame buffer.
    • Side-by-Side (0) – Arranges the cameras side by side.
    • Top-Bottom (1) – Arranges the cameras one on top of another.
  • left_camera - A camera plugin for the left eye; if not specified, the left camera is computed based on the scene camera.
  • right_camera - A camera plugin for the right eye; if not specified, the right camera is computed based on the scene camera.
  • film_offset_x_left - Horizontal film offset for the left camera
  • film_offset_x_right - Horizontal film offset for the right camera
  • film_offset_y_left - Vertical film offset for the left camera
  • film_offset_y_right - Vertical film offset for the right camera

Panoramic pole merging

The options in this section are used when rendering a panoramic view with stereoscopy (for example a Spherical camera with FOV=360 degrees). These options allow us to avoid artifacts when looking upward and downward. This is achieved by gradually decreasing the eye distance and thus the stereoscopic effect. The eye distance value is kept the same until the viewing angle reaches the angles specified in the properties below after which the eye distance is gradually decreased until it reaches a value of 0 when looking directly downwards or upwards.

  • top_merge_angle - Panoramic pole merging: from what angle near the top does the stereo effect start to fade when rendering with a spherical panorama camera
  • bottom_merge_angle - Panoramic pole merging: from what angle near the bottom does the stereo effect start to fade when rendering with a spherical panorama camera

ShadeMap Parameters

The shade map parameters can speed up the rendering of stereoscopic images as well as images with depth of field. The workflow with shade maps involves two stages. At the first stage a shade map is generated by setting the Shademap mode to Render shade map and rendering. The file in which the shademap will be saved needs to be specified by clicking on the Browse button before the actual rendering. This will save a file that contains important information about the visible shaded points. This information can be used later in Use shade map mode to render stereoscopic images or images with DoF much faster.

  • sm_mode - Allows us to specify the mode of operation for the shade map (0 - disabled; 1 - render shade map; 2 - use shade map).
  • reuse_threshold - Lower values will make V-Ray use less of the shade map and more real shading.
  • shademap_file - The name of the file in which the shade map information is stored.
  • float_colors_mode - Store 32 bit (single precision) color channels in the shade map. When off 16 bit (half precision) values are stored.
  • vrst_compression - Compression type for the .vrst files (0 - no compression, 1 - ZLIB compression)
  • exr_compression - Compression type for the .exr files (0 - no compression, 1 - RLE compression, 2 - ZIPS compression)
  • exclude_list - A list of plugins for which the shade map won't be used.
  • exclude_list_inclusive - When on the exclude_list is considered as an "Include list" and when off the the Result Affect is considered as "Exclude list"

General guidelines

For spherical panorama rendering you need to:

  • Change the type parameter of SettingsCamera to 9. (Note that type=1 is spherical, but not for panoramas.)
  • Set the field of view to 360 degrees or rather 2*pi, because the fov parameter is in radians. You need to do this with the RenderView plugin and with SettingsCamera - both have an fov parameter. Also if you're using CameraPhysical with specify_fov=1, set fov there too.
  • Set the vertical field of view to 180 degrees. This may be a bit confusing: it is set through the height parameter of SettingsCamera. Also the value is not in radians, but in degrees.

For cubic (6x1) panorama rendering you need to:

  • Change the type parameter of SettingsCamera to 10.
  • Set a resolution with aspect ratio 6:1 (or 12:1 if you are doing stereo). So for a stereo cubic panorama with 1000x1000 pixel cube sides you will render at 12000x1000.

For stereo rendering:

  • For CPU (Production or Interactive) rendering you need to create a VRayStereoscopicSettings plugin. It has to be created after SettingsCamera and SettingsOutput or it won't work! It's recommended to change the VRayStereoscopicSettings::focus_method parameter to 1 for panorama or 2 for normal camera.
  • For GPU rendering you need to set RenderView::stereo_on to 1. You might also want to set RenderView::stereo_eye_distance to something like 6.5 (average human), instead of the default 1.0. It's recommended to change the RenderView::stereo_focus_method parameter to 1 for panorama or 2 for normal camera.

Also remember to set a double horizontal resolution for stereo. So if your normal render resolution is 640x480, make that 1280x480. The left half of the image will be the left eye view and the right half is the right eye.

Examples

Cube 6x1

Check comments in the scene file vrscenes/vr_cube6x1_camera.vrscene.

Stereo Cube 6x1

Check comments in the scene file vrscenes/vr_cube6x1_stereo.vrscene.

Spherical

Check comments in the scene file vrscenes/vr_sphericalPanorama_camera.vrscene.

Stereo Spherical

Check comments in the scene file vrscenes/vr_sphericalPanorama_stereo.vrscene.

Code example

Here's an example code for Cube6x1 rendering:

Python

C++

C#.NET

Node.js