3
$\begingroup$

Part of my mesh is inversed when I imported it into Unity, and I don't know why

So I modeled this sword and all the parts were separate meshes. I used a mirror modifier when I was modeling and then I applied the modifier when I was done to make the parts into solid meshes. Put a UV map on everything and it all looked good in Blender.

Then I put it into Unity and I got what you see in the picture. Part of the sword is inversed. Oddly, the inversed part actually maintains the proper silhouette. It maintains the correct shape, but then is shaded like the front half is missing.

Does anyone have an idea of what's going on and how to fix it?

Thanks, James

$\endgroup$
2
$\begingroup$

One possible reason for this could be that the normals actually were inverted in Blender but if you have Backface Culling disabled then the mesh could look right even though it's not. The lighting may look weird but the polygons will look like they are facing outwards.

enter image description here

Backface culling is an optimization that disables shading on polygons that are not supposed to ever be seen.

When in Edit Mode, you can activate a tool that will show you which direction the normals are pointing in. Just make sure that the size is adjusted appropriately for the model's scale otherwise you may not see them.

enter image description here

To correct the normals, you can use Ctrl+n which is also shown in the following image as a toolbar button labeled Recalculate.

You can also selectively flip the direction of faces using the button labeled Flip Direction which can also be located in the Faces Menu Ctrl+f with the alternate name Flip Faces

enter image description here

(The different names are a mistake, both use bpy.ops.mesh.flip_normals())

$\endgroup$
  • $\begingroup$ Oh wow. Backface Culling is exactly what is happening. It is disabled in Blender though, so I have no idea why it is happening in Unity. Thanks. I now at least know what the name is so I can research the issue better. $\endgroup$ – James Martin Nov 29 '14 at 1:50
  • $\begingroup$ When it's disabled is when you have the problem because Blender will render both sides as if they are both supposed to be visible. I've updated my answer to show a tool which can help check the normals for oddities. $\endgroup$ – MarcClintDion Nov 29 '14 at 2:15
  • $\begingroup$ Awesome! Thanks, man. I did what you said and saw that the normals were facing the wrong way. I found that all I had to do is select the messed up part and use "Ctrl + N" to flip the normals. Now it looks right in Unity. $\endgroup$ – James Martin Nov 30 '14 at 3:30
  • $\begingroup$ that's silly of me. I forgot to add instructions for correcting the normals to the answer. Thanks for pointing that out. $\endgroup$ – MarcClintDion Nov 30 '14 at 4:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.