Problem with the skeleton of exported gltf model

We tried downloading the converted gltf from a few of our model and ended finding a weird behaviour.
As you can see in the screenshot below, when viewing the model elsewhere I obtain those weird, long white line.

These lines seems to affect the pivot point of the object which make it far from the 0,0,0.
I only obtain these line when using a gltf model thats been converted from sketchfab.

Any idea what is causing this?

Hello Pierre :wave:

Worry not, as those is not really 3D data embedded in the GlTF.

Having access to your models (as a staff member), I checked the chair of your second screenshot in https://gltf-viewer.donmccurdy.com/ (if you did not know about it, it is a very useful viewer to check for GlTF files validity), and saw no difference from Sketchfab at first:

But opening it in Blender revealed what you were experiencing: the “skeleton” option in PlayCanvas apparently does not display the “skeleton” as is often meant in 3D - an ensemble of “bones” linked together made for animating models - but rather the hierarchy of your scene.
See the following screenshot from Blender which reveals the meshes and their hierarchy (I’ve highlighted in yellow the lines showing the relations between empty nodes and your meshes, which are the ones shown in PlayCanvas) :

The fact that the pivot-point is not centered in the exported GlTF is not linked to those lines, but rather to the objects you have used an opacity material on. By default, most viewers set the pivot-point at the center of all the meshes of the scene, even the ones which you don’t see as they are transparent (but the viewers don’t consider this).

This behaviour is the same on Sketchfab, and you’ll notice it if you double-click somewhere in the viewer or press the space bar while looking at the model: the view will seem to not be centered, because it is actually centered on all the meshes of the scene (easy to see by turning the wireframe on for instance):

By the way, if you did not know about bones and skeleton, I’d definitely advise you to turn on the “Bones” filter in the model inspector for this model for instance to have an idea of what this means:

Hope this will give you some clues :crossed_fingers: !

Cheers,
Loïc.

2 Likes

I honestly just learnt so much from reading that

1 Like

What are the purpose of theses lines that are showing the relations between empty nodes and our meshes. Why Sketchfab generate theses lines in the first place?

Hello again Pierre :wave:

Sorry if I wasn’t clear in the previous message.

We don’t actually generate the lines (there is no information about them in the GlTF), those are just artifacts showing you the relative positioning of your 3D models in the scene.
The screenshot below for instance corresponds to your original FBX model imported in Blender, where you can see that the cushion’s origin is far from its geometry and parent node, which you called “fjord”. Note that this corresponds to one of the lines you notice in PlayCanvas.

If you really wanted to not have them displayed anywhere, then you would have to change the origins of the impacted meshes in your 3D software, doing an operation such as you can see on the GIF below:

Those lines in PlayCanvas are just a consequence of the mesh placements in your original FBX file, and act as a helper to show you where your meshes are located in regards to their parents.
I don’t think you should bother about them, but if you really wanted to not have them displayed in PlayCanvas when toggling the “Skeleton” option, then you would have to reupload your original FBX file after having changed the origins of your meshes, by making them correspond to their respective parent nodes (“fjord”, “pouf”, “sphere”).

Hope this helps :crossed_fingers:
Cheers,
Loïc.