# Blender 4.0 geo nodes: Control the vertices density of bezier curve

Hi, how can i make in blender geo nodes the bezier curve only subdivide inbetween the top 2 vertices and the bottom ones, while the one vertice in the middle is unsubdivided?

Subdivide curve has a field inputâ€¦ use end-point selection to take advantage of thatâ€¦

1 start and 2 end because of see annotations.

Hope that helps.

8 Likes

Zeroskilz, you a genius man. I transfered your system to my nodes, and i am very close now to my goal. The only issues i face now is:

I need a concentration of verts at start and the end of each gap with very low â†’ zero concentration of verts. And this should repeat itself and adjust to the bezier curve automatically. You can say, i want to have control over vertices density on a curve.

I tried now for 3h, but cant proceed smh.

If it is not just end-points you want to deal with then youâ€™ll have to use modulo math:

Modding the index, i.e. `Index % 2` = `0,1,0,1,0,1`â€¦etc. which then drives a switch which outputs the cuts for `0` (false) and `1` (true).

If it is more complex distributions then youâ€™ll need to start using the Sample Curve and Set Position via some math expression.

Just a reminder: In future, please make sure you make what you want clear in the first post. Moving the goalposts will make people who want to help not want to help. Thanks.

Good luck.

4 Likes

But where is my mistake, i tried to implement the nodes, but got this:

So, index allows to access all verts on the curve and when i manipulate with the modulo node, it results in: index % 2, and it shows every second vert.

So index [0] false [1] true [2] false and so on, right?
But what node is responsible for showing the higher concentration of verts inbetween?
And really thank you for your help, appreciate that alot.

Yes.

The Subdivide Curve nodeâ€¦ by altering the cuts. 1 cut then 4 cuts, repeat.

The only way I could get your result is by entering `2.0001` into the moduloâ€¦ That would make the sequence `0,1,1,1,1`â€¦ (or more specifically, 0 is false, greater than 0 is trueâ€¦ the actual sequence is `0,1,2,1,2,1`)
Force to Integer should fix it.

Good luck.

6 Likes

Wow, Genius!!! I am blown away.
I really learned so much because of you. Thank you so much for that
Is there a way to support you in something?
You so professionally explained all and everythingâ€¦

Wow that one was really hard to find. Tried myself to find the error, but gave up after a while.

2 Likes

No thanks. Just mark the solution to support the support. Thanks.

2 Likes

I am way to good at thisâ€¦ making the simplest guides to a whole another problem But thank you aswell. This website really helps a lot. Like the community!

Thanksâ€¦ Off-by-one errors are probably one of the most common mistakes in programmingâ€¦ this is the floating-point equivalent of that error so it is something high on my list to check.

2 Likes

@moshus and zeroskilz, if you guys dont mind me asking one last question and i promiss i leave you alone after that

But is there a way to contract each of the concentrated vertices tighter to their own centers
and add a profile to form humps out of them, like in the screenshot given?

Please start a new topic, thanks.

1 Like