# Is it possible to correctly catch up a particle system simulation based on long delta time between many frames?

I have a particle system with a physics simulation integrator based on delta time (elapsed time between frames) which is implemented on the GPU in a compute shader. I also have a frustum culling system implemented on the GPU. The frustum culling gives me the possibility to cull away draw calls and the dispatch calls for the particle simulation. The culling of draw calls works well, I also don't have a problem with culling the particle simulation when the camera is looking away.

My problem happens when I want to catch up the particle system simulation when the camera looks back at the particle system after looking away for a while. What I do is accumulate the time passed while looking away, then I resume the simulation using all that accumulated time. The problem with this approach is that if the simulation is anything but a simple constant velocity change in one direction, the simulation just doesn't look the same as if the simulation was playing one frame delta at a time.

From what I have read this is a common issue with using time elapsed between frames to simulate physics. What I wonder is if there's a different approach that can actually allow me to correctly play back many seconds of simulation (let's say 20 seconds) the same as if it was played one frame delta at a time?

• That depends on what exactly you are simulating. For example, when you have a particle system where particles attract particles, then extrapolating that systems state is an np-complete problem which can not be solved in any way except a step-by-step simulation. Commented Dec 10, 2020 at 9:01
• As Philipp says, there's no one-size-fits-all solution here. But there are solutions to many special cases. To get good answers specific to a case of interest for your game, we'll need more details from you about what one, specific effect you want help fast-forwarding in this way. If the answers you get for that effect don't work for the next, different simulation effect you want to fast-forward, then you can ask a new question about that effect next. Commented Dec 10, 2020 at 12:32