2
$\begingroup$

Hellow everyone.

I'm exporting simple tent model into Unity. I want both outside and inside of the tent to be 'visible'. I checked double-sided on the properties panel, but in Unity tent interior is still invisible. I can't just flip normals, because then outside of tent would be invisible. I know I could use Solidify, but it doubles vertices number, which is not good for optimalisation. Is there any other way?

enter image description here

enter image description here

$\endgroup$
2
$\begingroup$

What you're asking for is likely not what you actually want... although it might be.

You can force a shader to render both sides of a polygon, but then the inside of the tent will not be in shadow. This is because polygons are fundamentally one sided. They only have one normal, which only points one direction. This is a little odd to think about, but it might be worth diving into the math... just a little.

Diagram about normals, from Unity

In short, the way a shader determines how bright a surface is, is to calculate the difference between the normal (a line pointing directly away from a surface) and the vector to the light source (a shader typically calculates one light source at a time, and then combines the results). In order to do that, it has to have a normal, and each polygon only has one. The only way around this, is to use the same calculations for the "back" of the polygon, which will make the inside of your tent as brightly lit as the outside. (Unless all your normals are pointing inward, in which case the outside of your tent would be as dark as the inside).

In order to have proper lighting, you have to have another normal... which means you have to have another polygon :-/ Suboptimal, but necessary.

This is not just a Unity thing or a Blender thing, this is fundamentally how all shaders work, both ray-traced and otherwise.

This is why it's so common for games to do things like make the tent closed so that you can't see inside. Then they don't have to have extra polys inside. But if you want your players to be able to see the inside, you have to have another surface (solidify is the right answer).

| improve this answer | |
$\endgroup$

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.