Page 1 of 1

Export Anim

Posted: Thu Oct 10, 2024 8:07 am
by Simon
You can export animations to a txt file format:

// List of objects and their hierarchy, more dots means deeper group nesting
// (Use "Anim/Unique Names" to rename all your objects with a unique name each to avoid collisions)
Scene
.Cube1
..Cube2

// List of sub-animations called Clips
Clips
// Name of Clip
c Clip1
// Starting frame number
s 0
// Number of frames in clip
n 24

Matrices
// Object Name
o Cube1
// Inverse Bind Pose matrix - transform from world space into bind pose
i 1. 0. 0. 0. 0. 1. 0. 0. 0. 0. 1. 0. -1.26e-002 2.73e-002 0. 1.
// Matrix for each frame
m 0.707 -0.707 0. 0. 0.707 0.707 0. 0. 0. 0. 1. 0. 1.26e-002 -2.73e-002 0. 1.

// Note: Curvy uses 'Y-Up' rather than 'Z-Up' so you may need to swap Y & Z to make it work as expected in your engine

So for each frame you multiply the vertices by Inverse Bind Pose * Frame Matrix to get the final animated position

Re: Export Anim

Posted: Tue Jan 21, 2025 9:57 pm
by Garcia
Hi Simon,
Would it be possible to also export this animation text file (if animation exists) when doing a batch export (Extras->Export and Bat) in the same folder that the export is written to?

Sorry, I just realised GLTF export and I can just export GLTF which includes animation and per vertex information which I really also want.
I've already coded an OBJ parser but I'll move to GLTF.

Cheers
Mike.