Points in between points on cuve GN

Hello,

I have a rail with some columns using instance on points with GN, the problem is I cannot figure out how to add a set of sub-columns in between the columns created with Instance on points.

I have tried converting the curve from the columns into a mesh, splitting the edges and converting it back to curve to use that one for the sub-columns, which works fine for straight segments but when the segments are not straight, then it gets messed up.

Is there a way to accomplish it?

Here is a test file in B4
Subcolumns.blend (984.5 KB)

Don’t convert to mesh, subdivide the curve in edit mode (select all - right click-subdivide)

Thanks, sorry if I wasn’t clear enough. Has to be done in geometry nodes, that’s why I shared the file.

Well pretty much the same way

Not sure how you want it exactly but the thing is that subdivide doesnt change the existing org points.

1 Like

Thank you for the idea, sadly by subdividing the curve I cannot have a uniform point distribution along the curve.

So just to be clear about that, what is more important for your usecase, that the initial points stay in place or that the point spacing is 100% even?

The even spacing is the most important factor in my case.

I think you may have to separate the straight bis from the curved part.

Edit
No. I tried but the problem is that you curved bit is not regular, the blue columns are not evenly spaced.

In principle it should be possible if he subdivides at the beginning and resamples at the end to stay on the curve, but it somehow blocks on the curved part and I am a bit in hurry.

Yes I think it has to do with the size of the bezier handles.

1 Like

If I follow my logic, the curve should be “cut” where the blue columns are, giving the result of the rest of the segments and then subdive or resample each segment. The problem lies in how to cut a curve where new points are… not sure if it makes sense.

Don’t worry, I got you…

edit: Correction… in-between instances should not do the end-point ones.

split bezier cyclic example1.blend (110.9 KB)

Two of my support node-groups can be used. Disconnect Cyclic will turn cyclic curves into more manageable regular curves by filling in the cyclic “gap”. Split Bezier is like split vertices for curves. The split condition here is set up that handle angles need to be less than 150deg. Suggested subdivision plus curve sampling correction does the rest.

Good luck.

3 Likes

This is perhaps not the most performant solution cause it uses a repeat zone, but its a pretty simple one. Basically it uses the trim curve to get the segments.

cuts

After the trimcurve there are some resample curves and they feed the blue and green instance on points

1 Like

Thank you for your solution, sadly I couldn’t avoid having the shortest columns in the same place than the tall one. Could have been something I did not right?

So far this this has worked as expected, since there is no animation involve or constant parameters change, the performance has been ok.

1 Like

Whups… I added a proximity check to remove those.
split bezier cyclic example2.blend (112.6 KB)

The bonus of this solution is that it maintain sharp corners as locations for large columns.

Hope that helps.

1 Like

That’s great, now it is perfect. Thank you :slight_smile:

Since I cannot accept officially two solutions, I can do it here, your solution works as well for future reference.

1 Like

Thanks… Here is a slight tweak to the Split Bezier group that makes it work for multiple curves, so you can now apply this solution to joined curves instead of a mass of individual curves which should make the outliner neater.
split bezier cyclic example3.blend (112.8 KB)

That’s fine… just give it to the one you think others will benefit from most. :wink:

Good luck!

3 Likes

Thought I’d offer another solution based on the assumption that all posts are equally separated.

This creates a mesh line with points for major and minor posts then simply by resampling the original curve the position of the new mesh line points (and instances on them) can be set by sampling the new index points of the original curve with minimal distortion.

fence posts

Node setup

Fence posts.blend (1.1 MB)

4 Likes