WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Cluster (https://forum.worldviz.com/showthread.php?t=3988)

inha 11-06-2011 12:04 AM

Cluster
 
1 Attachment(s)
I use one main-computer and three cluster computers.
Three screens are connected with the three computers.


UpperLeftWindow = viz.addWindow(pos=(0,1.0),size=(0.2,0.4))
UpperLeftWindow.visible(0,viz.SCREEN)
BirdView = viz.addView()
#Attach the bird's eye view to the upper left window
UpperLeftWindow.setView(BirdView)
#Move the view above the center of the room
BirdView.setPosition([40,-9550,0])
#Rotate the view so that it looks down
BirdView.setEuler([0,90,0])

I added a small window using this code.
I had not any problem when I used only one computer. However, the small window on the left of the top of this attached picture appeared on each screen of the three computers while I used them.
I would like to make the window appear on only one screen.
I suppose that I can solve the problem using SETMASK code but I failed to settle the problem although I tried many times.
I would appreciate it if you can help me.

Jeff 11-16-2011 04:51 PM

The following code shows how to use a cluster mask so the sub-window only shows up on the master:
Code:

import viz
viz.go()

maze = viz.addChild('maze.osgb')


with viz.cluster.MaskedContext(viz.MASTER):
        UpperLeftWindow = viz.addWindow(pos=(0,1.0),size=(0.2,0.4))
        UpperLeftWindow.visible(0,viz.SCREEN)
        BirdView = viz.addView()
        #Attach the bird's eye view to the upper left window
        UpperLeftWindow.setView(BirdView)
        #Move the view above the center of the room
        BirdView.setPosition([0,50,0])
        #Rotate the view so that it looks down
        BirdView.setEuler([0,90,0])


Andy 12-13-2011 02:15 AM

I get an error if I try to set the MaskedContext to viz.CLIENT1 can you tell me why? I think the VizWindow instance isn't valid.

farshizzo 12-13-2011 12:03 PM

The previous code sample is incorrect. Try the following instead:
Code:

import viz
viz.go()

maze = viz.addChild('maze.osgb')

UpperLeftWindow = viz.addWindow(pos=(0,1.0),size=(0.2,0.4))
UpperLeftWindow.visible(0,viz.SCREEN)
BirdView = viz.addView()
#Attach the bird's eye view to the upper left window
UpperLeftWindow.setView(BirdView)
#Move the view above the center of the room
BirdView.setPosition([0,50,0])
#Rotate the view so that it looks down
BirdView.setEuler([0,90,0])
       
# Show the window only on client 1
UpperLeftWindow.visible(0)
with viz.cluster.MaskedContext(viz.CLIENT1):
        UpperLeftWindow.visible(1)

You still need to add the window to all machines, but just make it visible on one.


All times are GMT -7. The time now is 12:03 AM.

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