When I export the whole animation I have created from 3ds Max to gltf everything exports fine and runs exactly as it should in the babylon sandbox viewer. When I set a series of animation groups and export to gltf only some of the animation groups have all of the added models while other animation groups are missing some models or all of them.
I have tried a number of different settings such as selecting ‘export non-animated node targets’ and (Animations Groups) Export non animated objects but the problem still remains.
When I select ‘do not optimize animations’ the groups all export as they should, but the file size is way too big.
Does anyone know why this might be? I have the same models carrying over in to the different animation groups but they only animate in some of them.
The file seems to export fine from Maya but I have a few settings that won’t translate over properly so need to export this from Max idealy
Currently, I have a 3dsMax test scene where I have a few objects in a scene, with different shapes, all assigned to different animation groups, where all groups and objects are exported with animation. Can you please share your scene? I’m probably missing your use case in my testing, I assume that our key frame culling during our optimization pass is causing this.
Hi @Drigax, thanks for getting back to me. I am using the latest version of the exporter that was released a couple of days ago.
Here are the 2 exported versions of the file in gltf format. You will see 01 exports fine but this is the entire animation, whereas when I split things in to animation groups not everything gets exported in each group. It could be the key frame culling like you mentioned as when I tell the export not to optimize the animation everything is exported fine but the file size is far too big.
I can send you the Max file directly if that helps?
Its difficult to work backwards from the export result to pinpoint the issue. If you can’t share your scene publicly, then feel free to send it to whoisdrigax@gmail.com.
It looks like we’re culling the animations used to keep some of the static elements visible in the scene.
For example, in the first animation group, the elements are scaled up from 0.001 to appear into the scene, then remain at scale 1 for a number of animation groups until they are hidden again in later groups.
I believe that our optimization pass is improperly excluding these animation tracks, and even neglects the “Export Non-Animated Objects” toggle that I would assume should prevent this culling.
EDIT Export Non-AnimateObjects is intended for including objects that don’t have any animation track to have a static animation generated for their inclusion in the animation group.
Therefore our objects in the gltf export remain at scale 0.001 in the animation groups (their “default” scale since that is their initial scale at frame 0) that they are not animated in. I’ll see if I can simplify the repro as I look into this closer.
Looking closer, its not that the animations are culled, so much that there are no scale keyframes in the range of some animation groups for the missing objects.
Talking over possible fixes with @PatrickRyan, I think the best way to fix this is to bake out the start and end frame of each animation track for each object included in the animation group to ensure that the scene intent is preserved.
As a workaround for now, manually keyframing the start and end frames of your animation groups for the animated objects in the scene should ensure that they are exported as expected.
I’ve managed to get this working on some of the animation groups by setting keyframes for the scale and position of the various models however its not working for all of them. The first 10 groups are all fine but after that it’s not working.
If I export my file as an FBX is there an easier way to set animation groups using another software that won’t encounter this issue? Is there no way I can just export the whole animation as a single group (as that plays out fine) and my devloper triggers a set range of key frames, or must animation groups be set up for this to work?
Thanks a lot for all of your help guys. I’ve just about managed to get this file working but there was a lot of hacking and trial and error to get it to work correctly. It would be great to have a better solution so I can tidy this file up and use that pipeline going forward. If I need to make any changes to this project its not going to be fun!
I wanted to follow up on this conversation, as I’ve made a number of improvements to our animation export process since then. I retested the scene you shared with me today, and it appears to export much more accurately, the object scale appears to be properly preserved between groups, and animations look to be exported properly.
If you have the time to try our latest release to confirm this, please feel free
Thanks for getting back to me about this and testing my scene again. I’ve just tested it and you’re right, a lot of issues seem to be fixed now. I’m starting a new job in the new year so will test it properly on that and let you know how I get on. Thanks again for all of your work on this.
Hello,
I am using the latest version of the exporter and I am having problems with culling and animation groups. I have a character who takes out a tablet. I am hiding the tablet by giving it a value of 0.02 and it remains at a scale of 1 for a number of animation groups until it is hidden again later.
Please could you specifically guide me how to solve this issue and what values to key in for the scale.