PDA

View Full Version : Render a black subwindow


llqqff
03-29-2010, 08:10 PM
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


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.