0

I am trying to make a movie from my bullet demo. To do that, I want to store an image every timestep, and create a movie using ffmpeg.

I need the simulation to advance only one step at a time. For that, I am doing

m_dynamicsWorld->stepSimulation(0.005,0);

And after that, I store the scenario (I later create an image of the scenario). At the end of the animation, I am creating a movie using as timestep 200 fps (1/0.005). This should give me the real time animation, but instead the animation is a little bit slow.

Any ideas?

Sara
  • 833
  • 2
  • 9
  • 21
  • 200 fps? Are you sure your system can play the movie at that speed? How do you know it's slow? What are you comparing it to? – Piotr Praszmo Jun 26 '12 at 16:20
  • That probably depends on your definition of "real time" and on the code not shown for `stepSimulation`, generating the image, and any ffmpeg API calls to generate the movie ... 30 fps is the usual target frame rate for screen capped movies although I've seen some as low as 4 fps in machines with lousy video cards. – AJG85 Jun 26 '12 at 16:23
  • The movie is not actually at 200 fps, but I tell ffmpeg that my images are 200 per seconds. The movie is actually at 24fps. I can see the animation is slow because the gravity is slow... – Sara Jun 26 '12 at 16:24
  • I am generating an image everytime I call stepSimulation – Sara Jun 26 '12 at 16:25
  • I just meant there isn't enough information here to give you an answer there is barely enough to make guesses. – AJG85 Jun 26 '12 at 16:28
  • Why are you generating 200 fps video only to convert it to 24 fps? Are you sure ffmpeg is dropping frames, not just slowing it down? – Piotr Praszmo Jun 26 '12 at 16:30
  • If you're using 9.8m/s^2 as your acceleration due to gravity it probably will look slow, just because the 'arcade'-like gravity we're used to seeing is much higher. Add a clock to your renders to see if it runs in real time or if the issue is something else. – bames53 Jun 26 '12 at 16:31

0 Answers0