RealityServer Features

Single pass stereoscopic rendering

Iray contains a feature which allows for stereoscopic rendering to be performed simply by setting an eye separation value on the camera. For example the following JSON-RPC command would setup the renderer to perform a right eye render with a separation of 0.063 (if the scene is in metres this would be a 63mm separation):

{
    "method": "element_set_attribute",
    "params": {
        "element_name": "camera",
        "attribute_name": "mip_lens_stereo_offset",
        "attribute_value": 0.0315,
        "attribute_type": "Float32",
        "create": true
    }
}

Note that the value is set to half the separation as Iray requires the center to right eye separation, not the full eye separation.

Typically the user would then need to perform another render with a separation of -0.0315 to get the left eye image and then combine the two renders into a single image for use in a stereoscopic viewer.

Single pass rendering

RealityServer builds on this system by supporting automatic single pass rendering and image combining within a single render call. Simply set the right eye separation value as above as well as the mip_lens_combined_stereo attribute on the camera to describe how you want the images combined and RealityServer will take care of all the rest. For example:

{
    "method": "element_set_attribute",
    "params": {
        "element_name": "camera",
        "attribute_name": "mip_lens_combined_stereo",
        "attribute_value": "horizontal_lr",
        "attribute_type": "String",
        "create": true
    }
}

The above will perform a single pass stereo render and combine the two images into a horizontal stereo image with the left eye on the left side and the right eye on the right. RealityServer will render the individual images at the normal resolution so the returned image will be twice as wide as requested.

The following values are supported for mip_lens_stereo_combined:

  • horizontal_lr - horizontal orientation, left on left, right on right.
  • horizontal_rl - horizontal orientation, left on right, right on left.
  • vertical_lr - vertical orientation, left on top, right on bottom.
  • vertical_rl - vertical orientation, left on bottom, right on top.

Supported commands

Single pass stereoscopic rendering is supported in all RealityServer render commands and render loop handlers except for the render_to_canvases command. It is also possible to render spherical stereoscophic images to provide 3D VRs using RealityServer.