1
$\begingroup$

Apologies for the almost incomprehensible title, but the problem is difficult to describe. I'll lay out my current situation:

I am building a complex object from the ground up entirely in Geometry Nodes because the final project will be used to generate 200-300 models based on input parameters that control virtually every detail of the mesh's dimensions.

I have constructed a mesh via nodes that is composed of three joined meshes (via Join Geometry + Merge by Distance), but are incompletely joined where there are no matching vertices along the vertical edge. The meshes are aligned such that the adjacent edges occupy the exact same space. See below:

Edges

The mesh is then extruded:

Extrude mesh node setup

Once extruded, the final mesh has internal faces along the vertical, incompletely-merged edge. These internal faces wouldn't be a problem as the items are perfectly aligned, but the material used for this mesh requires subsurface scattering, revealing the faces beneath:

Mesh with material added, visible edge at boundary between 2 original meshes

I cannot simply convex hull the resulting mesh, because it must be composed of a mostly-perfect grid of subdivisions for artifact-free bending around a cylinder. The necessity of orderly subdivisions is why the mesh is constructed in this convoluted manner (trust me—you'll laugh if you see the nodes that it's composed of)

So, alas, I need to properly merge the vertical edge after subdivisions, but before extrusion, or else I must find some other way to remove (using only nodes) the internal faces. Thus, my thought is that I need to be able to create vertices on Mesh #2 at the locations where Mesh 1's horizontal lines meet that edge prior to the extrude.

Any ideas? Happy to provide additional information if needed.

$\endgroup$

1 Answer 1

1
$\begingroup$

or else I must find some other way to remove (using only nodes) the internal faces

This is the strategy that I would find easiest to pursue.

The problem then is how to identify which faces are internal. Let's pursue a simple example:

enter image description here

I hope this example adequately captures the problem. We have two grids with sets of coincident edges, but no coincident vertices; we are extruding and joining these.

Now, what are those faces that are going to be internal? They are faces that have no distance from faces in the other mesh:

enter image description here

Because of imprecision, I'm not checking for equality with 0, but rather that the distance is less than some acceptable threshold, 0.001 object space units here.

Of course, we need that for both of our meshes that we're joining, checking each against the other:

enter image description here

And we can see that, from underneath, the shared faces have been deleted.

$\endgroup$
4
  • $\begingroup$ Because the three flat meshes are joined (albeit imperfectly) before they are extruded, there is only one internal face, not two, so no coincident face to check against. This may work though, I will attempt to extrude the meshes individually before joining them to intentionally create two internal faces. Will report back. $\endgroup$ Nov 5, 2022 at 2:12
  • $\begingroup$ Your pic has a mesh being extruded before being joined. However, any stage of geometry can be used here; you can extrude a mesh just to measure where an extrusion would be, without having that extrusion be any other part of your final output. $\endgroup$
    – Nathan
    Nov 5, 2022 at 2:21
  • $\begingroup$ Believe it or not, the flat mesh was only generating a single set of internal faces. Once I extruded the objects separately to ensure there would be matching pairs, your solution worked like a charm. I created a node group to use where needed. Problem completely solved. Thank you! $\endgroup$ Nov 6, 2022 at 3:01
  • 1
    $\begingroup$ @BlaiseJCollura There are other ways to do it. You could mark adjacent edges, by distance about = 0, before extrusion, then multiply that with distance from original mesh > 0, and delete those edges. Untested, but it ought to work. Might be some domain issues, but those are solvable. $\endgroup$
    – Nathan
    Nov 6, 2022 at 18:55

You must log in to answer this question.

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