vops and Rand ID

   2866   2   0
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Hi All ,
I am trying to assign an attribute to each particle based on ID. This attribute is called $RANDSTART . Each ID gets assigned an integer number. To represent a start frame. My question is when inputting 100 points do I get so many numbers assigned by my attribute repeating.
I would be extremely interested as to why. As ever please look to the details view.

r

Attachments:
randnumbertoID.hip (71.5 KB)

Gone fishing
User Avatar
Member
8551 posts
Joined: July 2007
Offline
it is random so it is natural to get repeated values
you have 100 points and each one has random int number 1-100
you cannot expect each to have different number

just change your attribute to float and you will see that they are different before rounding to int

you can also add parameter to change seed of the random to get different set of numbers
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Thanks for clearing up the issue I am having with the rand VOP. I did look at the float values with the handy print vop.
I did get a better spread of numbers after inputting an “ add constant ” VOP before the rand VOP and using it as a seed value.

r
Gone fishing
  • Quick Links