1
$\begingroup$

This blend file contains only the default cube. I've create two Actions: MyTrans that implements only a translation & MyRot that implements only a rotation.

Each of those Actions, I've 'pushed down' to create an NLA strip on NLA tracks called MyTranT and MyRotT.

enter image description here

So far, so good. If I export the cube to a gltf 2.0 file, and then load the exported file in a viewer, I can see the two tracks, identified by trackname & play either one, or both at once.

The problem occurs when I restructure what's in the NLA editor a bit. Here, I've added a copy of the rotation action to the MyTranT track.

enter image description here

I can play either track within the Blender IDE. In particular, playing the MyTranT track results in a translation followed by a rotation.

However, if I now export as gltf, only the single action track seems to get exported.

I'm using 2 online gltf viewers:

https://gltf-viewer.donmccurdy.com/

https://sandbox.babylonjs.com/

both behave the same way in this regard.

Both actions have users, MyTrans has 2 and MyRot has 3. Neither action is lost when the blend file is closed & reopened. I've also tried giving each action a fake user.

enter image description here

makes no difference though, the track containing 2 actions doesn't seem to get exported.

For both these situations, I've tried exporting as glTF Embedded and examining the text output.

In the first situation, where there is only a single action in each NLA track, the only names visible in the text output are those of the tracks, ie MyTranT and MyRotT. The action names appear nowhere.

In the second situation, where one track contains 2 actions, it's a bit mixed up. For the track containing a single action, ie MyRotT containing action MyRot, the name 'MyRot' is visible in the output. For the track containing 2 actions, ie MyTranT, the name of the first action on that track, ie 'MyTrans' is visible in the output but the track name is not.

So my question is, why doesn't this work?

Blender 2.83.3 on Linux

$\endgroup$
  • 1
    $\begingroup$ The exporter can only use a single strip per NLA track, yes — the limitation is tracked in github.com/KhronosGroup/glTF-Blender-IO/issues/763. $\endgroup$ – Don McCurdy Aug 5 at 23:21
  • $\begingroup$ Not sure how to indicate here that a comment has answered my question. $\endgroup$ – rgh Aug 6 at 9:20
  • $\begingroup$ Sure, I've added an answer. $\endgroup$ – Don McCurdy Aug 6 at 17:12
1
$\begingroup$

The exporter can only use a single strip per NLA track — the limitation is tracked in github.com/KhronosGroup/glTF-Blender-IO/issues/763.

| improve this answer | |
$\endgroup$
0
$\begingroup$

I think you need to mark every action as "need to be exported". Lets try to be clearer.

In Blender, an action (or a material, or whatever) that is not assigned to something is considered as lost instead you specify otherwise. You can specify you want to keep it by clicking that Shield icon : enter image description here

If you don't do that, that datablock won't be saved with your blend file ; and sometime, won't be exported (well, that depends of the exporter script).

If you don't want to struggle with a glTF viewer and just want to check if the data is indeed included in the file, you can export in "glTF Embended" and just check it with a text editor ! Simply search the name of your action and see if it appears in the file. The file structure is JSon so it's (more or less) human readable.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks but this makes no difference. I've edited the question accordingly. $\endgroup$ – rgh Aug 4 at 8:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.