WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-02-2015, 07:44 AM
g.vannan g.vannan is offline
Member
 
Join Date: Jul 2014
Location: India
Posts: 8
Exclamation anaglyph effect at front view of cave

hi,
when i set anaglyph effect on three side. i m getting effect on only front view ,not left and right......need help to sort out the problem..

code:

viz.go(viz.STEREO_HORZ)

#Change stereo to Anaglyphic
viz.MainWindow.stereo(viz.ANAGLYPHIC)

# Declare constants defining the CAVE dimensions
W = 3.048 # 10 feet wide
H = 2.286 # 7.5 feet tall
D = 3.048 # 10 feet deep
W2 = W/2.0
C0 = -W2,H,0 # Front Wall: C1,C2,C5,C6
C1 = -W2,H,D # Left Wall: C0,C1,C4,C5
C2 = W2,H,D # Right Wall: C2,C3,C6,C7
C3 = W2,H,0
C4 = -W2,0,0
C5 = -W2,0,D
C6 = W2,0,D
C7 = W2,0,0

#Create front wall
FrontWall = vizcave.Wall( upperLeft=C1,
upperRight=C2,
lowerLeft=C5,
lowerRight=C6,
name='Front Wall' )

#Create left wall
LeftWall = vizcave.Wall( upperLeft=C0,
upperRight=C1,
lowerLeft=C4,
lowerRight=C5,
name='Left Wall' )

#Create right wall
RightWall = vizcave.Wall( upperLeft=C2,
upperRight=C3,
lowerLeft=C6,
lowerRight=C7,
name='Right Wall' )

#Create bottom wall
#BottomWall = vizcave.Wall( upperLeft=C5,upperRight=C6,lowerLeft=C4,lowerRight =C7,name='Bottom Wall' )

#Initialize graphics window
viz.go(viz.ANAGLYPHIC | viz.FULLSCREEN)

#Create cave object
cave = vizcave.Cave()

#Add each wall, make sure that they are ordered in the cluster software correctly to match this ordering
cave.addWall(FrontWall, mask=viz.MASTER)

cave.addWall(LeftWall, mask=viz.CLIENT1)

cave.addWall(RightWall, mask=viz.CLIENT2)
#cave.addWall(BottomWall, mask=viz.CLIENT3)

"""
Create tracker object that represents the users head position, specifically the center of the eyes.
The position provided by the head tracker must be in the same reference frame as the cave wall coordinates.
This will normally be a tracking sensor, but for this example we will simulate a head tracker
using the keyboard (WASD keys).
"""
head_tracker = viztracker.Keyboard6DOF()
head_tracker.setPosition (0.0,1.8,0.0)

"""
Pass the head tracker to the cave object so it can automatically update the
view frustums every frame based on the current head position relative to each wall.
"""
cave.setTracker(head_tracker)

"""
Create CaveView object for manipulating the virtual viewpoint.
cave_origin is a node that controls the position of the cave within the virtual world.
For example, if you wanted to simulate the cave user flying through an environment,
you would apply the transformation to the cave_origin node.
"""
#cave_origin = vizcave.CaveView(head_tracker)

"""
The cave_origin node is a standard Vizard node that you can apply any position/rotation to.
In this example we will create a keyboard/mouse tracker (using arrow keys) and link it to
the cave_origin node, allowing us to fly the cave user through the virtual environment.
"""
#origin_tracker = viztracker.KeyboardMouse6DOF()
#origin_link = viz.link(origin_tracker, cave_origin)

#Size of each window
WINDOW_SIZE = [1.0/3.0,1.0]

#Add each wall
frontWindow = viz.MainWindow
frontWindow.setSize(WINDOW_SIZE)
frontWindow.setPosition([1.0/3.0,1])
cave.addWall(FrontWall,window=frontWindow)

leftWindow = viz.addWindow(size=WINDOW_SIZE,pos=[0,1])
cave.addWall(LeftWall,window=leftWindow)

rightWindow = viz.addWindow(size=WINDOW_SIZE,pos=[2.0/3.0,1])
cave.addWall(RightWall,window=rightWindow)


"""
Create tracker object that represents the users head position, specifically the center of the eyes.
The position provided by the head tracker must be in the same reference frame as the cave wall coordinates.
This will normally be a tracking sensor, but for this example we will simulate a head tracker
using the keyboard (WASD keys).
"""
#head_tracker = viztracker.Keyboard6DOF()
#head_tracker.setPosition (0.0,1.8,0.0)



..........
Reply With Quote
  #2  
Old 02-03-2015, 06:29 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
If you're running a cluster see the CAVE clustered example. If you're running on a single machine with sub-windows for each wall see the CAVE single machine example.
Reply With Quote
Reply


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
Intermittent orthographic stereo projection problems AySz88 Vizard 10 02-17-2012 01:50 PM
[New here] Cave joy navigation esuna114 Vizard 2 06-11-2010 05:36 PM
Flipped floor in a CAVE shivanangel Vizard 1 03-10-2010 11:12 AM
View nlfrnassimi Vizard 4 03-12-2009 06:25 AM
keeping a 3d object in front of the view tavaksai Vizard 1 07-07-2004 10:33 AM


All times are GMT -7. The time now is 08:22 PM.


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