Skip to main content
GameDev.net gamedev.net
🔒 Locked

Animated models are... throbbing

Started by NimrodPSI Mar 12, 2013 at 2:13 AM 1 replies 1.9k views
Original Post
NimrodPSI
NimrodPSI

Hello! So as the title says animated models I am loading and displaying are throbbing slightly; growing larger and smaller like a breathing lung. As cool as it is, dosen't look good on solid objects and is rather cartoony.

A little info, im using C++ and OpenGL with GLSL. Loading the models and animation data with my own routines and pre-comuting the animation(skeletal animation) and storing all frames of the model as individual VBO's. I then bind two sets of vertex data to my shader(s), the current frame and next frame, and interpolate between the two smoothly over time using the GLSL fuction mix() and a uniform float for the interpolation value. Then the W component of my vertex is set to 1 in the shader before calculating gl_Vertex. If i take away the mix() function and flash frame to frame there is no pulsating effect, so I beleive my data to be correct going in.

I know the way I am storing and sending information is just awful and bad, but in practice it should work fine... right?

Thank you!

C0lumbo
C0lumbo

I've seen a similar effect when using a lerp function instead of nlerp/slerp on quaternions. Could you check that your quaternions are normalised?

NimrodPSI
NimrodPSI

Well I'm currently not using quaternions, and I think that may be part of the problem... mellow.png I am using euler angles in rotation matricies that stack with translation matricies, and pre-caulculating and storing all frames to an array of VBO's. So all the verticies are already translated/rotated, then lerped to the next keyframe on that joint for all frames in between. Then my shader receives two VBO's to then again lerp between for smooth animation. From my understanding this is (somewhat) wrong, and I should use lerp for the translation interpolation and slerp/nlerp for rotation based interpolation. Is that correct?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.