- Home /
Skinned Mesh Renderer and Mesh filter appearing on a bone
I have a really weird problem importing an .fbx file in Unity 3.0 Iphone on mac. The Skinned Mesh Renderer and Mesh filter component is placed on one of the bones, instead of the mesh.
It's exported from 3dsMax and is very simple, basically:
mesh_blast
bone_root
|--bone_1
|--bone_2
the mesh_blast object is skinned 100% to bone_1. When imported into unity, the asset shows up in the hierarchy as:
Blast
|--bone_root (FBXImporter)
|--mesh_blast (FBXImporter)
|--mesh_blast (Mesh)
|--Take 001 (animation)
When dragged into the scene view, the mesh filter and the skinned mesh renderer component is placed onto the bone_1, while the mesh_blast object is simply a transform.
Answer by Futurerobot · Oct 27, 2010 at 08:06 PM
Ok after a whole lot of testing it seems that there's a system to it, I just wonder if it's supposed to be like this.
If more than one mesh is exported in the max file. The skinned mesh component will be added to the mesh nodes in the scene. The mesh node will just be an empty transform node in the scene view.
If there's only one mesh, it depends on how many bones affect the mesh.
Two bones or less: The skinned mesh component will be placed on the highest bone in the hierarchy that the mesh is weighted to. (You can have more bones in the hierarchy, as long as the mesh is not weighted to any of them.) The mesh node will just be an empty transform node in the scene view.
Three bones: The skinned mesh component will be added to the mesh node.
What confused me was that I was getting mixed results, the question is basically if this is an intentional optimization of some sort or a bug? The objects appear to work with both placements of the skinned mesh component.
This page, very last paragraph, above where it says 'Hint' is an explanation: http://docs.unity3d.com/Documentation/Components/class-Skinned$$anonymous$$eshRenderer.html
Answer by thinkinmonkey · Dec 27, 2010 at 09:48 PM
FutureRobot, thanks a lot for your solution!!! Actually I can confirm what you find: if you export a mesh that is composed by separated pieces and they are all weighted by the same rig, there's no problem when importing. Thanks again for your precious efforts! ^__^
Answer by hbs-steve · Sep 19, 2012 at 01:13 AM
So I was having similar problems with exporting from Maya: I found that if you export a mesh of several pieces, you'd get the Skinned Mesh Render on the mesh, otherwise it appears on the bone. Even with the 3+ bone weight per vert, I was having this problem.
However, somehow I ended up exporting an FBX after I had opened up an FBX in Maya, so essentially, an FBX from an FBX, and when using that the Skinned Mesh Renderer appears on the Mesh.
Has anyone else ran into this? It's really bizarre and I've no idea what would be all that different between the two that this would be occuring. I'm not sure if it's how Unity's processing the fbx, or how the fbx itself is being exported.