godot-blender-exporter icon indicating copy to clipboard operation
godot-blender-exporter copied to clipboard

Some meshes are invisible after export if they have skeleton parent

Open Antokolos opened this issue 5 years ago • 9 comments

OS:

WIN

Godot version:

Godot 3.0.6 Godot 3.1 RC1

Blender version:

Blender 2.79

Issue description:

Please open cage_1.blend Notice object named cage_1_scanner inside cage_1_armature image Export it to Godot via godot-blender-exporter Open escn file in the Godot editor Notice that cage_1_scanner is invisible image As a workaround for this issue, you can manually drag cage_1_scanner outside the skeleton cage_1_armature image Maybe I incorrectly placed this issue and it should be placed into main issue tracker of the engine itself, instead of godot-blender-exporter. If it is so, I can resubmit the issue. Or if you can move the issue manually yourself, it will be great too.

Minimal reproduction project:

cage_1.zip test31.zip

Antokolos avatar Mar 10 '19 11:03 Antokolos

can reproduce on all the godot versions. The issue is actually any children mesh of a skeleton node, if the mesh has no bone weights, it does not get displayed.

It can be easily reproduce by have a fine skeleton and then create a child mesh instance: Screen Shot 2019-03-12 at 01 05 30

I am a little curious is there some technical difficulty to display mesh in this scenario? if it does, then it could be a bug of the exporter, the exporter need to handle the parent relationship of Skeleton childrens

Jason0214 avatar Mar 12 '19 08:03 Jason0214

Does it work if the mesh is not child of the skeleton? In that case, it should probably be "just" documented.

QbieShay avatar Mar 13 '19 09:03 QbieShay

It would work if the mesh is outside the skeleton. I would tag it as 'bug', I think the exporter could have some detecing and parent changing for these kind of mesh nodes to fix it up.

Jason0214 avatar Mar 13 '19 18:03 Jason0214

@jason0214 i don't think the exporter should do magic on its own. I'd rather it be Documented or configurable

QbieShay avatar Mar 13 '19 19:03 QbieShay

Same here.

BTW: Can we just import a skeleton with animation, then add our own meshes and mount on the bones in godot?

ad184hl avatar Jun 03 '19 01:06 ad184hl

I think it happens because the mesh defaults to having ".." as a path to the skeleton. If the "skeleton" property is set to anything else (such as ".", "../.." or even "/root/"), the mesh shows again.

bojidar-bg avatar Jun 03 '19 11:06 bojidar-bg

As Jason mentions, this occurs if the weights don't exist, and attempting to deform a mesh with no weights results in it not displaying.

However, there's a "cheat" to avoid this issue: delete the "armature" modifier. This makes the "skeleton" property be it's default .. (the bone attachment), so it doesn't try to deform. but because it's still the child of the bone, it follows the transformations correctly.

sdfgeoff avatar Sep 18 '19 14:09 sdfgeoff

@sdfgeoff you are amazing, thank you! I could not figure out why my toy soldier had no hat!

songangel72 avatar Sep 12 '20 19:09 songangel72

By the way, this doesn't happen just when you try to deform a mesh with no weights. If the vertex group for that bone has no vertices assigned to it, that part of the mesh is not displayed at all. Not in the 3d editor, and not in the game. This is definitely a bug and is still present in Godot 3.2.3.rc6. Removing the empty vertex groups will crash the importer.

I would consider this a bad one too because the individual parts of the mesh will never be displayed correctly unless a bone has weights that touch that part of the mesh.

songangel72 avatar Sep 12 '20 20:09 songangel72