Jump to content
xFlaye

Set height of iterated objects based on curve height position

Recommended Posts

Posted (edited)

Hi,

I've created a basic picket fence setup. Each picket is positioned on a ground fence segment based on its width, as well as the segment's length.

 

image.png.204c4fc49c98103750bb4c46dad4e6f0.png

There's a curve_height that I want each individual picket to extend to. I'm currently stuck as to which part of the for-loop to put it in.

The curve_height section is in the red network box.

Thanks for the help.

 

picketFence_w21_alternateHeight1.hipnc

Edited by xFlaye
Added tags & cleaned up file.

Share this post


Link to post
Share on other sites
4 hours ago, xFlaye said:

Hi,

I've created a basic picket fence setup. Each picket is positioned on a ground fence segment based on its width, as well as the segment's length.

 

image.png.204c4fc49c98103750bb4c46dad4e6f0.png

There's a curve_height that I want each individual picket to extend to. I'm currently stuck as to which part of the for-loop to put it in.

The curve_height section is in the red network box.

Thanks for the help.

Hi,

the new nodes and nodes I've changed are green.

 

Fance.png

picketFence_w21_alternateHeight1_01.hipnc

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Thank you, @vicvvsh!

So that I'm clear on the process, you've created an attribute (pt_id) to every point on the ground curve and set the height value from the curve_height to each of those pt_id's. Then copied that to the scale parameter. Thus, every picket now will scale according to the value represented by the assigned point.

That's an elegant and efficient solution.

Much appreciated.

Share this post


Link to post
Share on other sites
13 minutes ago, xFlaye said:

So that I'm clear on the process, you've created an attribute (pt_id) to every point on the ground curve and set the height value from the curve_height to each of those pt_id's. Then copied that to the scale parameter. Thus, every picket now will scale according to the value represented by the assigned point.

Yes, that's right. v@scale is non-uniform scale point attribute - https://www.sidefx.com/docs/houdini/copy/instanceattrs.html

  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×