2
$\begingroup$

I've already been answered about how to randomly scale hair along emitter mesh's normals. This question is a bit different. Scaling hair along emitter's normals predictably changes splines' vectors: increasing the scale moves the hair tips further from the mesh and decreasing the scale does the opposite, but regardless to the positions of the hair roots. Here is the example: enter image description here I wonder if there is any possibility to scale hair length without changing their direction. I think the key could be in capturing endpoint and rootpoint positions of each hair spline, calculating vectors between them, and using them to offset endpoints positions. At least this is the approach I would use if I were writing a Python script. But I can not figure out how to capture splines' single elements with Geometry Nodes so maybe there is another way?

$\endgroup$

1 Answer 1

2
$\begingroup$

Since the curves here consist of several points, you would have to include all points in a uniform scaling.

You can solve this as follows:

enter image description here

First you multiply the index of the spline with the number of its points. This way you get the index of its first point per spline, whose position you query with Field at Index in the Point domain.

With Interpolate Domain you can now transfer this value to the whole spline, so that it is available for all points of the spline.

By creating a direction vector between the position of each point and this first point, you can scale it and use it as offset in the node Set Position.

This will scale all splines starting from their first point.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.