- Home /
Unity object: Plane render both sides, possible?
Hi, I have a question: when I add either a Unity Plane through add new object menu, or import a new asset (for example *OBJ model) consisting of planes, the engine seems to render only 1 side, the other side dissapears.
The question is: is there a way to render both sides of a plane?
Thank you.
This answer by Aldo will make your plane double-sided at runtime : http://answers.unity3d.com/questions/280741/how-make-visible-the-back-face-of-a-mesh.html
Other solutions would be to use a model created in a modelling program, or generate a custom plane with code : http://docs.unity3d.com/ScriptReference/$$anonymous$$esh.html
You could modify this script found on the Unity wiki to generate a double-sided plane : http://wiki.unity3d.com/index.php/ProceduralPrimitives#C.23_-_Plane
And of course the methods described by Baste in their answer.
Answer by Baste · Nov 07, 2014 at 02:00 PM
A plane only has one side, and only renders on that side. That's intended behavior. So, there's two ways to get a plane to render on two sides, two both are kinda wonky:
1: make two planes, put them back-to-back.
2: make a completely flat box instead.
A plane has two sides, it's just that most shaders are set to cull backfaces so you only ever see the side that has the normal facing you. You can simply set CULL OFF in the shader to render both sides, but, like the other two suggestions mentioned, whether that's an appropriate solution really depends on the situation.
Thank you for a prompt answer! Could please work me through, how to set cull off in the shader? I add a plane. As I understand: it has a standard diffuse material, which cannot be edited. Therefore, I add a new meterial and it replaces the standard one. Now I can press "edit" button. I press it. A new menu appears with two buttons for compiled code and 1 button for variants. How do I set cull off ?:)
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Skybox Pixelation problem 6 Answers
Locatio of Render Setting 0 Answers
Flip gameobject by 180º 0 Answers
C# Plane Detecting a Gameobject 1 Answer