Background
Using Blender 4.1 and a wireframe modifier to project a mountain mesh as a blueprint. Subterranean structures must remain visible. I'd like to remove parts of the mountain that aren't directly observable from the camera's perspective. Consider:
Setup
Modifiers:
Ignore the topmost modifier.
The Geometry Nodes:
The node setup, which uses the dot product of the camera and the mesh normals, removes the majority of hidden faces.
Problem
Using the normals doesn't eliminate all faces that would be invisible from the camera's perspective, as shown here:
When rendered, faces from behind the mountain are appear as a broad white band:
I'd like to eliminate that white band.
Idea
Here's the node setup for raycasting:
That setup doesn't delete any vertices, despite the lines showing an intersection of the rays and the mesh:
Manual
Here are the steps taken by hand to achieve the desired effect, using the Blender 2.9 keyboard hotkeys:
- Select the mesh.
- Press NUM 0 to change to the camera's view.
- Press TAB to enter edit mode.
- Press a to deselect all vertices.
- Press b to enter vertex selection mode.
- Click and drag to select all visible mesh vertices.
- Assign to a vertex group.
- Add a mask modifier.
- Assign the vertex group to the mask modifier.
While this works, an automated way would be most welcome.
Question
How would you render a mesh wireframe such that all occluded faces are not rendered (i.e., the occluded wireframe is suppressed) while objects inside the mesh may be seen?
I'm using Geometry Nodes but other solutions are welcome.