Call for Submission
NAB 2012 Best of the Best Show Reel
Submit your work today!
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Open Reality / DeviceOptical Frame Rate Capping...
  RSS 2.0 ATOM  

DeviceOptical Frame Rate Capping...
Rate this thread
 
46629
 
Permlink of this thread   Subscribe to this thread
avatar
  • Rich_H
  • Posted: 26 August 2010 11:43 PM
  • Total Posts: 6
  • Joined: 27 August 2010 05:50 AM


/*
* Depricated
*/

Hi,

I’m writing a DeviceOptical plug-in, and having looked through the previous topics on the board it seems they’re a constant source of confusion.

In my case, I wondered if there was any knowledge about capping the evaluation rate out there?  The SDK documentation lists two variables ”OpticalSamplingRate” and ”ForceOpticalSamplingRate” that look promising, but they seem to be ignored on execution.
With the below fragment in my plug-in’s ’FBCreate()‘ method I expect evaluation at 30 samples / sec

// Try to Frame Rate Cap at 30fps
OpticalSamplingRate = (double) 30.0 ;
ForceOpticalSamplingRate true ;

In practice I get 2500 samples / sec from a debug build, and 6000 samples / sec from a release build.

Does anyone have an idea how I could lock the evaluation to something a little more sensible?  Am I setting these Vars in the wrong place?

It’s not all bad news, when I started writing this program I was worried that my code would be too slow :)

Thanks in advance,

Rich

-------------

Post script:

Actually, scratch that.  I’ve got the evaluation rate down now.  Seems ”GetLocalTime()” in ”FBDeviceNotifyInfo” was returning 0; getting a time standard from ”GetSystemTime()” gives me real data which has calmed the evaluations down.  Strange, as I thought this only ‘watermarked’ the frames of data as they recorded in MB, and the frequency of Polling the Device was decided elsewhere.

Thanks again,

Rich



Replies: 0




   
  Settings Choose Theme color: