godot-blender-exporter
godot-blender-exporter copied to clipboard
Some meshes are invisible after export if they have skeleton parent
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
Export it to Godot via godot-blender-exporter
Open escn file in the Godot editor
Notice that cage_1_scanner is invisible
As a workaround for this issue, you can manually drag cage_1_scanner outside the skeleton cage_1_armature
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:
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:
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
Does it work if the mesh is not child of the skeleton? In that case, it should probably be "just" documented.
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 i don't think the exporter should do magic on its own. I'd rather it be Documented or configurable
Same here.
BTW: Can we just import a skeleton with animation, then add our own meshes and mount on the bones in godot?
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.
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 you are amazing, thank you! I could not figure out why my toy soldier had no hat!
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.