Flipping faces with geometry nodes


I’ve been trying out Geometry Nodes in both 3.0 and the 3.1 HEAD.

There’s a nice technique that people use for cel shading in real-time engines. Essentially, for a given object T, you produce a copy U of T scaled up by ~2% or so and then render the back faces of U in a solid color, followed by the front faces of T. This essentially has the effect of producing a large solid colour outline around T.

Wikipedia describes a slightly different variation of this called the “Wireframe method”: Cel shading - Wikipedia

… but obviously the majority of 3D engines these days are exclusively working with rasterized triangles and therefore will render back-facing triangles instead of thick lines.

I wanted to try implementing a Geometry Node version of this, but ran into problems with the back faces; there doesn’t seem to be a way to flip the normals of a given mesh so that front faces become back faces and vice versa. There doesn’t appear to be a way to modify the normals at all, in fact, if the spreadsheet view is to be believed.

There’s a task for this in the works: T93569 Flip Mesh Faces Node

1 Like