Godot Version
4.3
HI, I’m basically trying to export an animated mesh from Godot into my own file format, for use in my own direct3d program. I have the non-animated mesh part working fine, with proper vertex data.
but when I try to extract bone poses from animation I can’t seem to do it right.
here is my process:
- in script instantiate a scene that contains the model
- get mesh data using the MDT… this all works
- play model animation, stopping every few frames to update data …
- for each “frame” save global_bone_pose for each bone as 2 vectors, rotation and position … I do this for about 8 frames to get a good approximation the of key frames.
now, I can save all the data, load it into me own program an render the mesh fine. but when I try to use the bone transforms, they are clearly wrong. I know my vertex shader works fine, so I think problem is in the actual bones matrix data.
there’s a lot I don’t know about how Godot handles stuff under the hood… is the global_bone_pose actually the final concatenated transform for each bone? I know its relative to the skeleton, but since I’m not transforming the skeleton, I shouldn’t need to worry about this, i dont think…
Any ideas here? thanks…