Return to “Technical”

Post

Dev Log Question

#1
First of all i love your dev logs :D

But i have a little question about your simulation and rendering solution.

http://imageshack.us/photo/my-images/26 ... ntsjf.png/

If we want to render the second last frame in this picture, the current state of our world would be 2 and the previous would be 1.
We don't have state 3 jet, so how do you render a blended version of state 2 and state 1 for a frame that is rendered after state 2?
Or is state 3 the current and state 2 the previous one, then you have simulated state 3 before you render the frame and it would not work with a 30 hz simulation lock(as far as i can imagine).


Im sorry for grammar mistakes(english is not my first language)

I hope someone is able to answer my Questions.
Post

Re: Dev Log Question

#2
Josh uses interpolation. He takes state1, state2 and does like: "current state is state2 + (state2 - state1) / 2" (if he uses simple linear interpolation and if the current rendering time is exactly half way between state2 and state3). Other words: he tries to predict the current state (or state3) based on state1 and state2. I hope that makes sense.
Post

Re: Dev Log Question

#4
tossha wrote:Josh uses interpolation. He takes state1, state2 and does like: "current state is state2 + (state2 - state1) / 2" (if he uses simple linear interpolation and if the current rendering time is exactly half way between state2 and state3). Other words: he tries to predict the current state (or state3) based on state1 and state2. I hope that makes sense.
Not quite, that would actually be extrapolation! It's a good idea, but the problem is that the extrapolated state may not align with reality (in fact, in the event of any net force whatsoever, it is guaranteed not to). Then we would see a discontinuity when the extrapolation rolls over to the next frame and is replaced by real data (i.e., we would see jerkiness all over again!)

Otas, the answer to the question is that states 1 and 2 would be blended in the picture you drew. So indeed, the simulation always lags a frame behind the rendering, but in practice it's not even noticeable, especially at 30Hz.
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford

Online Now

Users browsing this forum: No registered users and 8 guests

cron