How would I get double facing normals to export to other programs without the feature?
3 Answers
Presumably, you want to export into Unity or something and have both sides be visible. And you want to minimize vertex count.
The short answer for how to make a plane for Blender that faces both ways is, you don't. For what you're asking about, you should be looking at the capabilities of your engine to do what you want, not at Blender.
If you want to have backface visibility in Unity, you use a shader that doesn't do backface culling. If you want to have backface visibility and backface lighting, you use a shader that doesn't do backface culling, and that recalculates your normals based on backfacing, scaling the normal by -1 before calculating shading for backfacing fragments. In the pixel shader, not the vertex shader. These techniques do not create any extra vertices.
Note that even though these techniques do not create vertices, that doesn't mean they're free. There is partly a cost from doing a little extra math in the shader, but mostly, from overdraw (drawing faces that don't contribute to the final frame it hands off to the monitor.) Actual engine performance is complicated and involves a lot of different factors. It's unwise to optimize for any single issue like vertex count; instead, you need to see where your bottlenecks are for the particular thing you're doing.
Even techniques that seem like, maybe, they might work-- a good example being the doubled faces offered in a different answer-- will create doubled vertices when they go to the video card, because each side will require its own per-face normals, and video cards don't have per face normals (or per face anything); they just double the vertex behind the scenes.
There is a way that I haven't really seen used anywhere, where you use edges overlapping in an X shape, then fill it in with tris with normals facing opposite directions like this:
I answered my own question because the first time I saw this, I was very interested and I don't know if this is just a newbie thing that everyone knows.
-
6$\begingroup$ You're right that it doesn't add any vertex to the mesh, but it does add to the polycount which is what matters for performance. You're also risking Z fighting artifacts depending on the render engine $\endgroup$– GorgiousJul 11, 2021 at 7:27
-
1
If you want both sides of an object (front and back) to look good, without one side that looks dark/badly shaded, you could use the Solidify Modifier, and both sides of the object will look the same, without those shading issues. However, the poly count will increase.