Using particle collision attributes

   4458   7   1
User Avatar
Member
17 posts
Joined: March 2014
Offline
Hi. I'm still struggling with some basic concepts in Houdini.
I was playing with POP Collision Detect node and the node adds several collision attributes to particles - like hitnml, hitpos etc. What are my options of accessing and using these attributes? What I would like is to use hitnormal *(hitnml) attribute in POP Replicate to set initial velocity for new particles. Is this even possible?

Thanks
User Avatar
Member
17 posts
Joined: March 2014
Offline
Currently the only solution I found is by using POP Wrangle and setting @v to v@hitnml there. As Pop wrangle is executed every frame, i'm doing age check - if (@age < 0.05) and setting @v only then. Is there any other solution to make POP Wrangle to set @v only once - when the particle is born?
User Avatar
Member
210 posts
Joined: Jan. 2008
Offline
kurzemnieks
Currently the only solution I found is by using POP Wrangle and setting @v to v@hitnml there. As Pop wrangle is executed every frame, i'm doing age check - if (@age < 0.05) and setting @v only then. Is there any other solution to make POP Wrangle to set @v only once - when the particle is born?

I think there is a “just born group” or “born group” in the replicate POP.
This group contains the particles spawned on current timestep.
Then just set the wrangle node to operate on that group only.

Sorry I cant set up a file at this moment.
FX
Goodbye Kansas
User Avatar
Member
17 posts
Joined: March 2014
Offline
excellent!! thank you very much - that was exatly what i was looking for !!
User Avatar
Member
17 posts
Joined: March 2014
Offline
btw, stupid question - how do I access Point Number ($PT) from VEX code ? I could not find answer in docs.
User Avatar
Member
210 posts
Joined: Jan. 2008
Offline
kurzemnieks
btw, stupid question - how do I access Point Number ($PT) from VEX code ? I could not find answer in docs.

ptnum is the global vex variable for point number.
@ptnum in vexpressions.
FX
Goodbye Kansas
User Avatar
Member
17 posts
Joined: March 2014
Offline
Thank you!
User Avatar
Member
50 posts
Joined: July 2013
Offline
kurzemnieks
btw, stupid question - how do I access Point Number ($PT) from VEX code ? I could not find answer in docs.

Think you should use “ptnum” for VEX.

edit. I'm so slow at answering
  • Quick Links