Create Hail with POPs-per particle bounce/scatter direction?

   5827   4   2
User Avatar
Member
33 posts
Joined:
Offline
I'm a maya user new to Houdini and am trying to create hail using POPs. I want to create a per particle attribute to give random bounces so that particles bounce to different heights and also scatter in random directions upon collision with the ground. I'm assuming I'll need to create a new attribute and somehow incorporate either the velocity or acceleration POPs? I have tried using a state POP so that the first collision detected with $NUMHIT adds that particle to a group that could then be manipulated for a random direction…but no luck haha I would really appreciate any feedback or tips. Thank you.
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
First you may just want to shove an expression like this in the Gain Normal for the Collision POP:
fit01(rand($ID+10.001), 0.1, 0.3)
The rand returns a value from zero to one so I wrap this in a fit01() expression that allows me to remap it to, in this case, 0.1 and 0.3. You may find that you don't even need attributes with this amount of control in a single expression.

All you need to do to take complete control with attributes is to use an Attribute POP, build your attribute as you like, then just use the attribute as is in the Gain Normal field to control the bounce height.

You need to provide both the name of attribute usually in lower caps for the Name parameter and repeat with Caps for the Local Variable parameter. Just use the Local Variable name if it is a single float, the name with either 1, 2, or 3 to index in to a 3 element float or if a vector, the name with either X, Y or Z suffix.
There's at least one school like the old school!
User Avatar
Member
33 posts
Joined:
Offline
Thanks very much for your help…it worked out pefectly…Now I must go and practice/learn Houdini! Take care!
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
If you are liking what you see, then I highly recommend Will Cunningham's book: The Magic Of Houdini.

It goes in to great depths of Houdini's strengths. Houdini and it's predecessor PRISMS has been around for over 16 years. 16 years of SOPs and proceduralism. As one would imagine, over that time, there are a great number of procedural techniques that are just so foreign to any other application out there that to get a jump start, this book will do it.

After the book, check out the help cards in each operator's help. There are example files for each node.

Trust me when I say when you are jamming with houdini, you are at a completely different level than any developer or artist can provide. Artists that embrace proceduralism are truly liberated. Coders that embrace Houdini realise that they can get a lot more done faster.

Good luck.
There's at least one school like the old school!
User Avatar
Member
33 posts
Joined:
Offline
Thanks again for your tip…I've purchased Will's book and have already coverd 3/4 of it…This book plus the houdini help is rather amazing with all the examples and I'm starting to really understand/implement the power of proecuralism.
  • Quick Links