# Geometry Nodes: How to distribute instances on a mesh line to prevent crowding

I'm making a procedural stone path in geometry nodes but I've been struggling with correcting for distortions as the curves change. The issue I've been really stuck on is in the pictures below. As I shift the middle handle of the curve in the y-direction I get the expected crowding as you approach the outer handles. I'm pretty new to this so I'm not sure how to take in and compare distances from sampled points along the curves in order to correct for this; or even more likely I'm on the wrong path altogether. Either way, any ideas would be greatly appreciated. I've included an example of my issue and my original node network below.

Bezier Curves instanced on a mesh line

Bezier Curves instanced on a mesh line with meshes instanced along the curves

current node network

• How about you make a face from line and use Distribute Points on Faces? Commented Apr 18, 2022 at 11:08

If I've got you right, one approach might be to copy the curve in place on a 0-length line, and then offset the points of the copies by a ((multiple of spline-index + a constant) * point-normal):

You still have to watch out for self-intersection.. in most cases you can arrange for the original to be the innermost curve, to prevent that.

• Fantastic work! The only problem I'm having with this approach is with indexes. this rearranges the spline instances so that the even and odd indexes are grouped (in space not in the spreadsheet). This is an issue because I would like to offset every index(modulo(2)) by the midpoint between two points on the resampled spline. is there a way to avoid or fix this? Thank you so much for your answer! you have already helped me a ton! Commented Apr 20, 2022 at 6:39
• Hi, @GeorgeNavarre! I've just downloaded and tried this.. my spline indices are in strict order, (0 outer to 4 inner, in the illustrated version). Can you give an illustration of the effect you want to achieve, maybe as a new post? Commented Apr 20, 2022 at 7:49
• hey, @RobinBetts. No problem I'll make one right now. Commented Apr 20, 2022 at 21:18
• Hey, @RobinBetts. here's the new post blender.stackexchange.com/q/261251/134542 Commented Apr 21, 2022 at 4:09

My original question (Geometry Nodes: How to distribute instances on a mesh line to prevent crowding) was about crowding when at the left and right sides of the splines was answered by @RobinBetts. Their solution solved the crowding issue but when I attempted to offset every other spline I found that the splines had rearranged in such a way that all even and odd indexes were grouped.

Here's A node network that produces the desired alternating spline offset. The MixRGB node controls the offset amount. I've also included a gif.

Here's A node network that solves the crowding issue but rearranges the splines in the process. I've also included a gif below this.

The purpose is to produce more randomness in the stone path. After I have a solution to this I will reduce MixRGB to .125 and add a random value between 0 and .375. hopefully, this will have the desired effect :). thanks again for your help!

• Robin, I'll model what I'm going for right now. ill post back in 30 mins or so. Commented Apr 21, 2022 at 16:13