Jump to content

Exporting combined animations using NLA Editor in Blender to BJS

Recommended Posts

Hi guys.

When trying to create new animations by combining animation in the NLA editor and exporting to BJS, the mesh is getting deformed on playing any animations. I'm pretty sure I'm messing something up. Please have a look and let me know what I'm doing wrong when combining animations in NLA editor and exporting to BJS. 


I have attached the blend files before and after creating a new animation in NLA editor. The new animation created in NLA editor is named 'combined.walk.punch.action'. Most of the time I'm seeing the 'Venom' character from the movie, if I combine actions in NLA editor and bake them into the armature.

Not able to attach the blend files directly to the site. Sharing the links.

I genuinely hope, I can export NLA combined animations BJS. It would save a lot of work.

Before NLA - https://drive.google.com/open?id=1YFXEUBle7hsBRkjOHu2rJyo4CxCW926a

After NLA - https://drive.google.com/open?id=1UP2g3j7HaxWQfPjc0XmJ0646OgWvD8Ue


Please let me know what is the issue. Thanks!

Link to comment
Share on other sites

The exporter exports Actions.  If you combine actions using NLA Editor, I see another action being created.


Is 'combined.walk.punch.action' not being exported?  Look at & post your export .log file to see.  I see a lot of other actions.  Are you set to export 'Only Currently Assigned Action' or all.


If doing all & not starting via the named range, all this other stuff is going to get run too.

Link to comment
Share on other sites

Hi JCPalmer.

What I was going to post orignally to @JCPalmer query

I was under the impression that only baked actions would get exported into the .babylon file. So, I was baking only the actions that I would want in the browser. All the actions whose names are in small case are baked into the armature and the capital case actions are not baked. I could see the same in the getAnimationRanges() method on the armature returing in the browser. I was able to get the baked actions in the browser.

What I was trying to do was, have one action per part of a combo, so that I can blend different action together in the browser to create different combos. Is this a wrong approach? This seemed to be working until I tried creating new animations in the blender by combining existing actions in the NLA editor. After which all the animations get deformed. I'll attach the log and the .babylon file. 

Log - https://drive.google.com/open?id=1tz3AjtDzS6z37OguQVUynVBdzq3RFpu3

babylon - https://drive.google.com/open?id=1FOOnDgvDtDqn-BMb-vQbccIDSFp83mOy

What actually happned now - 

For some reason the combined.walk.punch.action is working now when I exported it. Earlier it wasn't :( . It looks like the issue was happening because I was editing new actions in the NLA editor along with the existing action strips added. I swear, I tried all permutation & combinations before I gave up sough expert advice. @JCPalmer please confirm whether the Blender to BJS workflow I am using is a correct one?

Edited by sCarr25
Link to comment
Share on other sites

Well, glad your actions are coming through now.  I kind of doubt whether multiple AnimationRanges can be blended inside of BJS.  Remember an AnimationRange is just a named frame range inside of the one animation that can be exported.  I actually use my own exporter with connection to my own JS animation system, so I do not do this.  I might not be the person to ask what can be done with this stuff upon import.

You can call each animationRange on demand.  There is also something called an AnimationGroup in BJS.  I have no idea what it is for.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...