4
$\begingroup$

I am working on an animation where rings grow from center in a pattern that is repeating, but where each ring has a slightly more distorted shape than the one before it.

I have managed to build a node system in GN that creates and distorts a ring (using noise), and I have managed to duplicate that ring a few times using math nodes that degrade each duplicate more than the one before it. But it is a lot of work, and I need the rings to be animated so that they grow beyond the frame as new ones continue to come in from center.

I know there is a way to do this but I'm having a hard time figuring out the following:

  1. How to instance the initial ring, and have each instance deformed procedurally

  2. How to make it so the inner edge of each subsequent ring takes on the shape of the outer edge of the ring that comes before it (currently I have the rings stacked so that the next ring is slightly smaller and the inner edge of the next ring has the illusion of also being the outer ring of the one before it, because the actual outer edge of the ring before it is hidden)

Is there a way to pull this off?

PROJECT FILE

This is the prototype I've made by manually creating each ring. Notice how each ring appears to share either an inner or outer edge with the next. Also notice how each ring has a slightly different shape than the next:

enter image description here

How can I set up the node tree so that this happens procedurally, without having to manually duplicate each ring?

These are my node setups:

enter image description here

enter image description here

$\endgroup$
4
  • $\begingroup$ I forgot to mention that I am 100% open to a more elegant solution to the same end result here. I'm not married to the current method I've employed, it was just the best I could come up with in my limited experience with GN's. $\endgroup$ Commented Dec 3, 2022 at 0:16
  • $\begingroup$ My try was to start with only one curve circle, duplicate it with GN, then distort the curve rings. i.sstatic.net/lEwis.jpg The problem is, that I have no idea how you can convert the curves into a mesh with faces. You can convert them into a mesh and extrude the edges but this results in "bands" and they are not connected. i.sstatic.net/lEwis.jpg Another try was to instance mesh lines on the curve points, and try to connect them with a Merge By Distance node to create the faces. But the result was poor. $\endgroup$
    – Blunder
    Commented Dec 3, 2022 at 14:43
  • $\begingroup$ Maybe you should start with a bunch of connected rings and then distort them? $\endgroup$
    – Blunder
    Commented Dec 3, 2022 at 14:46
  • $\begingroup$ @Blunder thanks for taking a crack at this. If I started with a bunch of connected rings and then distorted them, wouldn't they all distort the same? I'm trying to create a gradual distortion effect, where each ring is more distorted than the one generated before it. $\endgroup$ Commented Dec 3, 2022 at 17:39

1 Answer 1

6
$\begingroup$

Here's a setup where I first create a number of concentric circles with Duplicate Elements, then distort them with a noise node. Employing the Duplicate Index socket from the node allows you to sort the noise values into disparate batches for each circle so they can behave individually.

Harder part is creating the faces. Trying to extrude as edges is not very helpful. You could turn them into curves to use a Fill Curves node, but that would just create sequentially growing circles that overlap each other. We need to 'stitch' the circles at each gap between them. I usually do this by creating a Grid of faces in a single row/column, then moving its corner points to the circle vertex positions. Here's an older answer where I do a similar thing, with a more detailed explanation.

enter image description here

There's some index math going on there to achieve that result--it's basically manipulating the numbers so that the indices of the grid vertices match the circle vertices with the right indices (since each inner edge is used as a border for two faces, we can't just match them one-on-one). That's also the same reason why I'm using a flat Spiral at the beginning instead of simply a Mesh Circle: Spiral has split, double vertices at the start/end of its rotation and that extra vertex index helps with the stitching math.

Finally, before merging the overlapping vertices at the end, we capture the indices of each 'strip' using a Mesh Island node--since they aren't separate islands anymore after we merge them, we need to capture that information beforehand. Index information is then used in the Shader Editor to color the strips however you like.

$\endgroup$
4
  • 2
    $\begingroup$ I'm blown away but your ability to come up with this solution. Especially the spiral bit. I'm also blown away that I can actually follow, for the most part, what you've done. I guess this means I'm learning ;). Thanks, seriously, this has expanded my mind a lot and I think this may actually get me to the finish line. $\endgroup$ Commented Dec 5, 2022 at 1:56
  • 1
    $\begingroup$ @GlenCandle Thanks. I was gonna write more about the small technical solutions (like turning the grid into an instance first before duplicating, or the index math) but it was long enough already so I got lazy. In the end they're all about index manipulation, which I could never manage without the help of an Index Viewer like this, you might wanna check that out if you're not aware of the option. $\endgroup$
    – Kuboå
    Commented Dec 5, 2022 at 14:23
  • $\begingroup$ I definitely need to learn more about working with indexes, it's still a big scary mystery for me. Thanks for the tip re Index Viewer, seems legit. Is there a way to view only face indices as opposed to vertex? $\endgroup$ Commented Dec 5, 2022 at 20:36
  • 1
    $\begingroup$ @GlenCandle Yes, there's a slider for 0 Vertices | 1 Edges | 2 Faces. It doesn't support splines or instances though. There are other viewers (for ex: ginyumbi.gumroad.com/l/jbrmi) that also visualize more advanced attributes—like arrows for Normals etc—but that might be overwhelming for now. $\endgroup$
    – Kuboå
    Commented Dec 5, 2022 at 20:40

You must log in to answer this question.

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