https://gravatar.com/userimage/16926726/2de44cb9918f08ff7f430244b10bf37b.jpeg?size=256

gowinder's Blog

Excerpt: Coordinate Interpolation in Skeletal Animation

Excerpted from: Advanced.Animation.with.DirectX

Here’s where using key frames comes in handy. Suppose you want to calculate the orientation of the bones at a specific time say, at 648 milliseconds. That time just so happens to fall between the second and third keys (148 milliseconds past the second key). Now, assume that the two transformation matrices represent the orientations of each bone in the animation.

1
D3DXMATRIX matKey1, matKey2;

By taking each key and interpolating the values between them, you can come up with a transformation to use at any time between the keys. In this example, at 648 milliseconds in the animation, you can interpolate the transformations as follows:

My Dopod Phone Got Stolen — So Depressed!

It got stolen yesterday while I was changing to the 527 at Xinhua Road. Ugh — I’d only paid 1 instalment, and there are 23 more to go. Ugh!

It’s all because I was too sleepy. All I could think about was getting on and grabbing a seat. The guy in front was so obviously covering for the guy behind him, and I was still set on squeezing past!

From now on I can’t be groggy when I get on the bus — find a seat first, then sleep!

Wuhan's Traffic Has Become a Bottleneck for the City's Growth!

Yesterday a colleague gave me the bad news: Changqing Road is being closed — closed for 52 days — and the 800,000 people over there will all be funnelling through Gusaoshu Road, which I pass every single day.

God. It already took me nearly two hours to get from Hankou to Wuchang for work every day, and now this. Ugh.

Sure enough, I didn’t get home until after eight last night. What a jam. I really don’t know how a developing country like China has so many cars!

TinyXml's Saving Encoding Problem

Every day brings some new weirdness. The editor was almost finished when I discovered that TinyXml’s save function doesn’t let you choose the encoding format at all! We read everything as UTF8, but then it saved as ANSI. I’m still looking for a solution!

The Very First Post!

The world keeps speeding up. If I don’t catch this train before I turn thirty, I’m afraid there won’t be another chance later on!

I hereby declare this blog officially open!

D3D8 Windowed Mode Vsync! Fighting Tearing!

Today the boss said the DEMO felt a bit choppy. One look and it turned out to be a vertical sync problem! So I added the vsync attribute to HGE’s parameters — no dice. A bit of reading and I found that D3D8 can only do vertical sync in fullscreen mode. Almighty Microsoft, are you doing this to us on purpose?

I dug up some references. This lack of sync is called Image Tearing. Roughly: the data the graphics card sends to the monitor goes row by row, not a whole screen at a time, so when the card has sent part of a screen and you write data into video memory at that moment, the image ends up misaligned!