Jump to content

  • Log In with Google      Sign In   
  • Create Account

Problem with md5 viewer


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 Chris528   Members   -  Reputation: 186

Like
0Likes
Like

Posted 26 October 2013 - 08:19 AM

Hey, I recently coded an md5 viewer using opengl + sdl2 in windows and have come across a really strange issue. My geometry kind of explodes on certain frames, so one of the first things i tried was disabling interpolation, which "fixed" my problem. I've been stuck on this for a couple of days now. I'm currently using a model and anim straight from doom 3 so I know they aren't corrupt.

 

Here's a vid of what's happening.

 


Edited by Chris528, 26 October 2013 - 08:21 AM.


Sponsor:

#2 Sponji   Members   -  Reputation: 1355

Like
1Likes
Like

Posted 26 October 2013 - 09:45 AM

Just a guess, I think your quaternion interpolation is broken. Maybe try disabling it and see if everything else works correctly?


Derp

#3 Chris528   Members   -  Reputation: 186

Like
0Likes
Like

Posted 26 October 2013 - 10:17 AM

Just a guess, I think your quaternion interpolation is broken. Maybe try disabling it and see if everything else works correctly?

Yeah, it has to do with the interpolation of the joint orientations. One thing i tried is glm::mix( joint0.m_Orient, joint0.m_Orient, fInterpolate ); That stopped the glitching but causes twitching as it isn't really being interpolated anymore.  It appears that there is something wrong with the way glm::mix is handling things. I even checked the value of  fInterpolate and that seems to be working correctly. Here's the current code.

finalJoint.m_Orient = glm::mix( joint0.m_Orient, joint1.m_Orient, fInterpolate );

Edited by Chris528, 26 October 2013 - 10:26 AM.


#4 Chris528   Members   -  Reputation: 186

Like
0Likes
Like

Posted 26 October 2013 - 11:21 AM

I figured out the issue, I tried out an earlier version of glm and it worked. It appears that glm::mix is implemented in a different manner than newer versions of glm.



#5 Sponji   Members   -  Reputation: 1355

Like
1Likes
Like

Posted 26 October 2013 - 11:52 AM

Just in case if you didn't notice, there is glm::slerp in the newer versions. The older versions of glm probably used mix as slerp.


Derp

#6 Chris528   Members   -  Reputation: 186

Like
0Likes
Like

Posted 26 October 2013 - 05:35 PM

Just in case if you didn't notice, there is glm::slerp in the newer versions. The older versions of glm probably used mix as slerp.

Thanks, I did notice that there is glm::slerp, I just hadn't really tried it as there was a problem having to do with there being two versions of glm::slerp having the same arguments, one defined in quaternion.hpp and another in compatibility.hpp. I fixed it by making a small hack to compatibility.hpp. (added an additional namespace inside of glm). After getting that out of the way, the program compiled and everything worked. Thanks for your help, I appreciate it.


Edited by Chris528, 26 October 2013 - 05:36 PM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS