Particle color depending on velocity

   6957   2   1
User Avatar
Member
20 posts
Joined: 12月 2016
Offline
Hi all,

I am a new user to Houdini so I am in the middle of re-doing some of the Houdini tutorials - I have a POP network that I use to generate some particles that I later force (by using PopForce) to move randomly across a model and I wanted to color those particles depending on their velocity. I thought it will be an easy task but no luck so far.
First I tried to add Length node to convert x,y and z vectors into one value so I can later plug it into Fit node and then to Ramp Parameter. The problem was I still didn't know what the exact values are so I can re-map them correctly in the Ramp Parameter. I figured out that to get those values I can just connect Bind node to the Length node, named it let say “velocity” and then connect AttributeCreate to the Pop network to get values from the Lenght node. As it came out the Velocity values were between 0 and 8.
I tried to re-map those values but it doesn't work as intended - particles still get weird color values that dont't depend on their speed. I know I made a mistake somewhere
Can someone plese explain to me the proper way to do this.

Attachments:
houdini_screen.jpg (138.3 KB)

User Avatar
Member
280 posts
Joined:
Offline
create point wrangle node
add this expression:
f@speed=length(v@v);
create color sop
color type: ramp from attribute
set attribute to: speed
adjust min and max value
User Avatar
Member
20 posts
Joined: 12月 2016
Offline
Thanks for the quick reply and help - worked very nicely. Thanks
  • Quick Links