# How to do a recursive Shrink/Fatten with Geometry Nodes?

I want to create an effect where a mesh is duplicated and then shrunken down by x amount, recursively y iterations.

Something like this (for visual reference):

I came pretty close by layering Solidify Modifiers, doubling the Thickness value with each modifier instance. (That's how I made the cube above) But the normals are not all facing the correct direction, and if I tick the "Flip" checkbox for Normals, it breaks the even spacing because the shape is dependent on some faces being flipped. This method also adds thickness (fattens), when I want to shrink only.

I'm starting to think Geometry Nodes would be good for this, but I don't know how to go about it. Thanks for any help.

• Perhaps a Displace modifier is more adequate/lighter than the solidify here Sep 27, 2021 at 9:31

## Important:

The method described in my original answer below (for Blender 2.93) has changed as of Blender 3.0 due to the fact that the Attribute Vector node is now considered "legacy", and "will be removed in Blender 4.0". Scroll to the bottom section of this answer to see what has been changed for compatibility with Blender 3.0+

After finding an answer explaining how Shrink/Fatten can be done using Geometry Nodes, I was able to put together a node setup that does it recursively.

Here's what it looks like:

This results in four more progressively smaller copies of the mesh being generated - one for each instance of the "Shrink-Fatten" node group. With the Value node labeled "Offset Value" set to a negative value, faces will "shrink", and with a positive value, they will "fatten".

Inside each "Shrink-Fatten" node group, here's what's going on:

The i input has a value of 0 in the first "Shrink-Fatten" group instance. It then gets incremented to 1 so the offset value is multiplied by 1 - no change in this first iteration. That offset value then goes on to the B input of the first Attribute Vector node. (The two Attribute Vector nodes do the actual shrinking or fattening.) The incremented value (now 1) gets passed to the Group Output node as i + 1. Since the i + 1 and Offset outputs get chained from one "Shrink-Fatten" group to the next, the amount by which the geometry gets offset steps incrementally.

This is what happens to the mesh when the Offset Value is dragged:

(Blender 2.93 legacy)

## Blender 3.0+ solution

I had to make some changes inside the "Shrink-Fatten" node groups to keep current with Blender 3.0. Instead of the legacy Attribute Vector node, Set Position and Normal nodes are now used. Below is a screenshot of how they are configured:

(Blender 3.0)

Note that the Shrink/Fatten operation has an Offset Even option, and although I have not gone into detail about it in this question, Offset Even can also be coded into Geometry Nodes.

to get this:

you can use this node tree:

Hopefully i understood it right...and here is how it looks like with Suzanne:

• ..+1.. maybe OK. But it's a scale, not shrink/fatten. Sep 27, 2021 at 9:04

I discovered a bug in the 3.0+ solution. You will need to determine the sign of the normal vector and multiply that by the offset or else it won't scale every face evenly. To do this, I divided the normal vector by the absolute value of the normal vector. I multiplied this by the value I wanted for "offset." The other thing I did here is that I applied the scaling to only select vertices, which is specific to what I am trying to do. Here is the complete node tree and a picture of the output:

• Welcome to BSE, Paul! Thanks for sharing your findings. The objective of my node setup was to make recursive the Shrink/Fatten solution that Robin Betts contributed. And that, it does. As a test, I took the same half-torus, used GN on one, and did a manual recursive duplicate-then-shrink on the other. The resulting mesh was the same. But please understand that Shrink/Fatten does not scale every face evenly by default. (This is not a bug.) There is an option to use Even Thickness and it can be enabled by holding Alt while doing S/F. Jul 4, 2022 at 1:41
• But Even Thickness isn't perfect, and this is apparent on open-ended angled geometry where the faces start to creep out. It can't be helped. Still, I was hoping your solution with Divide by Absolute would be like using the Even Thickness option. But from my tests, it is doing something else. And in the case of the half-torus it produced undesirable results. I'm glad that worked for you with your particular geometry, but from what I observed it's not scaling every face evenly. Or maybe I've misunderstood what you mean. In any case, if someone has an Even Thickness solution I hope they'll share. Jul 4, 2022 at 1:41
• Update: I've asked a new question specifically about Even Thickness (a.k.a. Offset Even), for anyone who understands this and would like to contribute an answer. Jul 4, 2022 at 3:32