Why can't I use $ID when using the particle SOP

   3691   4   0
User Avatar
Member
4 posts
Joined: April 2008
Offline
If I set up soem particles using the particle SOP, my particles get a $ID attribute. Why can't I use this attribute in an expression?

I.e. If I put rand($ID) into one of the fields on the particle SOP, it says it doesn't recognise the variable, even though each point has $ID…?
User Avatar
Member
1631 posts
Joined: July 2005
Offline
Hi,

The problem is the attribute is created at birth but the expression depends on the attribute being existant. It's a small distinction but that's the way it works. I could be wrong here.

What would you like to do with the expression? Also, any reason for not using POPs? Unless, of course, you're using Escape.

Cheers!
steven
User Avatar
Member
4 posts
Joined: April 2008
Offline
Oh okay.

I tried to use it because I assumed the points get created, attributes initlalised and then forces get applied after that.

What I want to do is to use expressions like fit01(rand($ID+2342),5,10) in the forces tab of the particle sop to randomise forces between each particle.

I want to use the particle SOP as I want to use it in conjunction with metaballs and the force SOP to generate some weird directional and axial movements…

Thanks for your help btw!
User Avatar
Member
85 posts
Joined: July 2005
Offline
Well you can still use metaballs and the force SOP in POP using the POP Attractor. If you look at the help you will have some example how to get your force Sop working with that POP.
Gerome.
PS:The $ID variable in SOP will be available only when the particle is created.
User Avatar
Member
4 posts
Joined: April 2008
Offline
I will have a look at the attractor POP. Thanks very much for the tips guys..
  • Quick Links