.GLTF vs .GLB (multiple actions from Blender)

Hi. I’ve been experimenting with this solution:

and this solution:

to export 1 .gltf or .glb file containing different ACTION clips exported from the NLA in Blender.

In Blender I have a human mesh that has an “idle” 150 frame loop and a “skating” 250 frame loop.

I tried both suggested workflows from the previous websites, but when I try to read the .gltf into another software, it only exports frame 1 of “idle”. There is no action named “skating” as a secondary action in the file.

In Blender I am exporting with default options for .gltf

Also, I noted that the article suggested that I should place all the animations one behind another in ONE single NLA track. I don’t know how useful would that be, since the .gltf format allows for multiple (separated) animation clips. If I put all my action clips into 1 single NLA, would they be still be recognized as individual animation tracks on the .gltf viewer? or in my game engine (Tyrano Builder)?

Please let me know how to correctly export multiple NLA action clips to be included into the .gltf final export.

Thanks!
-Pierre.

Not as many Blender users here as on Blender’s own Stack Exchange (https://blender.stackexchange.com/) or Forums (https://blenderartists.org/), but looks like you’ve got it figured out in animation - How to export multiple NLA Actions to gltf? - Blender Stack Exchange?

1 Like

Hi Donmccurdy! Wow, I didn’t think you’d reply on this thread. :smiley:

Thank you for your fantastic posts on GLTF exporter threads in this forum.

I kid you not, I had to read for 4 entire days everything I could find about blender-gltf/glb exporting from google results; and it was 3 straight nights of trial/error, so I hope everyone coming to this thread can refer to this video as part of the solution:

The reason why it took me a long time, it’s because most of the questions/answers that were given all around google were “casually” made and they were done by enthusiasts with little or no experience on the technical side. They were already doing inadequate non-standard workflows in Blender, so the answers almost were a “patch” to a run-around solution.

For everyone else reading this thread, interested in a concrete step-by-step procedure (and troubleshoot), check out this thread I did on Blender stack exchange

to have a dedicated place where users can also address technical issues between Blender and the exporter.

Thanks again, Donmccurdy for your reply on this thread. I hope to continue contributing here on these forums for Blender-related technical aspects.
Kind regards.

Pierre.

1 Like

Awesome writeup – complete and very detailed, thanks for sharing that! :+1:

… name all your NLA tracks according to the name of the action clip in it and make sure you don’t “star” any of them …

While it probably doesn’t affect the workflow you’re interested in here, naming the NLA Tracks to match the Actions is not strictly necessary. Another workflow people sometimes use is when the scene has several different objects, each animaated by different Actions, and you want all of these actions to play at the same time, i.e. as part of the same glTF animation. For this case you can give all of the NLA Tracks the same name (e.g. “GlobalAnimation”) even if the Actions have different names, and they’ll all be exported to one glTF animation with that name. Because a single Blender Action can’t animate multiple objects, this can be useful to create a single glTF animation that does.

1 Like

Indeed, while I was doing my research I found out that some people (for any given reason) have different “pushed down NLA actions” from different separated objects, and that it is possible for .GLTF as a format, to compound those different object actions into a single “action” (aka SAME TRACK NAMES).
For game development in general, it’s often desired that there is only 1 object driven by shapes or bones or a combination of both. Why? We don’t want to address “robot leg_L, robot knee_L, robot feet_L” with 3, 4 etc… actions in code.
Hence, the optimal way to do this is to have one single object (robot_leg_L) with all appropriate parts (knee, foot, etc…) merged together, and drive it by actions from the bones.
Of course there will be cases for //specific// cases where this will not be the norm, but like I mentioned: coding wise, the code will want to access 1 object and all its properties from the same model/actions.

Regardless, I know that people reading this thread will be glad to know .GLTF and .GLB are versatile even if the pieces are separated, to be converged at the time of export into a single NLA track with the same names. :+1: