Jump to content

Set height of iterated objects based on curve height position


xFlaye

Recommended Posts

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.
Link to comment
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
Link to comment
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.

Link to comment
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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...