Vizard 7 » Tutorials & Examples » Appearance & texturing » 360 panoramas » Tutorial: 360 panoramas
7.6

Tutorial: 360 panoramas

This tutorial will teach you how to create a panorama from a collection of still. This technique can be used to completely immerse the user in a virtual sphere that fully envelops users and produces an extremely strong illusion that they are in the actual environment.

 

Vizard can also be easily instructed to render separate panoramas to the users' LEFT and RIGHT eyes, thus generating a fully stereoscopic panorama.

 

The technique described in this tutorial uses cube maps.

Loading environment maps

If you have trouble getting the code in this tutorial to work, you can find the complete example scripts in the \tutorials\appearance directory.

import viz
import vizshape

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

Next, let's add the environment map. An environment map is made up of 6 textures. Each texture represents one side of a cube. This cube represents the surrounding environment of an object. This example will load the following 6 textures:

townhall_L_posx.jpg
townhall_L_negx.jpg
townhall_L_posy.jpg
townhall_L_negy.jpg
townhall_L_posz.jpg
townhall_L_negz.jpg

Vizard has a shortcut for loading environment maps. Simply add the following code:

env = viz.addEnvironmentMap('townhall_L.jpg')

This creates an environment map texture. The second argument is the base name of the 6 textures. Vizard will automatically adds the '_posx', '_negx', etc., so it's important that you name your textures accordingly.

Loading panoramas

Immersive panoramas

Stereoscopic panoramas

Generating raw images