How to scale flat geometry evenly from all edges in geometry nodes to create an even border?

I want to be able to duplicate flat geometry, then offset and scale it to create an outline effect behind it when viewed in orthographic view. This is what I have so far:

The shape on the left is created with the geometry node setup shown beneath it. The shape on the right was created manually, and is the effect I am aiming for.

The problem is that the Scale Elements node scales from a central point, which works fine for symmetrical shapes which can have a central origin point. However, when you try to apply this to an irregular shape, you end up with uneven edges. I would like to be able to scale the shape behind it in a way that makes an even border around the whole shape.

I have already tried Higgsas’ Inset Faces node group, but it doesn’t work for this since it insets every single face individually, instead of adding a border around the whole mesh.

The idea is something conceptually similar to the Inflate tool (Alt + S) in Edit Mode, where each vertex is pushed out in the direction of it’s normal, but this method doesn’t work for a 2D face since the normals all point in the same direction. If there is a way to rotate the normals of each point outwards, then that might work, but I haven’t figured out a node setup for that, and I’m not 100% sure that would create an even border.

Any ideas how to accomplish this?

You can try inset option from face menu (ctrl+f), then select outset, ı dont know if it works
EDÄ°T: not working
EDÄ°T2:
if you add outer faces it woks, maybe it helps

Instinctively, I’d try lerping between the two adjacent edges and using that vector as “offset direction”. I haven’t tried.

I have found a solution, so I’ll leave it here if anyone else also wants to know. If found this post on blender stackexchange talking about the same problem, and the solution by ugorek works for me.

I’m surprised so much calculation is needed for something like this, but I suppose it does make sense. If anyone knows a more streamlined method to achieve this effect, let me know. Otherwise I’m going to go with ugorek’s solution.

1 Like