- Home /
The question is answered, right answer was accepted
Blender and Unity won't play nice. Missing faces and weird render glitches
I'm trying to make a very simple model within Blender for use in Unity, but the powers that be seem to be trying to prevent this. I almost had my model working, save for one weird glitch where the shading between two faces seemed to change drastically. I thought this might have been a normal issue, but I can't seem to find anything wrong with them. Then when I went to fix another issue with overlapping faces, Unity started ignoring the new faces I made! There's now a hole in my mesh and I've tried remaking the face again, flip-flopping the normals and recalculating the normals but nothing seems to work!
I'm starting to think it'd be easier to just hard-code all my 3D models within Unity!
So I really have 2 questions:
What causes the shading issue? And how can I fix it?
Why aren't certain faces showing up? (It's not a normal issue)
Some more details: I'm using Blender version 2.65, Unity version 3.5.7f6, and I'm making a brick breaker type game with a twist for Ouya.
Answer by Loius · Apr 17, 2013 at 09:21 PM
The shading issue looks/sounds like you have the faces Flat Shaded but you want them Smooth Shaded. In Blender's edit mode, 2.49's W menu brings up the options for that.
Docs for 2.6: http://wiki.blender.org/index.php/Doc:2.6/Manual/Modeling/Meshes/Smoothing
The smooth type does actually change the mesh; it's weird. :)
It's hard to see the face that's missing (since it's missing). Try recreating it? Definitely take a screenshot of the model in edit mode with normal-visualization enabled per-vertex; maybe they're going crazy.
Thanks for your input Loius, I forgot about flat shading vs smooth shading, but it doesn't seem to make a difference in unity anyways (not that I could see, at the very least it didn't help with either issue.) Also, I did try deleting the face, but I'll try deleting the actual vertex too and see if that helps.
Here's a screenshot of the normals in Blender:
They all look fine to me, I even turned on backface culling to make sure, but everything looks fine to me.
Okay finally I'm getting somewhere. I moved the .blend file then deleted the instance I had in my game of my mesh, then I moved the .blend file back and reimported it. Now I can see the mesh that's there, but the material isn't applied to the parts that were missing before... At least now I know I know it's an issue on Unity's end...
Well, my input on the blender import issue is, use 2.49. You-the-artist have direct access to the exporter code and can change it to whatever you want (it's fbx_export.py or export_fbx.py, i forget). I've never put a blend file in Unity and let it handle the import, I always export from blender to FBX, and then put the FBX file in Unity. I agree there's issues, I just circumvent them by basically doing it all myself. x)