Shading issue on model imported from Blender

Hello all,

I have been having troubles with models imported to Unity from Blender. When the model that I created is imported into Unity, it has some strange shading.

Strange shading on model

When looking at the mesh of the model, the shading corresponds with some of the individual faces (strange placement of faces caused by boolean operations on the mesh).

Do you know how I can prevent this strange shading, or what I did wrong?

I have tested this with both Blender 2.49b and the Blender 2.5 test versions.

Thank you!


Solution

For those of you who encounter this problem also, I fixed it by changing the “Normals” option on the FBXImporter component attached to my imported model to “Calculate”, which makes Unity calculate its own normals on your model.

Number one; don't model like that; boolean operations are notorious for yielding very bad topology. However, you should be able to fix this by calculating normals correctly. Right now, you have vertices shared between the openings in the wall, and the outside of the wall. The normals get interpolated over long triangles, so with lighting, it looks really bad. You need to get those vertices duplicated, so there can be two normals at the same location. You can do this with Unity's importer, or with the Edge Split modifier in Blender.

This may not fix all the problems. Modeling using good topology, and using more vertices, if you need vertex lighting, will be the only solution in that case.