WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-04-2016, 05:17 PM
JB_HP_Viz JB_HP_Viz is offline
Member
 
Join Date: Jun 2014
Posts: 31
Four Wall Cave using two client cluster

Looking for information on how to setup a four wall CAVE that has a cluster with a Master and two clients. In the documentation I found it talks about
either a single computer running all four walls or four computer cluster (one for each wall).

The Master does not display any of the walls, it is just the master for the two clients.
CLIENT1 displays the Front Wall and the Right Wall
Nvidia Graphic Card Front Wall Projector(graphic ports 1&2 clone mode) and Right Wall Projector(graphic ports 3&4 clone mode)
CLIENT2 displays the Left Wall and the Floor
Nvidia Graphic Card Floor Projector(graphic ports 1&2 clone mode) and Left Wall Projector(graphic ports 3&4 clone mode)
See attached photo

I found the information on how to setup a Clustered CAVE
http://docs.worldviz.com/vizard/vizc..._clustered.htm

From Documentation example:
#Create cave object
cave = vizcave.Cave()

#Add each wall, make sure that they are ordered in the cluster software correctly to match this ordering
cave.addWall(FrontWall, mask=viz.MASTER)
cave.addWall(LeftWall, mask=viz.CLIENT1)
cave.addWall(RightWall, mask=viz.CLIENT2)
cave.addWall(BottomWall, mask=viz.CLIENT3)

For my CAVE:
#Add each wall, make sure that they are ordered in the cluster software correctly to match this ordering
cave.addWall(FrontWall, mask=viz.CLIENT1)
cave.addWall(LeftWall, mask=viz.CLIENT2)
cave.addWall(RightWall, mask=viz.CLIENT1)
cave.addWall(BottomWall, mask=viz.CLIENT2)

But I can't get the walls to display correctly, since all I can tell it is to use CLIENT1 or CLIENT2 but not which nvidia graphics port for the correct projector.

I also looked through the documentation on a Single Machine doing a CAVE
http://docs.worldviz.com/vizard/vizc...le_machine.htm

I have also tried to configure the CAVE using Vizconnect, but vizconnect just has you choose which monitor and doesn't allow the user to select the CLIENT.

So if I look at the documentation on a Clustered CAVE.
and I use this command cave.addWall(FrontWall, mask=viz.CLIENT1) how does it know which nvidia graphics port to use so it uses the Front Projector.

Do I need to combine the information from the documentation on Clustered CAVE and Single Machine CAVE?

Do I need to use something like the code below from the Single Machine combined with identifying CLIENT1 or CLIENT2 in the Cluster code with the MainWindow?


#Size of each window
WINDOW_SIZE = [1.0/3.0,1.0]

#Add each wall
frontWindow = viz.MainWindow
frontWindow.setSize(WINDOW_SIZE)
frontWindow.setPosition([1.0/3.0,1])
cave.addWall(FrontWall,window=frontWindow)

Thank you
John
Attached Thumbnails
Click image for larger version

Name:	nvidia_configuration_for_client_050316.jpg
Views:	2231
Size:	507.3 KB
ID:	784  
Reply With Quote
  #2  
Old 05-05-2016, 02:04 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Yes, the cave.addWall command has arguments for both mask and window. So you will need to specify both for each of the walls.
Reply With Quote
  #3  
Old 05-10-2016, 01:35 PM
JB_HP_Viz JB_HP_Viz is offline
Member
 
Join Date: Jun 2014
Posts: 31
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')
Reply With Quote
  #4  
Old 05-13-2016, 04:26 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Try getting handles to the mainwindow and just one subwindow. Then set their size and position:

Code:
mainWindow = viz.MainWindow
subWindow = viz.addWindow()

WINDOW_SIZE = [1.0/2.0,1.0]
mainWindow.setSize(WINDOW_SIZE)
mainWindow.setPosition([1.0/2.0,1])
subWindow.setSize(WINDOW_SIZE)
subWindow.setPosition([0,1])
You can reference the same window names for the different clients:

Code:
cave.addWall(BottomWall, mask=viz.CLIENT1, window=mainWindow)
cave.addWall(FrontWall, mask=viz.CLIENT1, window=subWindow)
cave.addWall(LeftWall, mask=viz.CLIENT2, window=mainWindow)
cave.addWall(RightWall, mask=viz.CLIENT2, window=subWindow)

Last edited by Jeff; 05-13-2016 at 08:45 AM. Reason: simplified code
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
anaglyph effect at front view of cave g.vannan Vizard 1 02-03-2015 06:29 AM
Mouse events from a cluster client victorqx Vizard 5 08-15-2012 12:43 AM
[New here] Cave joy navigation esuna114 Vizard 2 06-11-2010 05:36 PM
Flipped floor in a CAVE shivanangel Vizard 1 03-10-2010 11:12 AM
Four Wall Cave on One Computer envisC Vizard 1 04-28-2009 06:02 PM


All times are GMT -7. The time now is 07:23 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC