View Single Post
  #1  
Old 03-10-2010, 09:33 AM
shivanangel shivanangel is offline
Member
 
Join Date: Feb 2006
Location: New Jersey
Posts: 182
Exclamation Flipped floor in a CAVE

Hello again ,

I am running Vizard on a 4 wall CAVE system at Rowan University.

I have read your CAVE file and have tried to create one of our own
for us to use with a Left, Right, Front and Bottom setup.

However, I consistently run into an issue where the bottom node seems
to be flipped. We are also running a PPT tracking system and an Inertia
Cube 3 wireless sensor.

I have setup the CAVE's center to be the literal center of the CAVE (height, width /2)


Code:
import viz
import vizcave
import viztracker
import math
import VectorHelper



def CaveInit():
	#Center is always assumed to be the red box on
	#the floor of the CAVE (wallpaper)
	#Use the PPT Tracker Offset command to fix
	#where the true center is if adjustments are needed...
	
	#Y Height should always be positive

	#CAVE Dimensions in Meters
	CAVE_W	= 3.048
	CAVE_H	= 2.286

	#Half Cave Dimensions
	CAVE_W2 	= CAVE_W / 2.0	# Half width
	CAVE_H2		= CAVE_H / 2.0	# Half height
	#CAVE Vertices 
	# c0   c1   c2   c3
	# *----*----*----*
	# | L  |  F |  R |
	# *----*----*----*
	# c4 c5|  B |c6 c7 
	#      *----*
	#      b4  b7
	#
	C0 = -CAVE_W2,CAVE_H,-CAVE_W2
	C1 = -CAVE_W2,CAVE_H,CAVE_W2
	C2 = CAVE_W2,CAVE_H,CAVE_W2
	C3 = CAVE_W2,CAVE_H,-CAVE_W2
	C4 = -CAVE_W2,0,-CAVE_W2
	C5 = -CAVE_W2,0,CAVE_W2
	C6 = CAVE_W2,0,CAVE_W2
	C7 = CAVE_W2,0,-CAVE_W2

        #CAVE FLOOR OFFSET DUE TO THE DEPTH NOT EQUALING THE WIDTH
	OFFSET = 0.762

	B4 = -CAVE_W2, 0, -CAVE_W2 + OFFSET
	B7 = CAVE_W2, 0, -CAVE_W2 + OFFSET

	# 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=B4,
								lowerRight=B7,
								name='Bottom Wall' )


	# Create cave object
	cave = vizcave.Cave()
	#cave.setIPD(0.06)
	#cave.setNearPlane(0.15)
	cave.setFarPlane(1000.0)
	
	viz.eyeheight(0)
	
	# Add walls to cave
	cave.addWall(FrontWall, mask=viz.MASTER)
	cave.addWall(LeftWall, mask=viz.CLIENT1)
	cave.addWall(FrontWall, mask=viz.CLIENT2)
	cave.addWall(BottomWall, mask=viz.CLIENT3)
	cave.addWall(RightWall, mask=viz.CLIENT4)
	
	return cave

I don't know if it is not proper to set the center of the CAVE as my origin.
The PPT system is set up "close" to that (not perfectly, but around head height) and a + Z-offset.

Thank you for any help you can give and I hope
you can help reduce my eye-strain from the bottom flipped node!

This seems to happen from time to time and it is annoying as all heck!

~George
Reply With Quote