How to bend instances relatively to instance's height?

Hello
I am trying to bend the instanced objects with random height
and it is working but it isn’t really what I wanted to achieve.
Sorry I can’t describe it with words only so I’ve taken some screenshots
It will help your understanding more better!


This is showing the instanced object bent without the random z scale (height) value

and


This is showing the instanced object bent with random z scale
(The only difference between the 2 is that the node"random value → separate xyz" is connected to scale input of “Instance to Points” node)
but I want it to be like this

The problem is that the given bent angle is applied to all instances shortened, or full length of instance, as result it overlap or pierce another instance.
What I want it to be is to apply the bent angle to full scale (not shortened)
instance only and as the size decreases, the bent angle should decrease too
so it sounds kinda weird but I want it to be bent together (same as now lol) but differently, reducing the bent effect as the z - size decreases

I think my goal can be done in 2 ways

  1. Bend the instance relatively to it’s random z height
  2. Bend the instance and delete or hide or cut the top end
    (In the case of 2, when the instance is shortened, the bent angle
    shouldn’t change or increase as when it was not shortened)

but I couldn’t do it on my own :frowning: so I am writing this S.O.S message T_T

I attach the test example of the blend file
example blend file.blend (565.5 KB)
so you can tweak directly without replicating the nodes setup
Oh, I forgot to say this
Happy new Year !!
and thank you in advance for helping me !

Moved to Support > Modeling

Instead of turning the curves into a mesh before bending you cod bend the curve. Then trim the curve with your random setup and then turn into a mesh.

1 Like

Actually as you said, it is possible to bend before turning the curves into mesh but how can I trim the curves and change the bending angle relatively to the z scale at the same time ?

Hmm… It appears i dont really understand what you need. Perhaps try rephrasing your question.

1 Like

I want to bend instanced objects by a given value but given value is 100%
and is affecting 100% only if the z scale value is 1, 50% if the z scale value is 0.5 and 10% if the z scale value is 0.1

l


Please have a look at this picture
“Now” is showing where all instanced object with random value bending with
strict absolute value. Short or Long, it is bending as it should and as consequence short z-scale instanced object is piercing the long z-scale instanced object

“Goal” shows the instanced object not piercing it’s next object because
shorter object is relatively less affected by the bending value.
So in fact, short objects are long objects fully bent but cut and trimmed.
This way none object is piercing other object

Does this have to work only with curves or should it work with all kinds of instances?

1 Like

Thank you for your interest and helping me.

I think if it works with curve it’s fine since we can convert curve to mesh! But ultimately it should be connected to instance input node (of Instance on Points)
to replace the points to this curve object.

Here I attach the updated file close to goal.blend
close to goal.blend (555.6 KB)

In the file please try to change the value of “Length” in “Curve Line” node
and then
change the value of “Scale” in Instance on Points node

you will see they perform differently and the result what I’ve been describing in this post is the one tweaking the length (not the scale of instance on points)

Now When changing the scale I want it to perform the same as changing the value of Length. I need this and my goal is achieved.

(You may tell me then, just change the value of length, but in that way I can’t have multiple variant sized curves as instance, size must be randomly fed to scale of instance on Points node but it must act as length

==

Please notice and imagine that if the random value is fed to Length
we will not have any curve bent touching other curve no matter their scale.
(Unless the bent value is high) that’s what I want

It looks like you want random trimming on otherwise identical strands. Instances can’t vary, that’s the point of instances, so you will have to realize instances first, then do the trim.

1 Like

Thank you for your kind suggestion!
Yes I think you have understood my aiming!
Personally I haven’t really used the “Realize Instance” node in the past so if you allow me to ask for clarification,
Do I need to put realize instance after “Insance to Point” node ? (so between Instance to point and group output)

and lastly how should I approach the trimming in this case? > x <

==Update==

following your guide, I’ve tried to use “Trim Curve” node after “Realize Instance” node but since my instance is already converted to mesh, trim curve is not working so I think I need to put “Trim Curve” node before “Curve to Mesh” node but after this yes the curve is trimmed but I don’t know what to do to get variant trimmed curves T_T

Use your random value with the trim curve

1 Like

yes by connecting the “random value” node to “trim curve” node I could get different variants of curves by tweaking the seed value but all instanced curve are getting the same trimmed length (obvisouly, as you said that’s how the instance works) but I want to distribute the curve with different length trimmed to the place of points, isn’t that doable or not possible ?

example if it was not a curve like in this case
by connecting random value to scale of “Instance to Points” node we can get
instanced object with different variant size.

I want to know if that is not possible in my case with trimming (random variant trimmed curves at the place of the points)

Not if you’re instancing first, realizing second, and trimming third