![]() |
#3
|
|||
|
|||
Jeff,
I think I have the correct settings now by defining four windows #Define windows leftWindow = viz.addWindow() bottomWindow = viz.addWindow() rightWindow = viz.addWindow() frontWindow = viz.addWindow() and then for each client in the cluster.MaskedContext I setup to split the display in two and then display in Fullscreen so each projector will receive the correct output from the computer. On CLIENT2 I get a subwindow in the top right corner. Other than that problem everything displays correctly. any idea why I would get the sub-window? Here is the code I used: Code:
import viz import vizcave import viztracker # Declare constants defining the CAVE dimensions W = 3.048 # 10 feet wide H = 2.286 # 7.5 feet tall D = 3.048 # 10 feet deep W2 = W/2.0 C0 = -W2,H,0 # Front Wall: C1,C2,C5,C6 C1 = -W2,H,D # Left Wall: C0,C1,C4,C5 C2 = W2,H,D # Right Wall: C2,C3,C6,C7 C3 = W2,H,0 C4 = -W2,0,0 C5 = -W2,0,D C6 = W2,0,D C7 = W2,0,0 #Create front wall FrontWall = vizcave.Wall( upperLeft=C1, upperRight=C2, lowerLeft=C5, lowerRight=C6, name='Front Wall' ) #Create left wall LeftWall = vizcave.Wall( upperLeft=C0, upperRight=C1, lowerLeft=C4, lowerRight=C5, name='Left Wall' ) #Create right wall RightWall = vizcave.Wall( upperLeft=C2, upperRight=C3, lowerLeft=C6, lowerRight=C7, name='Right Wall' ) #Create bottom wall BottomWall = vizcave.Wall( upperLeft=C5, upperRight=C6, lowerLeft=C4, lowerRight=C7, name='Bottom Wall' ) #Initialize graphics window viz.go() #Create cave object cave = vizcave.Cave() #Define windows leftWindow = viz.addWindow() bottomWindow = viz.addWindow() rightWindow = viz.addWindow() frontWindow = viz.addWindow() #Add each wall, make sure that they are ordered in the cluster software correctly to match this ordering cave.addWall(BottomWall, mask=viz.CLIENT1, window=bottomWindow) cave.addWall(FrontWall, mask=viz.CLIENT1, window=frontWindow) with viz.cluster.MaskedContext(viz.CLIENT1): #Size of each window WINDOW_SIZE = [1.0/2.0,1.0] frontWindow.setSize(WINDOW_SIZE) frontWindow.setPosition([1.0/2.0,1]) bottomWindow.setSize(WINDOW_SIZE) bottomWindow.setPosition([0,1]) viz.window.setFullscreen(True) cave.addWall(LeftWall, mask=viz.CLIENT2, window=leftWindow) cave.addWall(RightWall, mask=viz.CLIENT2, window=rightWindow) with viz.cluster.MaskedContext(viz.CLIENT2): #Size of each window WINDOW_SIZE = [1.0/2.0,1.0] rightWindow.setSize(WINDOW_SIZE) rightWindow.setPosition([1.0/2.0,1]) leftWindow.setSize(WINDOW_SIZE) leftWindow.setPosition([0,1]) viz.window.setFullscreen(True) """ 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') |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
anaglyph effect at front view of cave | g.vannan | Vizard | 1 | 02-03-2015 05:29 AM |
Mouse events from a cluster client | victorqx | Vizard | 5 | 08-14-2012 11:43 PM |
[New here] Cave joy navigation | esuna114 | Vizard | 2 | 06-11-2010 04:36 PM |
Flipped floor in a CAVE | shivanangel | Vizard | 1 | 03-10-2010 10:12 AM |
Four Wall Cave on One Computer | envisC | Vizard | 1 | 04-28-2009 05:02 PM |