How to time codes, frames, and physics steps per second relate to each other?

I am having difficulties to understand the concepts. I find at least 4 places in Omniverse where I can set up a kind of “rate”:

  1. In the layer properties under “Time codes per second”
  2. In the physics scene under “Time steps per second”
  3. In the timeline extension “FPS”
  4. In Movie Capture under “Frame rate”

My expectation was that “seconds” is something consistent in Omniverse. For example, I have a simulation with 600 physics time steps per second. I set time codes per second and FPS/Frame rate to 60. I render the simulation using movie capture capturing frames 0 to 1000.

Then, I set timecodes per second/FPS/Frame rate to 24 and capture frames 0 to 1000 again. When I compare the 2 clips, the movements in the first one are about twice as fast as in the second one.

This confuses me.

How do I need to set the frame rate so the movie capture represents the simulation in a realistic way?
Well, actually I was expecting that I could change the frame rate for the capturing at will and always have a realistic video clip.


The simulation stepping (“Time steps per second”) should be independent here, thats strictly defining the substepping for physics simulation.
However to be confused even more there is a fifth parameter that you are missing. There is also Min Simulation Frame Rate (should be in physics settings window). Now this defines the lower bound how much physics should substep, otherwise the simulation would continuously slow down the whole application if the general frame rate is not high enough.
The default is 30, so if your FPS drops below 30fps, physics will start discarding steps to not slow down even more.
This is probably what is happening with the observation above, with FPS 60 all should be simulated as expected, with FPS 24 you are starting to drop simulation frames. Try to change the Min Simulation Frame Rate below 24 to see if it fixes the behaviour.

I did exactly what you suggested, and the movements in the captures movies seem to be mostly equal between 60fps and 24fps.

Unfortunately, the result looks extremely unstable and wiggly. It seems to me that the simulation is discarding steps (but I cannot prove it). My expectation is that when rendering with movie capture, the simulation is done in the most precise way, without discarding any steps. Would that not mean, that I have to set the min simulation frame rate to 600, too? When rendering (or batch simulating) I am not interested in realtime rendering, but in the most precise, reproducable simulation.

Setting Min Simulation Frame rate and physics scene Time Steps Per Second to the same number will make sure that only one step for physics is done with every update that physics get.
If you want to have all the simulations steps done every frame, then you should set the Min Simulation Frame rate to 1.
This way nothing gets discarded and physics will do enough substeps based on the wall time provided by the update.
In case of a movie capture that should be fixed time 1/60 if fps is used. In which case physics would do 10 substeps, with each step at 1/600.
Movie capture will just make sure that the frame update time is fixed (1/60 or 1/24), but physics simulation should step based on the stepping defined by Min Simulation Frame Rate and the Time Steps Per Second on a physics scene.

So you are saying the behaviour between Movie capture and regular simulation (play) does differ?

This seemed to do the trick, at least for movie capture. After setting min sim frame rate to 1, the speed seems independent of the fps set in movie capture.

What is strange though, is the following: In this setup movie capture rendered about 3 frames within one second, but when I leave the min sim frame rate set to 1 and start the simulation by clicking “Play”, without capturing, the viewport drops its FPS to about 0.5, and the UI gets really laggy. Sure I can increase the min simulation frame rate to my desired viewport FPS, I am just wondering why this happens, as the capturing works much faster than 0.5 FPS.



Yes, I think thats exactly kind of the issue I was trying to point out.
If you run with the movie capture, movie capture will send exact delta for physics to step, say 1/60. That will always do 10 substeps with physics stepping frequency 1/600.
Now if you have the same physics setup and press play, physics will get the current frame time, this will not be 1/60 but what ever the frame rate is, since it drops to around 1 fps, you get 1 sec passed and you dont limit the number of steps for physics so physics will try to do those 600 steps and it will be even slower and slower, that why the Min Simulation Frame Rate is introduced to limit the maximum of steps physics does, so that the perf does not get torpedoed.

Now I got it. Thanks that helps a lot!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.