WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Cave and addtexquad (https://forum.worldviz.com/showthread.php?t=5847)

istarion 09-14-2016 07:19 AM

Cave and addtexquad
 
Hey

I have a 3-wall cave and I'm trying to figure out how to put a texture/plain coloured overlay over the scene. The goal is to provide an "emergency switch" to black out the cave in case of a nausea attack or similar, and later on some progress information.

In the single display setup this works:
Code:

blackout = viz.addTexQuad(parent=viz.ORTHO)
blackout.color(viz.BLACK)
blackout.drawOrder(-1)
blackout.setBoxTransform(viz.BOX_ENABLED)

In the cave this only places the black texture over the centre projector, not the two side walls. How do I get this to blackout the sidewalls as well?

thanks and cheers

Jeff 09-15-2016 05:26 AM

The easiest way to black out everything is set the scene to an empty scene:

Code:

viz.scene(2)
In a non-clustered CAVE script, multiple windows are setup within the application window, one for each wall. When setting a quad's parent to viz.ORTHO it's added to the main window by default. You'll also have to add quads for each of the other windows. Use the 'scene' argument to specify which window a quad is added to:

Code:

windows = [leftWindow,frontWindow,rightWindow]

for window in windows:

        blackout = viz.addTexQuad(parent=viz.ORTHO,scene=window)
        blackout.color(viz.BLACK)
        blackout.drawOrder(-1)
        blackout.setBoxTransform(viz.BOX_ENABLED)


istarion 09-16-2016 07:16 AM

Thanks for this solution.

Is there a way to get this window list from vizconnect or would I have to check all windows for existence and assemble it myself?

Jeff 09-21-2016 03:03 AM

You can get a handle to the window list using the following code. This works for the cave single machine option:

Code:

windows = vizconnect.getDisplay('display_name').getRaw().windowList


All times are GMT -7. The time now is 05:12 PM.

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