Scale up/downwards while copy stamping

   2006   2   0
User Avatar
Member
27 posts
Joined: Dec. 2017
Offline
Hello!
I am currently making a plant in Houdini and I have started with a polywire in which I copy my leaves to each point.
However, I would like the leaves to scale down in size alongst the wire(the higher you go the smaller the leaves get).

This is what I got at the moment

Attachments:
290413f32f390dbfa8ed4b83ba4ae86c.png (366.0 KB)

User Avatar
Member
2658 posts
Joined: June 2008
Offline
The scale of a copied object is controlled by the attribute @pscale when found on the points connected to the right input of the CopyToPoints node.

Place an attribute wrangle in points mode before the right input and try out this code.
f@pscale = fit(@ptnum,0,@numpt, 1, 0.5);
This assumes the points of the stem start at 0 near the ground and increase as it grows upward.

You can also use a ramp to draw a custom contour with code like this.
float index_into_ramp = fit(@ptnum,0,@numpt,0,1);
f@pscale = chramp("shape_me",index_into_ramp);
Remember to click the little Icon to the right of the code snippet box to auto create the ramp parameter.
Edited by Enivob - Feb. 14, 2018 13:18:31
Using Houdini Indie 20.5
Windows 11 64GB Ryzen 16 core.
nVidia 3060RTX 12BG RAM.
User Avatar
Member
27 posts
Joined: Dec. 2017
Offline
Thanks, it worked!
  • Quick Links