Hello,
I would like to generate a crowd, but having issue with some people generated 10 times and others just 2 times
I'm trying to generate as possible a fair number of each of my instances...
Basically if my particles were randomly placed i would solved this by using the particle ID as the Instance indice and voila, but here i'm generating particles along a curve, so the particle IDs follow... so it's not random.
I'm trying to make an array witch contain single IDs and would like to pick up and remove one by one each ID's, but after some work i'm resigned to say that i'm not understanding correctly arrays, it's a shame.
Could someone point me in the right direction ?
Thanks
Fair instance indice chooser
-
Mathaeus
- Posts: 1778
- Joined: 08 Jun 2009, 19:11
- Location: Zagreb, Croatia
Re: Fair instance indice chooser
Hi,
if you need random indices along curve, that might be:
First, 'Build Array From Constant' node. Put something more than zero for 'size', put some 'constant' node into 'value' just to initialize array (it can be integer, boolean...)
Then, 'Get Array Sub Indices', put this into 'ID' of 'Random Value' node. Set both 'mean value' and 'variance' to 0.5 - that's distribution between zero and one. Disable 'time varying'. Put random value into UV of 'UV to Location', put UV to Location into 'Add Point'.
if you need random indices along curve, that might be:
First, 'Build Array From Constant' node. Put something more than zero for 'size', put some 'constant' node into 'value' just to initialize array (it can be integer, boolean...)
Then, 'Get Array Sub Indices', put this into 'ID' of 'Random Value' node. Set both 'mean value' and 'variance' to 0.5 - that's distribution between zero and one. Disable 'time varying'. Put random value into UV of 'UV to Location', put UV to Location into 'Add Point'.
-
NNois
- Posts: 754
- Joined: 09 Jun 2009, 18:33
Re: Fair instance indice chooser
thanks matheus you point me in the right direction, here's an updated version of my compound who rules placement of my people, it works, thanks.
You do not have the required permissions to view the files attached to this post.