FBX character imported from Blender missing parts
Hi everyone,
I'm kinda new to Unity, and I've been trying to solve an issue I've encountered while attempting to import my Blender character into Unity (version 2019.4.10f1) in FBX format, I've seen similar posts around, but I haven't really found a solution. The character itself is composed of several parts, but I can only see some of them in-game.
As you can see in the above picture, all the meshes actually exist in the imported asset, but not all of them got corresponding objects (at least that's what I understand, do correct me if I'm wrong). On the import settings (animation tab) the character looks exactly as it needs to look, but in-game, a lot of the parts are missing. I've seen a lot of people posting similar questions, and in many of those cases the problem was related to flipped normals, but this is no such case, I've made sure that all the normals are facing the correct direction. I should also add that if I import these missing parts as entirely separate files, they are fine, nothing seems to be missing. I'm not quite sure what the cause of the problem might be.
I'll appreciate any input or help you can provide. Thanks for you time and attention.
Kind regards
Answer by RTS_Cesar · Oct 07, 2020 at 10:56 AM
After some digging around, I've been able to find the origin of the issue. It was related to the "Import Visibility" setting, in the FBX import settings (model tab), marked in red in the following picture:
The FBX format seems to hold specific settings that decide whether or not MeshRenderer components are enabled once imported into Unity. These settings most likely stem from Blender itself, although I'm not entirely sure how to define them accordingly to my needs. Still, disabling the "Import Visibility" setting marks all the objects as visible by default. Although it doesn't really fix the origin of the problem, the model behaves as it should once in Unity (in most cases at least). I'll update the answer if I manage to figure out how to properly define the visibility settings of the meshes in the FBX.
Kind regards
Update: I managed to trace down the true cause of the problem. I started digging around after encountering a new problem with some parts of the model defor$$anonymous$$g heavily during certain animations, and after noticing that some of the objects were being imported without an armature at all. Since some of the armor parts don't deform at all, I was just parenting them to their corresponding bones, without an armature modifier. Turns out, Unity doesn't like this. As far as I can understand, when a model with a rig is imported, everything that doesn't have an armature modifier is ignored and marked as "not visible". This was causing the original problem of missing objects. Every single object that displayed this problem didn't have an armature modifier. In Blender, I removed the original parenting, applied armature modifiers to everything, and set weights to 1 for the corresponding bones (every vertex must be weight painted, otherwise Unity will display an error message when importing and it'll proceed to weight the faulty vertices itself). Once I did this, everything was visible without me having to do anything, and the animations weren't being deformed anymore, all the issues were fixed.
I hope this can help somebody else facing these problems. Kind regards
Your answer
Follow this Question
Related Questions
Import high-res sphere from Blender into Unity and add Material 0 Answers
Pivot changes when fbx is imported. 1 Answer
Why is the texture on my blender model darker in Unity? 3 Answers
FBX UV's messed up (From Blender) 0 Answers
FBX Importing? 1 Answer