I haven't used ICE in 6+ years so I can't tell exactly how to do it in
there but assuming that you have access to a random function returning
uniform distributions in the range 0 to 1, it would be as simple as:

ratio = 0.6
do_select = rand(particle_id + some_sort_of_seed) < ratio

A random function with uniform distributions (the default implemetation in
CG softwares) means that the generated numbers are evenly distributed
across the 0 to 1 range, so you've got 60% of chance to end up with a
number comprised between 0 and 0.6, and 40% of chance to have it between
0.6 and 1.


On 11 April 2016 at 15:57, Olivier Jeannel <[email protected]> wrote:

> Hi guys,
>
> This is a case that keeps coming every once in a while. I'm scratching my
> head on it this morning.
> In Ice, lets say you have 10 particles, and you want to "select" 60% of
> them randomly.
> ("select" means 60% with an attribute of 1, and 40% with an attribute of 0)
>
>
> How would you do that ?
>
> ------
> Softimage Mailing List.
> To unsubscribe, send a mail to [email protected]
> with "unsubscribe" in the subject, and reply to confirm.
>



-- 
Christopher Crouzet
*http://christophercrouzet.com* <http://christophercrouzet.com>
------
Softimage Mailing List.
To unsubscribe, send a mail to [email protected] with 
"unsubscribe" in the subject, and reply to confirm.

Reply via email to