Closed dodgyville closed 5 years ago
What was the scale/units in blender? Most likely your mesh is very very tiny in Godot.
in fbx the armature scale is 0.01, when I manually set it to 1 and export, the issue still exists, so it is a bug.
In Godot when I move all the mesh out of Skeleton node, they all got correctly visualized. Mostly likely the issue exists in bone weights exporting, (I remember Godot will not display a mesh under Skeleton but with no bone weights).
So from #44 are we saying that the bounding box of the parent node of mesh should be larger than the children AABBs?
I had a quick look at doing it in gdscript using a code snippet like this:
func _ready():
var armature = get_node("Armature") # a Skeleton
var new_aabb = armature.get_aabb()
for mesh_instance in armature.get_children():
new_aabb = new_aabb.merge(mesh_instance.get_aabb())
armature.aabb = new_aabb
but Skeleton does not appear to have an bounding box at all
ah seems my fault, yes, Skeleton has no AABB, ( I will delete that comment
checked this issue again,
in the Armature node there is no bone listed
when play the bone animation, you can see the bounding box move
so I suppose the bone is imported but not get displayed, maybe some bone names cause issue?
I have the same error when using Mixamo animations (a lot of people do) and not only this exporter if you try Better Collada or any other exporter it will happen.
I got this error when I imported the model (a lot of other similar errors and another ones that I couldn't get because of the short history on the windows console):
ERROR: get_bone_rest: Index p_bone=6 out of size (bones.size()=0) At: scene/3d/skeleton.cpp:496 ERROR: mesh_surface_get_index_array: Condition ' surface->index_array_len == 0 ' is true. returned: PoolVector<uint8_t>()
Actually if you change the parent of the mesh to be the root it will show-up so the Skeleton is the problem here
I made it work
The problem was in the naming of the armature, bones and vertex groups, I made a small Python script that you can run in Blender to change the names of the bones and vertex groups:
import bpy
for rig in bpy.context.selected_objects:
if rig.type == 'ARMATURE':
for mesh in rig.children:
for vg in mesh.vertex_groups:
#print(vg.name)
new_name = vg.name
new_name = new_name.replace("mixamorig:","")
#print(new_name)
rig.pose.bones[vg.name].name = new_name
vg.name = new_name
for bone in rig.pose.bones:
#print(bone.name.replace("mixamorig:",""))
bone.name = bone.name.replace("mixamorig:","")
for action in bpy.data.actions:
print(action.name)
fc = action.fcurves
for f in fc:
#print(f.data_path)
f.data_path = f.data_path.replace("mixamorig:","")
One of the errors was:
ERROR: add_bone: Condition ' p_name == "" || p_name.find(":") != -1 || p_name.find("/") != -1 ' is true.
At: scene/3d/skeleton.cpp:375
So as long as the name isn't empty or contains ":" or "/" it should be fine. I really don't have that mush time and it's 23:22 here, so please do the PR yourself.
Ok, I will do it, thank you very much!
You are welcome, I hope you can do the same for the Better Collada exporter as well as it's more used.
I would create an issue in collada exporter, I don't familiar their code base so I am able to solve it immediately
Fixed by #105.
Well done :D
Yes, I don't want to add to everyone's emails but it's so great this is fixed!
2023, bug still not fixed, item is invisible, even though AABB box shows like its okay
@Favkis Same is still have the sane issue, meshinstance is invisible when it has a skeleton.
I'm using bone names such as ss1, ss2, ss3, aa1, aa2, aa3...., origin, Transformer.
But I'm still having invisible sketal meshes
Hi,
I have an fbx that I open in blender - it looks fine and the animation (of a woman standing idle) plays fine. When I open the escn file in godot created by this exporter, it all appears to load (the layers and animationplayer are there) but the meshes are invisible. The animation seems to play but I can't see the character. The meshes (body, shoes, clothes, etc) are visible in the inspector but not in the editor window. Any suggestions appreciated!
Here's the fbx file (~36mb) https://drive.google.com/open?id=1-2tAMi7XbvjBJqJDYc8mPVgJZnRXR1B2