Pop wind Air Resistance parameter depending of points age

   2129   3   1
User Avatar
Member
4 posts
Joined: Dec. 2019
Offline
I have a basic Pop Network, with Pop Source which give me the point age attribute and I have Pop Wind node in which I want to set up the Air resistance parameter for each point depending on current age of the point.

How to write this expression in Air Resistance channel?
Thanks!
Edited by AlexandrBognat - Oct. 6, 2023 13:57:30

Attachments:
Untitled-1.jpg (340.1 KB)
Untitled-2.jpg (159.2 KB)

User Avatar
Member
69 posts
Joined: July 2017
Offline
I'm unable to see your images, but this is simply done with a little VEX in the Pop Wind node.
You can hover over any channel to see the VEX name. Don't have Houdini open in front of me, but I believe Air Resistance is airresist. Just hit the "Use VEXpressions" toggle to enable the VEX code.

So in VEX you can simply type
airresist = 0;

Only thing to note is there's no @ infront of the airresist variable. From there, it's just regular vex code.
Depending on what you want, you can normalize or fit the @age between some values and add/multiply it with the airresist variable.
Trond Hille - Houdini FXTD at NOV
User Avatar
Member
542 posts
Joined: Nov. 2016
Offline
As Tronotrond said, and it can be convenient to multiply the existing air resistance value by your remapped age so that you can still change the value easily.

Something like

airresist *= fit(f@age, 0, 10, 0.1, 1);

will allow you to still control the amount of air resistance with the slider.
User Avatar
Member
4 posts
Joined: Dec. 2019
Offline
Thanks guys!
While my post was being moderated I found the following solution for my situation:
Edited by AlexandrBognat - Oct. 6, 2023 13:54:24

Attachments:
Untitled-2.jpg (74.4 KB)

  • Quick Links