hello
i am using the copy to points to scatter some curves on my grid.
the problem is id like them to have random sizes. i can easily do this if i place a attribrandomize pscale into the grid points, but id actually prefer to use the length parameter instead(as im giving it thickness later i want all my curves tgo have same thickness)
sadly for some reason doesnt look like (dist) is working...
another question i have related to this is i also want to multiply my number of points from each curve by the length(so to ensure id get an even ammount of points even if the curves are way longer than others
please help!
thanks
how to use attribute randomize with length(dist) from curves
3722 5 1- mulafraga
- Member
- 30 posts
- Joined: Jan. 2012
- Offline
- Jikian
- Member
- 131 posts
- Joined: Aug. 2012
- Offline
For the first problem, you can always reset pscale after the copy to make sure they all have the same value.
Alternatively you can simply cache pscale value in another attribute, then rename that back to pscale when you need it.
e.g. in a point wrangle, f@thickness = @pscale;
Use a resample SOP for the second problem - Maximum Segments will force all lines to have the same number of segments
Alternatively you can simply cache pscale value in another attribute, then rename that back to pscale when you need it.
e.g. in a point wrangle, f@thickness = @pscale;
Use a resample SOP for the second problem - Maximum Segments will force all lines to have the same number of segments
- mulafraga
- Member
- 30 posts
- Joined: Jan. 2012
- Offline
- vusta
- Member
- 555 posts
- Joined: Feb. 2017
- Offline
- Jikian
- Member
- 131 posts
- Joined: Aug. 2012
- Offline
mulafraga
thanks this works great. but for learning purposes, if i actually wanted to override something as "dist" or some of the other parameters, it should be possible using the att randomize, right?
You can override pretty much any attribute you want. However, "pscale" is a special (scalar) attribute used by Houdini to apply scale on points. If you wanted your lines to use the "dist" attribute for length instead, I would suggest using a small for loop running over points, as in the example attached.
Other methods like using wrangle or VOP to build geometry are also possible, but in the simple case this should be sufficient.
Edited by Jikian - June 15, 2021 22:41:52
- mulafraga
- Member
- 30 posts
- Joined: Jan. 2012
- Offline
-
- Quick Links