How can I turn off Backface Culling?

Hi! I imported an FBX object into my game. Unfortunately, the insides are transparent. I think the name of it is Backface Culling. The problem is that it is necessary for my game to be able to see the insides as well. Can I turn off the Backface Culling in Unity?

Backface culling is a property of the used shader to render the object. There are some shaders that do not have backface culling. However simply disabling it is in almost all cases not what you want. A single triangle and it’s vertices can only have a single normal vector which is required to calculate correct lighting. The normals have to point outwards from the surface. However that means when you disable backface culling, the inside would not be luminated correctly.

That’s why you usually want to have dedicated interior faces in case you really need them. Though those have to be explicitly modelled and included in the mesh.

So not using backface culling is usually only used on things that have shaders that are not affected by light, like most particle shaders.

edit
If you really know what you’re doing and you really want to render backfaces, it depends on the shader you use. So if you can’t find any built-in shader that do not backface cull (and there are only a few, special effects shaders, mostly particle shaders), you would have to create your own shader. When you use URP and shader graph, since Unity 2021 you can select which faces should be rendered in the shader directly. When you select “both”, it wouldn’t cull any faces. When you select “front”, backfaces would be culled and when you select “back”, only the back facing faces would be rendered.

When you write shaders the “usual” way by using the “cull” setting in shader lab. In this case you would actually specify which faces you want to cull. The options can be seen here.

  • Off == Both faces are rendered
  • Back == the usual back face culling, so only front faces are rendered
  • Front == We cull the front faces, so only back faces are rendered

A final warning: Just rendering backfaces does not work properly with lighting as each vertex of a face only has one normal vector that is used / required for lighting. This usually points in the forward direction. Simply rendering backfaces does not mean that the normals magically flip around. If you need properly lit surfaces, you should actually duplicate the faces and vertices in the mesh and flip both, the winding order (so they essentially represent the back-faces) and the vertex normals. In that case you still want to use backface culling as we render an explicit face where we want to have a face. This can also solve some ording issues when you try to use any kind of transparency as the individual triangles are rendered in the order they appear in the mesh.

So when you don’t want to explicitly specify backfaces in your mesh and you really want to use no culling at all, your shader should either be unlit (so it doesn’t use the normal vectors at all), or it needs to have two separate passes each with different culling setting so one renders the normal front faces and one extra pass that renders the back faces. This way you can invert the vertex normals for the backfaces in the vertex shader. I think this is quite hard to do in Shader Graph as it does not support multiple passes.