Hey everyone, i have come to point where i will have to create lots of props, which will require double sided texture, some even transparent double sided textures.
I know you could technically just copy and flip the polygons in 3d modelling software, or you could used script - shader in unity to make that effect. But what are the pros & cons using these techniques ? Flipping the polygon count would certainly increase the polygon count, but maybe its still better than constantly running a shader script in unity game engine.
I would like to hear possible solutions, advises and experience.:)
-Thank you
Replies
Otherwise the backside won't accept shadows correctly. And it's more expensive to render all polygons with a shader as double-sided than it is to simply render them one-sided and double up only the polys that need it.
Although if it's being simmed (cloth or such) then you'll probably need a double sided shader.
Can you explain what happens to the shadows on the backface that would cause them to render improperly?
When you have single sided materials the rendering routine culls all faces that face away from the camera. When rendering doublesided it doesn't. It just renders all faces in the object.
Most shadowing algorithms rely on a face normal (The averaged vertex normal in the plane between any given 3 vertices.). They project a volume against that normal.
In double sided rendering the face normal is pointing along the front face, so the virtual backside won't accept a shadow as you'd expect because the data isn't there to do it.
However, if you duplicate those faces which need to be double sided, there will be 2 faces, and so 2 normals to accept shadow projection properly.