- Home /
How do I stop seeing through models by glass windows?
I can see through the model of my house and know what is on the other side. When I take a glance through the window of my house, I can see what is on the outside of the other side of the house. How can I just see the inside of the house and not through it?
Answer by tanoshimi · Jan 16, 2014 at 07:07 AM
By default, surfaces in Unity (as in almost all 3d modelling software) are single-sided. You only see them from the "front", when the normal direction of the surface is pointing towards you. To demonstrate this, create a new Plane or Quad object in your game scene and then look at it from behind - it will appear invisible.
The walls of your house have their single-sided surface pointing "outwards", so if you walk around the outside of the model they will all appear to face you. However, when you look through the glass window you are able to see the reverse side of the far wall of the house. Since its normal is now pointing away from you, it appears invisible.
To solve the problem, you can either:
duplicate the walls of your house, and flip the normals on the duplicated copies to point the other way (making them two-sided).
use a custom shader that renders both back faces and front faces of a surface
Thank you for responding. How do I make a custom shader? I barely stared using unity a week ago.
http://docs.unity3d.com/Documentation/$$anonymous$$anual/Shaders.html Check the unity manual for information - it has everything you need. This is the link to the Shaders
Try searching ;) I posted this two-sided surface shader in response to a question just the other week: http://answers.unity3d.com/questions/610316/multipass-surface-shader-or-equivalent.html
Your answer
![](https://koobas.hobune.stream/wayback/20220613130558im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Best performance for repeatable objects in a City scene. 1 Answer
Problem with Model Scale 0 Answers
Multiple gameobject instances causes model glitch 0 Answers
Importing Luxology Modo's compound 3d model 1 Answer
picture in picture 3d. 0 Answers