How Do You Delete Vertices That Aren't Seen By Camera Using Geometry Nodes?

0

I’ve been trying to recreate the Grease Pencil Line Art Modifier using Geometry Nodes. I’m pretty close, but I’m wondering: How do you delete vertices that aren’t seen by the camera? I’ve been trying to use the raycast node, but whenever I do, nothing happens. I’m specifically trying to remove the edges in the back of the model, so I can move the geometry nodes to be seen at the front without the back edges being seen. If I were to sum up the effect I’m trying to achieve in text: Send out raycast If not hit, delete vertice

Node Tree


What’s Seen

The Edges I want Deleted

Dot Product is your friend.
Separate Geometry by Dot is removing the back-faces. The delete then removes anything that’s not an outline.

See here:

Good luck.

How is this differetn from this

??

Have you seen this ??

I used your original code as a reference, but it doesn’t remove the obstructed faces.

It isn’t but nobody replied. And yes,
I have seen the video.

No, you’re not using mine…

Mine:
image

Yours:
image

…see the difference?

If you were to use my method you’ll essentially be doing back-face culling… same method.

My Mistake. While yours deletes the backfaces, I’m also looking to delete faces that aren’t backfaces, but still aren’t visible to the camera as the angle changes such as the ones behind the neck or hidden by the shoulders.

Oh, right…

Guessing you would need to do a Boolean union before the culling.

Have you tried that?

I tried using a boolean difference. When I tried using the boolean, it didn’t work, since the culling pulls from the original geometry, so for some reason it deletes all of the mesh.

What geometry would I need the boolean union for?

Also, is there a way to use the raycast node to check if a face is obstructed or inside another object? I’ve tried before, but none of my results have been successful.