Hi, having solved a problem about passing uv map textures from blender to Unity3D, now I'm facing another issue. When I map an UV texture to my object, Unity renders the texture on one side only, and the other side disappears. It's simply invisible. So, from one side (let's say the upper face of a vault) you see the texture, on the other side the texture (and the mapped object) simply disappears. That happens also when mapping a simple texture on a simple native Unity mesh (like a plane). What did I forget? While simple mesh primitives (like planes) can be reversed, obviously that's not possible with complex meshes. I am working on the cross vaults of a cloister, and of course I need the internal side textured, while Unity applies the textures only on the external one. Any help? Thank you
This is completely normal behaviour. It's called backface culling, and it's the most common graphics optimisation used by video cards and the like.
Every face has a 'normal' value, which defines the vector pointing directly out from that face. As well as being used in several shader calculations (lighting etc.), it is also used by the camera to determine whether the face in question is on the side of the object which should be visible. If not, (ie. the normal is facing away from the camera) it simply does not render the face.
There are two solutions to this problem- the first is to find or modify a shader which doesn't remove backfaces. This is probably not the best of plans, since it will probably double the amount of rendering that needs to be done, for no real advantage.
The second option, which I would recommend, is that you model all your meshes to have two sides- one set of faces for the outside shell, and another set of faces pointing the other way for the inside. Another thing- for UV mapping, you probably want a different texture on the inside. If you only have one set of faces, you'll have the same texture on both sides- which would look a little odd, for most buildings.
answered Dec 14 '11 at 12:34 PM