WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Render a black subwindow (https://forum.worldviz.com/showthread.php?t=2654)

llqqff 03-29-2010 08:10 PM

Render a black subwindow
 
Now I want to change the vertical field of view by blacking out the pixels I don't want. I am using the following code:
import viz
viz.go()

viz.add('panorama.ive')

#Add a new window.
subWindow = viz.addWindow()
#Set the size and position of the window.
subWindow.setSize(1,.1845)
subWindow.setPosition(0,1)
subWindow.clearcolor(viz.BLACK)

But the subwindow still shows part of the scene of the virtual environment. I don't know why and how to render the subwindow black. Thanks.

Qiufeng

Darkmax 03-29-2010 08:42 PM

mm you can add a new view point in the subwindow and set it to scene 2

Code:

import viz
viz.go()

viz.add('panorama.ive')

#Add a new window.
subWindow = viz.addWindow()
#Set the size and position of the window.
subWindow.setSize(1,.1845)
subWindow.setPosition(0,1)
#Add new viewpoint and set it in scene 2
subView = viz.addView()
subView.setScene(2)
subWindow.viewpoint(subView)


llqqff 03-30-2010 09:09 AM

Yea. That works. Thank you very much!!
I have another question: how can I put the subwindow in the bottom of the main window, I tried:
import viz
viz.go()

viz.add('panorama.ive')

#Add a new window.
subWindow = viz.addWindow()
#Set the size and position of the window.
subWindow.setSize(1,.1845)
subWindow.setPosition(1,0)
#Add new viewpoint and set it in scene 2
subView = viz.addView()
subView.setScene(2)
subWindow.viewpoint(subView)

But it does not work. I don't know why.

llqqff 03-30-2010 10:23 AM

I solve the problem, thanks.


All times are GMT -7. The time now is 05:57 AM.

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