Weird behaviour with GLB animated model

Hi,

I am loading an animated model as a GLB file with four different animations made in Blender.
When I preview the model in model-viewer : Model Viewer, everything shows up and works fine.
When I import the model into Playcanvas’s Editor, there are no console errors.
If I try to preview the model (selecting the Model/Source file) in model-viewer through Playcanvas, it loads properly and I can select each animation and verify they are fine.
However, if I select an individual animation (e.g. Idle.glb) it shows up broken in model-viewer, with meshes, materials, etc all zero. Same occurs on launching the game.

image
image
image

Is this something simple and obvious to fix?

Thanks!

@slimbuck

@slimbuck @mvaligursky : This is not limited to a single model. On a fresh project, the models which were previously working, have also stopped working.

Can you please let us know if there was some very recent change to the UI/GLB import process?

Happy to add you to a test project with the models present.

Thanks.

Probably not! :smiley:

Is it possible to give us access to the project you’re using? We’d need a repro to investigate.

Thanks!

Thanks for getting back @slimbuck . I have added you to the test project I created last night.
There is a Readme.md (Type:Text) which lists all the steps to replicate the issue.
Please let me know if you need any additional info.
We are using artist services to provide the assets, so if you have a specific question for them, I am happy to relay it to them.

Thanks.

@slimbuck : Please let us know if you need any additional information. We are somewhat dead in the water till a resolution is found.

Thanks.

This is expected because it’s just animation data. There’s no mesh, materials, textures etc in this GLB. Just node hierarchy and animation data.

When you import the original GLB into the editor, the editor splits it into separate assets. Materials, textures, animations, renders, templates.

What’s the actual problem you are having here? Maybe this video can help? Importing your first Model and Animation | PlayCanvas Developer Site

CC @slimbuck for the deeper investigation into your project

1 Like

@yaustar : Thank you for looking into this.
I have shared a sample project with @slimbuck (Due to the seat limitation of the licence, I cannot add more than one).

Apologies if the problem is not apparent in a straightforward way but here are two videos that may help.



First one is when the test project is launched. The animation graph is set to cycle through the idle pose and then the walk pose for about 5 sec each. However, instead of proper walking and idle, only the hair mesh moves.
However, the model-viewer video (second one) shows that there is proper idle and walk animation set up for the entire model.

Thanks!

Offhand, it looks like a setup issue with the anim component or render components in the template

Your issue is likely to be the same as what was in this video https://youtu.be/bGvoTYnsogc?si=2u3noF29z35r0O9V

If not, the video has some steps/advice on how to debug it while you are waiting for @slimbuck

Note: while it’s me in the video, I’m no longer with PlayCanvas to provide support.

@yaustar : Yes, overall that seems to be the root cause (the import process not setting the root bone hierarchy correctly). However, is there a better way to fix this (for e.g. in Blender?). We have two models which work fine, but remaining four don’t. And manual edits in Playcanvas to those four are a bit of trial and error. We would like to identify a permanent fix and guide the artist to make relevant changes.
@slimbuck : Any help/advice would be greatly appreciated.
Model which works with hierarchy matching what we see in Blender:


Root bone auto-resolved :

Model which doesn’t work and the Armature node is absent :

but present in Blender:
image
Root bone not auto-resolved :

One additional observation, when any of the animations is clicked while in Editor, the Editor shows this message:
image

I don’t know if it’s a bug with the import process of PlayCanvas or not. @slimbuck will have to take it from here

1 Like

I don’t think it’s a bug. In case the anim component is not added to the root of the animation hierarchy, the rootBone property needs to point to it … so that we know where to search for the bones and similar.

@mvaligursky : Apologies, but in this case, root of the animation hierarchy appears to be the Template. What would be the fix in Blender if we wanted to ensure that Playcanvas sees the anim component under the root of the animation hierarchy?

I’m not sure, I’m not familiar with Blender. I’d suggest to compare the model that works vs model that does not work. How is the hierarchy set up, where is the mesh in the hierarchy.

@mvaligursky @slimbuck : We have compared the working versus non-working character files in Blender and there is no visible difference in the hierarchy. The only difference is how the Playcanvas Editor is treating the two files. Every single viewer/validator we have tested allows us to play the animations correctly. Only PlayCanvas Editor processes the file differently to generate a template without the armature node and assigns the meshes to the template as root, minus a root bone.
At the moment, we are able to get the models working partially by using a variation of the workaround suggested by @yaustar.
However, we could not understand what the difference is and thus we could not instruct the artist on what changes to make.

Thanks.

Does it mean that you cannot get some models to work in the project at all? What does the partially means here? What is the issue if you set up the rootBone properties?

@mvaligursky : Partially means, we are able to work with the current lot of models, but we have no way of knowing if the next batch of models delivered by the artist will work or not. We were relying on the Playcanvas model-viewer to confirm that the model works as proof of delivery, but since the Playcanvas Editor is treating the imported version differently, we are left with a lot of uncertainty. The reparenting was not straightforward either, took us a while to figure out that the root-bone needs to point to the template and not the mixamo:hips node.

Thanks for you help!

1 Like