4
$\begingroup$

I want to remove faces that are enclosed by another object and not visible to save resources (I will apply modifiers and export the mesh).

Something like this:

Something like this

The closest thing I've been able to achieve so far, and the closest thing to the result, is this:

The closest that I managed to get

However, this also deletes the overlapping faces, and I don't know how to keep them. I have an idea that this is possible, but I can't figure it out.

I want to avoid the Boolean method because it creates a bunch of extra vertices and I'm trying to keep their number low.

$\endgroup$

1 Answer 1

5
$\begingroup$

You are basically on the right way with your solution, however, you would have to consider the following things:

  1. Use in the node Raycast as Ray Direction the normals of your points of the sphere.
  2. Compare the normals you get at the output Hit Normals with the normals of your points. For this you use the node Compare and switch it to Vector, Dot Product and Greater Than $0$. This way you know which points are inside the cube.
  3. Since these results are evaluated per point, but you only want to delete faces that are completely hidden, capture these inner points first with Capture Attribute in the point domain.
  4. Finally, use Delete Geometry with these values, which will interpolate them to the face domain and select only those faces where all points of the face are inside the cube.

enter image description here


(Blender 3.2+)

$\endgroup$
3
  • $\begingroup$ awesome, thank you very much! works like a charm! $\endgroup$
    – John
    Jan 28 at 14:23
  • 1
    $\begingroup$ Interesting cast .. captured as Boolean .. still 'fractionally' interpolates as True.. $\endgroup$
    – Robin Betts
    Jan 28 at 14:52
  • $\begingroup$ @RobinBetts yes, I used that fact in my doo sabin coloring. $\endgroup$ Jan 28 at 18:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .