1
$\begingroup$

When I use the Mesh Boolean node to perform a "difference" operation, it seems to take attributes present in "Mesh 1" (the mesh being subtracted from) and assign it to the vertices in the geometry that comes out of the boolean operation.

How do I prevent that?

To clarify, this is an excerpt from my geo node tree. These nodes create a simply cube, then each vertex is assigned attributes which identify which faces the vertex touch. The "Greater/Less Than" compares are comparing to 0.

enter image description here

This is what the Geometry looks like at "Viewer 1". The Attribute values are as expected.

enter image description here

However, after the "Mesh Boolean" operation, a lot of new geometry is created. That is shown at "Viewer 2".

enter image description here

You can see that the new points have somehow been assigned the attributes that were present in the "Mesh 1" geometry. I cannot discern any logic as to how they are assigned. I also cannot imagine why they are assigned these attributes at all. The original "Mesh 1" points are in there, but so are a lot of new points.

I would expect the original geometry to retain its assigned attributes, and the new geometry to have no attributes at all.

The incoming Geometry on "Mesh 2" has no attributes. It is a set of cubes instanced on a few points arranged in a grid.

$\endgroup$
1

1 Answer 1

1
$\begingroup$

Per @Crantisz, this is a bug, and has been reported to the developers. Thank you for that.

In the meantime, I found a very ugly work-around.

One can delete all of the duplicated attributes, then re-join the geometry from Mesh1 and merge vertices.
enter image description here

My case is somewhat simplistic, because I only have attributes in Mesh1 that I care about, and they are only associated with vertices. So I delete all the edges and faces from Mesh1, and delete all of the attributes from the result of the boolean mesh, then join the Mesh 1 vertices with result of the Boolean Mesh.

At this point, the geometry contains duplicate vertices from Mesh1 and from the boolean difference result. So I use "Merge By distance" to get rid of the duplicates. This happens to result in the attribute table I want - but it's not clear to me that the attribute behavior for the merge node is well defined either.

$\endgroup$
2
  • $\begingroup$ You can try using Face Corner domain instead of Points, then if it is needed convert to point domain. It has more predictable behavior. $\endgroup$
    – Crantisz
    Commented Oct 10, 2022 at 14:13
  • $\begingroup$ Thanks. I'm just getting started with attributes in Geo Nodes. I don't fully understand the various "domains" yet. Some of it is clear (Points vs. Face vs. Edges) but I don't really know what these domains mean. Are they like namespaces in programming? Are these predicable behaviours included in the docs? I didn't notice them being mentioned in the docs for the nodes above. $\endgroup$
    – rothloup
    Commented Oct 10, 2022 at 17:22

You must log in to answer this question.

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