WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-15-2011, 06:56 AM
kovitch kovitch is offline
Member
 
Join Date: Sep 2010
Posts: 30
Center window & stereo vision

Hi, I'm trying to do something like this:



I'm using the following code to draw the center window:

Code:
CenterWindow = viz.addWindow(pos=(0.25,0.75),size=(0.5,0.5))
CenterWindow .visible(0,viz.SCREEN)
However, when I apply the viz.STEREO the stereo is only applied to the viz.MainView. What is the best way to accomplish something like you see in the image?

Regards.
Reply With Quote
  #2  
Old 02-15-2011, 09:51 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Are you just wanting to display a separate image to each eye? If so, here is a sample script showing how to accomplish this:
Code:
import viz
viz.go(viz.STEREO_HORZ|viz.FULLSCREEN)

# Create texture quads for each eye
left_quad = viz.addTexQuad(parent=viz.ORTHO)
left_quad.disable(viz.RENDER_RIGHT)
viz.link(viz.CenterCenter,left_quad)

right_quad = viz.addTexQuad(parent=viz.ORTHO)
right_quad.disable(viz.RENDER_LEFT)
viz.link(viz.CenterCenter,right_quad)

# Create texture for each eye
left_texture = viz.addTexture('townhall_L_posz.JPG')
right_texture = viz.addTexture('townhall_R_posz.JPG')

# Apply textures to quads
left_quad.texture(left_texture)
left_quad.setScale(left_texture.getSize())

right_quad.texture(right_texture)
right_quad.setScale(right_texture.getSize())
Reply With Quote
  #3  
Old 02-15-2011, 10:13 AM
kovitch kovitch is offline
Member
 
Join Date: Sep 2010
Posts: 30
Thanks for your reply! Instead of the image I want to use a camera window, not a static image.
Reply With Quote
  #4  
Old 02-15-2011, 11:21 AM
kovitch kovitch is offline
Member
 
Join Date: Sep 2010
Posts: 30
All I want to do is something like this:

Code:
LeftWindow = viz.addWindow(pos=(0.125,0.75),size=(0.25,0.5))
RightWindow = viz.addWindow(pos=(0.625,0.75),size=(0.25,0.5))
And then disable the MainView. I know that this is impossible, so I'm looking for another way to do this.

It has to work as the image I posted before: A black area and two Viewports. The left view is meant to be shown to the left eye and the right view only to the right eye. The content of these two viewports is meant to be different.

Any tip?
Reply With Quote
  #5  
Old 02-15-2011, 11:27 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Try the following script:
Code:
import viz
viz.go()

viz.MainWindow.setView( viz.addView(scene=viz.addScene()) )

LeftWindow = viz.addWindow(pos=(0.125,0.75),size=(0.25,0.5))
LeftWindow.stereo(viz.STEREO_LEFT)

RightWindow = viz.addWindow(pos=(0.625,0.75),size=(0.25,0.5))
RightWindow.stereo(viz.STEREO_RIGHT)

viz.add('gallery.ive')
Reply With Quote
  #6  
Old 02-15-2011, 11:33 AM
kovitch kovitch is offline
Member
 
Join Date: Sep 2010
Posts: 30
Thumbs up

Exactly want I wanted! Thanks very much.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
stereo vision with nvidia 3d vision mina5500 Vizard 2 10-23-2010 08:53 AM
comparing data between 2 continous frame and stereo vision cyclonseye Vizard 1 08-02-2010 12:28 PM
question about NVIDIA 3D vision Weihua An Vizard 5 08-02-2010 06:49 AM
emagin stereo vision quadro fx 570 smith11235 Vizard 5 08-05-2008 12:01 PM
Positioning objects: center johannes2 Vizard 2 02-12-2008 02:56 AM


All times are GMT -7. The time now is 11:33 AM.


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