4
$\begingroup$

I want to animate complex curves with shape keys.

When I have overlapping curves within one curve object, Blender doesn't fill the overlapping parts.

blender-curve-fill

My desired output would be this, but as one object (so I need to animate only one object instead of many). blender-curve-objects

So I'm trying to build something with geometry nodes that lets me fill the entire surface area. (Ideally without overlapping faces, but I don't care much about z-fighting, since it will be a black silhouette in the end.)

Is there a way to split the islands in geo nodes, use the "fill curve" node on every island seperately and then output them as one geometry? So far my node setup is this, but I'd need a loop that lets me select each island. blender-geometry-node-setup

$\endgroup$
1
  • 1
    $\begingroup$ I am developing a solution for Blender 3.6.8, but if you are using Blender 4.1, do you try and connect the Island Index socket to the Group ID socket of the Fill Curve node ? Perhaps you have to capture it before the Curve to Mesh node... $\endgroup$ Commented Apr 21 at 12:43

2 Answers 2

4
$\begingroup$

(Using Blender 3.6.8)

Results

Results

This figure illustrates on the left three closed overlapping splines joined as a single curve, and on the right the achieved filled curve using a GeometryNodes modifier.

GeometryNodes Graph

GN Graph

Overview: The followed approach is to use the Curve Index to shift splines to remove overlaps and to extrude the filled curves, then to use the Island Index to shift back the parts. Eventually, Boolean Mesh operators are used to cut out an edge loop to make the outlining curve.

1. The diagonal vector of the Bounding Box enclosing the joined splines is used as unitary shifting vector. This guaranties that shifted parts are not overlapping.
2. Using a Set Position node, control points are shifted by a distance proportional to their Curve Index. This property is recovered using a Curve of Point node. This operation removes any overlap between splines.
3. A Fill Curve node is then safely used to make a flat mesh island from each spline.
4. These meshes are extruded to make a closed volume from each spline, combining Extrude Mesh, Flip Faces, Join Geometry and Merge by Distance nodes.
5. Using a Set Position node, these volumes are brought back where the original splines are. Their individual shifting distance is proportional to their Island Index. This property is recovered using a Mesh Island node.
6. All mesh islands are merged using a Mesh Boolean node with a Union operation.
7. The bounding box of the resulting mesh is slightly enlarged in X and Y directions by a factor of 1.1, and it is shrink in Z direction by a factor of 0.2.
8. A Mesh Boolean node with an Intersect operation is used to compute the intersection of the top face of the bounding box with the vertical boundary faces of the merged mesh islands. Edges of interest are tagged as Intersecting Edges.
9. Only those edges are not deleted by the following Delete Geometry node.(NB: this node can be removed by connecting the "Intersecting Edges" socket to the "Selection" socket of the "Mesh to Curve" node).
10. Eventually, the resulting connected edges are converted to a curve, using a Mesh to Curve node. If a mesh instead of a curve is required, a Fill Curve node can be used to make a flat triangularized mesh.

Resources:

$\endgroup$
1
$\begingroup$

You could move the splines apart, use the built-in fill curve node and then move the points to their original locations.

  1. Resample the curves to work with a fixed number of points.
  2. Shift each spline by the maximum bounding box length.
  3. Fill curve.
  4. Restore the original position by sampling the previous splines.

node group

$\endgroup$

You must log in to answer this question.

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