3

With Geometry Nodes, is it possible to create a backface culling type effect for instancing faces? That is, prevent faces the camera will never see from populating with instances?

Really the question should be: can we prevent such faces from populating with points? Since the instances rely on the points. This would be for a setup using the Distribute Points on Faces node.

Mentalist
  • 19,092
  • 7
  • 94
  • 166

1 Answers1

6

Yes, you can accomplish that by calculating the dot product of the normal of the face and the location of the camera:

enter image description here

The result from the dot product calculation will be a float between -1 and 1. -1 if the vectors are the exact inverse of each other (back) and 1 if the vectors match exactly (front).

Add a Compare node set to Greater Than after the dot product if you want to tweak the selection a bit. Might be needed if some of your instances "pops" in from nowhere.

Tobias Einarsson
  • 2,202
  • 14
  • 18