WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rating: Thread Rating: 12 votes, 4.67 average. Display Modes
Old 05-05-2006, 10:30 AM
enkeli enkeli is offline
Join Date: Mar 2006
Location: Isla Vista
Posts: 24
black outs

I am running my world, and it will black out on the rendering for 1-6 seconds at a time. There are no error messages associated with this, and the program keeps on running fine in the background during the black outs (I can hear the sound files being played etc). What could be causing the black outs and what can I do to stop them? I have 8 avatars in the world along with "gaze" lines. The lines are updated every tenth of a second to show where they are looking. (Using math.tan in the calculation of where they are looking). It blacks out even when I'm not moving around in the world, just watching from a stationary point.
Reply With Quote
Old 05-08-2006, 07:15 AM
halley halley is offline
Join Date: Oct 2005
Posts: 27
Not a lot of information to go on. How do you see the gaze lines if it's blacked out? Are there any models near the camera (like the head or avatar you're viewing from) which you could hide as a test? Any other specifics you can offer?
Reply With Quote
Old 05-09-2006, 08:50 AM
enkeli enkeli is offline
Join Date: Mar 2006
Location: Isla Vista
Posts: 24
The world contains 8 avatars and 8 lines ( see as to how I made the lines ). There is a timer that makes the lines update every tenth of a second so that they are aligned with where each avatar head is looking. When the screen blacks out, it's entirely black, can't see anything. The camera viewpoint has been in several locations about the room when it has blacked out. I've moved around (using the mouse) while it's blacked out and I will end up in a new place when it's no longer blacked out, but the simple moving doesn't seem to stop it. I did not have this problem with this world prior to adding the gaze lines. Therefore, I'm guessing the black outs have something to do with the program not being able to handle updating the lines so frequently.

Perhaps there is a better way to indicate the gaze of the avatars?
Reply With Quote
Old 05-09-2006, 10:32 AM
farshizzo farshizzo is offline
WorldViz Team Member
Join Date: Mar 2003
Posts: 2,849

If your script isn't too complex, would you mind posting it or sending it to me at ? Are you using any plugins or tracking sensors in your script?
Reply With Quote
Old 05-09-2006, 12:05 PM
enkeli enkeli is offline
Join Date: Mar 2006
Location: Isla Vista
Posts: 24
The script is somewhat long, I can e-mail you the file, but here are the gaze relevant parts:

def loadGazes():
	global people, peopleGaze, peopleGazeInit
	for i in range( NUMBER_PEOPLE ):	
		[ x, y, z ] = peopleAvatars[ i ].getpos()
		fromCenter = i - NUMBER_PEOPLE/2
		degrees = 7 * math.fabs( fromCenter )
		if( fromCenter > 0 ):
			degrees = 360 - degrees	
		y = 1.4
		viz.startlayer( viz.LINES )
		viz.linewidth( 1 )
		gazeOrigin = viz.vertex( x, y, z ) 
		gazeEnd = viz.vertex( x + math.tan( math.radians( degrees ) )*GAZE_LENGTH, y, z + GAZE_LENGTH ) 
		gaze = viz.endlayer()
		gaze.color( viz.BLUE )
		gaze.alpha( 0.3 )
			gaze.visible( False )

		peopleGazeInit.append( [ x + math.tan( math.radians( degrees ) )*GAZE_LENGTH, y, z + GAZE_LENGTH ] )
		peopleGaze.append( gaze )
def updateGaze():
	global peopleGaze, peopleGazeInit
	for i in range( NUMBER_PEOPLE ):
		if( not i == PARTICIPANT_POSITION ):
			[ yaw, pitch, roll ] = peopleAvatars[ i ].getbone( 'skel_Head' ).get( viz.EULER )
			peopleGaze[ i ].vertex( 1, peopleGazeInit[ i ][ 0 ] + math.tan( math.radians( yaw ) )*GAZE_LENGTH, peopleGazeInit[ i ][ 1 ] - math.tan( math.radians( pitch ) )*GAZE_LENGTH, peopleGazeInit[ i ][ 2 ] )
def timer( timerID ):	
	if( timerID == TIMER_UPDATE_GAZE ):
viz.callback( viz.TIMER_EVENT, timer )
viz.starttimer( TIMER_UPDATE_GAZE, 1.0/10.0, viz.FOREVER )
The avatars are computer controlled, the only person using an hmd is the participant and his gaze and avatar are invisible. But this blackout thing is happening without the hmd while just testing with viz.go(). This is all I'm importing for use in this script:

import vizinfo
import whrandom
import math
if viz.running():
	import sid 		#has to be imported for the gamepad
Reply With Quote

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

All times are GMT -7. The time now is 05:54 PM.

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