NVIDIAGameWorks / FleX

Other
664 stars 100 forks source link

Different FPS (g_dt) setting causes very differnt simulation behaviour #14

Closed ghost closed 7 years ago

ghost commented 7 years ago

When I change the "g_dt" var in main.cpp the buoyancy scene gets disturbed

//  g_dt = 1.0f / 60.0f; // ORG  60fps

    g_dt = 1.0f / 30.0f;  // TEST  30fps

I think the simulation result should be very similar on final video which uses 15fps, but the modified main.cpp with g_dt= 1.0 / 30 (=30fps) version is very different SOLVED.

sschirm commented 7 years ago

Not sure I can follow. It seems normal that bigger time steps make the simulation less stable. Are you aiming at doing everything at 30 Hz? Did you try to use more iterations per step?

ghost commented 7 years ago

I doubled g_numSubsteps to 4 and it seems to work now also for 30fps. Thanks! The final result in my case will be a 30fps video and so for reducing overhead and saving resources I run the simulations on that rate.