Vizard 7 » Reference » Stereo & Displays » vizcave » vizcave powerwall
7.6

vizcave powerwall

A powerwall is a semi-immersive virtual reality interface made up of a single high-resolution display wall based on front or rear stereo-projection. With stereo glasses and tracking the user will get a window into the world effect. Alternatively, a scaled down version can be configured using a 3D monitor.

Example: Powerwall

Here is a sample script that creates a powerwall setup using the vizcave module. The script uses the WASD keys on the keyboard to move the location of the user's viewpoint. You can also move the location of the origin of the CAVE around the virtual environment using the arrow keys and the mouse.

Note: Set the appropriate stereo mode (e.g. viz.QUAD_BUFFER) for your display in the viz.go command.

import viz
import vizcave
import viztracker

#Dimension of PowerWall in meters
WIDTH       = 3.0
HEIGHT      = 3.0
DISTANCE    = 2.0

#Create single power wall
PowerWall = vizcave.Wall(   upperLeft=(-WIDTH/2.0,HEIGHT,DISTANCE),
                            upperRight=(WIDTH/2.0,HEIGHT,DISTANCE),
                            lowerLeft=(-WIDTH/2.0,0.0,DISTANCE),
                            lowerRight=(WIDTH/2.0,0.0,DISTANCE),
                            name='Power Wall' )

#Initialize graphics window
viz.go()

#Create cave object with power wall
cave = vizcave.Cave()
cave.addWall(PowerWall)

"""
Create tracker object that represents the users head position, specifically the center of the eyes.
The position provided by the head tracker must be in the same reference frame as the cave wall coordinates.
This will normally be a tracking sensor, but for this example we will simulate a head tracker
using the keyboard (WASD keys).
"""
head_tracker = viztracker.Keyboard6DOF()
head_tracker.setPosition (0.0,1.8,0.0)

"""
Pass the head tracker to the cave object so it can automatically update the
view frustums every frame based on the current head position relative to each wall.
"""
cave.setTracker(head_tracker)

"""
Create CaveView object for manipulating the virtual viewpoint.
cave_origin is a node that controls the position of the cave within the virtual world.
For example, if you wanted to simulate the cave user flying through an environment,
you would apply the transformation to the cave_origin node.
"""
cave_origin = vizcave.CaveView(head_tracker)

"""
The cave_origin node is a standard Vizard node that you can apply any position/rotation to.
In this example we will create a keyboard/mouse tracker (using arrow keys) and link it to
the cave_origin node, allowing us to fly the cave user through the virtual environment.
"""
origin_tracker = viztracker.KeyboardMouse6DOF()
origin_link = viz.link(origin_tracker, cave_origin)

#Add gallery environment model
viz.add('gallery.osgb')