How to apply SOP non-uniformly using point attribute?

   619   3   2
User Avatar
Member
10 posts
Joined: Nov. 2018
Offline
I would like to use a Sweep SOP to make a tube with randomized radius along curve, like this.

I used an Attribute Randomize SOP to set a point attribute @radius, but I am having difficulties accessing the attribute as a parameter in the Sweep SOP.

My intuition from VEX is to use the following:
point("../attribrandomize1/", @ptnum, "radius", 0)


But it doesn't work, and gives me an error.

Could someone explain to me why using @radiusworks on the PolyWire SOP, but not the Sweep SOP?
Edited by davidbk - Dec. 1, 2023 13:00:16

Attachments:
Screenshot 2023-12-01 125022.png (3.5 MB)
Screenshot 2023-12-01 125215.png (4.0 MB)
Screenshot 2023-12-01 125622.png (4.1 MB)

User Avatar
Member
4528 posts
Joined: Feb. 2012
Offline
Hi,

You can't break the execution of the Sweep SOP like that using per point expressions. You can just set pscale to be randomized instead:

Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
101 posts
Joined: Dec. 2019
Offline
Hi,

The Sweep SOP can use the @pscale attribute to drive the radius along the curve. So if you set @pscale instead of @radius in the Attribute Randomize, you should get the result you are looking for, without having to write any expression in sweep node.

EDIT : it's just same thing as said by @animatrix_ we were writing at same time ^^
Edited by ObeidaZakzak - Dec. 1, 2023 13:34:14
Houdini Pipeline Supervisor @ TAT Studio
User Avatar
Member
10 posts
Joined: Nov. 2018
Offline
Thanks @animatrix_ and @ObeidaZakzak !
  • Quick Links