WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-12-2008, 01:27 PM
mspusch mspusch is offline
WorldViz Team Member
 
Join Date: Feb 2003
Posts: 224
Is the 120Hz projector the only device that's connected?
Is it s depthQ projector?

if yes, then we have one sitting here at Worldviz for trouble-shooting.

the only problem i have seen with the depthq is that it will NOT render stereo in 120 HZ if you have another device connected. so make sure that the ONLY device conneted to the graphics card is the projector.
Reply With Quote
  #2  
Old 09-15-2008, 10:10 AM
michaelrepucci michaelrepucci is offline
Member
 
Join Date: Jul 2008
Posts: 53
I do have a second device (an standard analog monitor) connected to the video card, which has two independent DVI-I ports. After much exploration, it seems, however, that the video card bandwidth is narrower than I had expected. So turning down the resolution on the projector helped solved the problem, as did putting both devices at the same refresh rate (there must be some savings at the GPU).

So now viz.go(viz.QUAD_BUFFER) runs fine at 120 Hz. But I started to do some frame time logging with the following code:
Code:
import viz
import viztask

def onFrameUpdate(event):
	global frameTime
	global frameInterval
	frameTime += [event.time]
	frameInterval += [event.elapsed]

def collectFrames():
	print 'Collecting frame times ...'
	viz.callback(viz.UPDATE_EVENT,onFrameUpdate)
	yield viztask.waitTime(60)
	print 'Finished collection.'
	viz.callback(viz.UPDATE_EVENT,None)
	yield writeFile()

def writeFile():
	file = open('frametime.txt','wt')
	file.write('frameTime = (')
	for i in frameTime:
		file.write(str(i)+',')
	file.write(')\n')

	file.write('frameInterval = (')
	for i in frameInterval:
		file.write(str(i)+',')
	file.write(')\n')
	
	yield file.flush()
	file.close()
	viz.quit()

frameTime =[]
frameInterval = []

viz.go(viz.QUAD_BUFFER)
viztask.schedule(collectFrames())
and I found that the time stamps were not very precise. I had expected them to be nearly rock-solid, since the frames should be locked to the refresh rate. It this, possibly, due to Windows processes interrupting the Vizard execution, or can I not expect Vizard to run completely real-time?
Reply With Quote
  #3  
Old 09-15-2008, 11:03 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
How precise do you expect the timing to be? When I log the elapsed time between frames it doesn't fluctuate more than 1ms from the expected rate. Either way, Windows does not run at real-time rates so your process can be interrupted by other processes at any time. You can tell Windows to give your process a real-time priority by using the following code:
Code:
import win32process
import win32con
win32process.SetPriorityClass(win32process.GetCurrentProcess(),win32con.REALTIME_PRIORITY_CLASS)
However, this can cause unexpected problems and might not actually help.
Reply With Quote
  #4  
Old 09-15-2008, 11:36 AM
michaelrepucci michaelrepucci is offline
Member
 
Join Date: Jul 2008
Posts: 53
If the maximum deviation from the expected value were within 1 ms I would be happy. On my system it is not. At 120 Hz, the expected frame interval is around 8.333 ms. On one run, where the frame rate never noticeably dropped below 120 Hz, I get values in the range from 3.862 ms to 21.94 ms (see the attached histogram). Granted the variation is small; the standard deviation is 0.579 ms. (In the attached figure, counts above 20 are truncated.) However, the longer and shorter values, if accurate, suggest that frames are occasionally being dropped or skipped.
Attached Thumbnails
Click image for larger version

Name:	framerate.jpg
Views:	4471
Size:	32.8 KB
ID:	271  
Reply With Quote
  #5  
Old 09-17-2008, 01:08 AM
tobin tobin is offline
WorldViz Team Member
 
Join Date: Feb 2003
Posts: 251
Your code includes calls to disk every frame, right? You should try storing your timing info into an array and then after a set number of frames, write/flush to disk.
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
Linking problems with Live Character Frank Verberne Vizard 5 06-04-2008 11:42 AM
frame rate lock? kgarr Vizard 1 02-23-2006 12:34 PM
quad buffered stereo? halley Vizard 2 10-19-2005 12:28 PM


All times are GMT -7. The time now is 04:45 AM.


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