Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Interpolation frame delay
#2
(24-09-2018, 09:30 AM)Sewy24 Wrote: Hello,

as the problem is still valid, and we have no answer from your side for almost 3 months, I'm making new thread to remind and not 
to abuse previous thread with different purpose.

--
we put together simple scene to demonstrate our situation (will send it to the support@virtualmethodstudio.com).

In the example, there is a Cube - to simulate the player. 
We are simulating movement on simulaton rig and using our own interpolation - simple Lerping/Slerping over time (attached in the example) to apply smooth movement to the render rig because of networking.


Description of the scene:
a. Moving the simulaton rig in fixed update.
b. Own interpolation of the a. and copying the transforms to the render rig.
c. Cloth object position is copied from the simulation rig "bone" in fixed update.
d. Cloth simulation in fixed update with your interpolation.


Observation 1. We have to use skinned mesh with "fixed particles" being substitued with "skin radius" set to 0, to avoid jump-following of the "fixed paricles" - not happy with that, because we cannot use "fixed particles"
Observation 2. Your interpolation seems to be dependant on "Fixed Timestep" 
- when 0.02, the interpolated cloth is working fine, 
- on lower value, the interpolated cloth is few steps ahead of our interpolation
- on higher value, the interpolated cloth is s few steps behind of our interpolation


Could you please take a look on the example and recommend setting for this setup?
If you could share your interpolation script with us, we will be more able to identify the delay issue.

Thanks

Hi Jan,

Fixed particles are not interpolated, which I believe it is what led you to use skin constraints instead. There's a workaround for getting fixed particles to be affected by interpolation though: in ObiActor.cs, move all the code inside OnSolverStepBegin() to OnSolverFrameEnd() (which has an empty implementation currently).

Regarding the fixed timestep issues you mention: unlike fixing a particle, constraints do not act "instantaneously". Constraints act iteratively, bringing particle positions closer to their target position with each iteration. Higher time steps will make constraints converge more slowly (i.e., have a harder time getting particles to their target position), lower timesteps will improve convergence.

By changing the fixed timestep and using constraints, you're effectively making constraints more/less effective. It's not interpolation what is affected by the timestep, but the simulation (and skin constraints are part of it). That's why cloth is always ahead/behind the cube, unless you hit the timestep sweetspot.

Using fixed particles does not result in this issue, so I'd recommend using the workaround I described.
Reply


Messages In This Thread
Interpolation frame delay - by Sewy24 - 24-09-2018, 09:30 AM
RE: Interpolation frame delay - by josemendez - 24-09-2018, 11:13 AM
RE: Interpolation frame delay - by Sewy24 - 25-09-2018, 11:08 AM
RE: Interpolation frame delay - by josemendez - 26-09-2018, 03:02 PM
RE: Interpolation frame delay - by Sewy24 - 04-10-2018, 04:58 PM