1
\$\begingroup\$

I'm trying to properly play an animation done in Blender 2.8 inside my OpenGL application. When the animation is running, it happens that at some particular frames, some parts of the 3D model "disappear", by "disappear" I mean that they obviously get relocated at some incorrect position and rotation in the 3D scene.

The model is an FBX file.
Has anyone got an idea about what could be the possible reasons for that?
Maybe some wrong settings in Blender?

Thanks in advance!

\$\endgroup\$
2
  • 2
    \$\begingroup\$ You might want to add a link to a youtube video or an animated gif showing the issue. \$\endgroup\$
    – Vaillancourt
    Nov 6, 2019 at 1:13
  • \$\begingroup\$ Do the errors always happen on the same frames & are things that go wrong the same across more than one test (i.e. does part X always get relocated to position Y)? \$\endgroup\$
    – Pikalek
    Nov 6, 2019 at 4:51

2 Answers 2

0
\$\begingroup\$

I think I've found something, the idle animation got some really really slight offsets of movements, I've printed the matrices being used on frame 1 and for all the parts not appearing on screen the matrices got the following pattern:

(0 0 0 a) (0 0 0 b) (0 0 0 c) (0 0 0 1)

Those are glm matrices (column major).

Maybe due to the really slight difference of movement between two consecutive frames, the float precision isn't enough and the value is set to zero ?

Thus, all I got to do is doing some larger movements for the corresponding keyframes ? I'll try that if that works, but I'm still open to some suggestions !

\$\endgroup\$
0
\$\begingroup\$

sorry I'm a bit late !

Yes the errors did always happened on the same frames for the exact same model parts across each test iterations, but I've managed to solve the issue.

So basically, I took a glance at the number of position, rotation and scaling keys, and I had noticed that some keys were missing. For instance, the idle animation must have 48 keys, and for the parts that caused troubles, some animation keyframes were missing. In my code I did a trick for that case, to just take the last known computed keyframe as the current keyframe and chain multiply it with all its parent joints matrices, but it didn't worked great.

So I eventually found on the web a nice addon for Blender which properly export 3D Blender files to the collada file format, and then all the keyframes were set the right way and all the weird things were gone.

\$\endgroup\$
1

You must log in to answer this question.