Vizard 8 » Tutorials & Examples » Appearance & texturing » 360 panoramas » Tutorial: Stereoscopic panoramas
8.1

Tutorial: Stereoscopic panoramas

If you have stereo panoramic images then you can view them in Vizard with very little extra code.  Vizard comes with a stereo panorama example provided by Peter Murphy of Australia. The environment map we already added is the left eye version of the panorama. Here we'll add the right eye version. Before doing that, let's rename some of the variables from the last tutorial so we know they apply to the left eye and start the script in stereo:

import viz
import vizshape

viz.setMultiSample(4)
viz.fov(60)
viz.go(viz.STEREO)

envLeft = viz.addEnvironmentMap('townhall_L.jpg')
skyLeft = vizshape.addSkyBox()
skyLeft.texture(envLeft)

Next, texture a second skybox with an environment map for the right eye:

envRight = viz.addEnvironmentMap('townhall_R.jpg')
skyRight = vizshape.addSkyBox()
skyRight.texture(envRight)

At this point each model is rendered to both eyes. We need to specify that the left model is only rendered to the left eye and the right model is only rendered to the right eye. This is accomplished using the <node>.renderToEye function:

skyLeft.renderToEye(viz.LEFT_EYE)
skyRight.renderToEye(viz.RIGHT_EYE)

Now run the script to view the panorama in stereo.

Loading panoramas

Immersive panoramas

Stereoscopic panoramas

Generating raw images