Controlling time in Python-Ogre?

AndrewDowning

21-03-2011 12:10:39

Hey there Python-Ogre folks,

Just getting into Python-Ogre and it looks awesome so far.
I'm wanting to simulate 3d scenarios and output(to external application) the 2d camera view as a series of images where I know the underlying ground truth about what's supposed to be in the scene at all times.
Reading through the documentation and code samples, I can see how the data extraction might be accomplished using render-to-texture, then extracting the texture data, but I would also need to control the frame rate. At a fixed video rate (30 fps), this could be easy enough (scenario 1 for me); I'd have vsync=on and just output every second frame on my 60fps screen setting. However, sometimes I will want to throttle it all back to less than real-time (scenario 2) because the thing I want to feed it to isn't up to dealing with 30fps yet.
Is there a way to do this? It seems a lot like doing slow-motion scenes.

I've read in the general Ogre forums about slow-motion control and some library version called "Detritus", but I have no idea how that might apply in the Python-Ogre cut of things. I'm using 1.7.1 version of Python-Ogre. 1.7.2 doesn't look to me like it's all there yet.

Any suggestions appreciated.

...AndrewD...

dermont

21-03-2011 14:52:13

Maybe try renderOneFrame(fixed_time_interval)

http://www.ogre3d.org/forums/viewtopic.php?f=5&t=58065

You can run a quick test by updating Basic_Demo.py(_build_scene) with code from another demo, say from Demo_CameraTracking.py(_createScene) .