Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualMatias Goldberg

Posted 13 July 2013 - 01:54 PM

am i to understand it that for example, the physics simulation is on time step 4.5, and he uses that .5 left over to interpolate between time steps 3 and 4, to come up with values for timestep 3.5, then draws the interpolated state of the simulation at time step 3.5 when the simulation is _actually_ at timestep 4.5?

The simulation is never at 4.5. It's either at 3, or 4.
The graphics however can use interpolation to estimate how it should look at 3.5
The physics is in time step 4, the graphics is at 3.5, and he takes steps 3 & 4 to interpolate and show how 3.5 looks, even though the simulation is actually at timestep 4
 

IE drawing based on an estimated past state, not the true current state of the simulation? And always draws ~1 frame behind whats actually going on?

Yes and yes.
 

i take it that the physics engine and render engine running slightly out of phase temporally (~1 frame) has no major impact on gameplay?

There's a lot of research and debate over that (particularly for action and fighting games). It's not set in stone. Note however that this is relative: even if you don't interpolate, if the physics processing is much faster than the graphics, it will always be one frame behind what the physics is, because the physics needs to be calculated before it can be displayed, and while it is being displayed, the physics from the next step are already being calculated and almost done.

Games with very high framerate in their physics don't really need to interpolate, but the higher the framerate, the lower the latency (being one frame behind) is noticed: because being one frame behind means being less time apart the higher the framerate (at 60fps, we're 16.6ms behind, at 30fps we're 33.33ms behind); so games that are simulated at high Hz don't care anyway
 
 

and without interpolation, you get the temporal aliasing of the occasional 2 steps per frame when the accumulator rolls over?

You forgot the most important reason, and that is choppy framerate. Many engines simulate at 30hz or 25hz but display at any framerate. Thus if your gpu is fast enough to display at full 60fps, you really don't want it to look at 30fps (or even 25fps!).
With interpolation, it looks smooth (assuming your gpu can handle the load).
 

and interpolation is really only required for deterministic games ?

Interpolation is never required, it's an optional, very handy feature.
Second, interpolation is used in games with fixed timesteps (as opposed to variable timesteps, where it is pointless to interpolate).
Fixed timesteps are necessary to have deterministic games, but not all games with fixed timestep are deterministic. Interpolation can be used in both cases.
And any game with variable timestep can not be deterministic.

#1Matias Goldberg

Posted 13 July 2013 - 01:51 PM

am i to understand it that for example, the physics simulation is on time step 4.5, and he uses that .5 left over to interpolate between time steps 3 and 4, to come up with values for timestep 3.5, then draws the interpolated state of the simulation at time step 3.5 when the simulation is _actually_ at timestep 4.5?

The simulation is never at 4.5. It's either at 3, or 4.
The graphics however can use interpolation to estimate how it should look at 3.5
The physics is in time step 4, the graphics is at 3.5, and he takes steps 3 & 4 to interpolate and show how 3.5 looks, even though the simulation is actually at timestep 4

IE drawing based on an estimated past state, not the true current state of the simulation? And always draws ~1 frame behind whats actually going on?

Yes and yes.

i take it that the physics engine and render engine running slightly out of phase temporally (~1 frame) has no major impact on gameplay?

There's a lot of research and debate over that (particularly for action and fighting games). It's not set in stone. Note however that this is relative: even if you don't interpolate, if the physics processing is much faster than the graphics, it will always be one frame behind what the physics is, because the physics needs to be calculated before it can be displayed, and while it is being displayed, the physics from the next step are already being calculated and almost done.

Games with very high framerate in their physics don't really need to interpolate, but the higher the framerate, the lower the latency (being one frame behind) is noticed: because being one frame behind means being less time apart the higher the framerate (at 60fps, we're 16.6ms behind, at 30fps we're 33.33ms behind)
 

and without interpolation, you get the temporal aliasing of the occasional 2 steps per frame when the accumulator rolls over?

No, you forgot the most important reason, and that is choppy framerate. Many engines simulate at 30hz or 25hz but display at any framerate. Thus if your gpu is fast enough to display at full 60fps, you really don't want it to look at 30fps (or even 25fps!).
With interpolation, it looks smooth (assuming your gpu can handle the load).
 

and interpolation is really only required for deterministic games ?

Interpolation is never required, it's an optional, very handy feature.
Second, interpolation is used in games with fixed timesteps (as opposed to variable timesteps, where it is pointless to interpolate).
Fixed timesteps are necessary to have deterministic games, but not all games with fixed timestep are deterministic. Interpolation can be used in both cases.
And any game with variable timestep can not be deterministic.

PARTNERS