How to get a given number of randomly chosen particles ?

Discussions about SOFTIMAGEs© Interactive Creative Environment©
User avatar
Adam Kesher
Posts: 19
Joined: 24 Oct 2012, 09:38
Location: Dijon, France

How to get a given number of randomly chosen particles ?

Post by Adam Kesher » 09 Feb 2014, 18:00

Hey people,
it's all in the title ;)
My point is, I have a point cloud in which I want to pick
a certain amount of particles and i dont really mind which
points are picked up. I just want to be able to select a
certain number of particles without having to enter each
ID in a string to array dialog box.
May seem pretty obvious and straightforward to some of
you but unfortunately I cant figure out what I'm really
missing to make it work.
Thanks in advance
Cheers

NNois
Posts: 754
Joined: 09 Jun 2009, 18:33

Re: How to get a given number of randomly chosen particles ?

Post by NNois » 09 Feb 2014, 20:01

Hi !

Get a "Test random probability" the ratio has to be between 0 and 1

A+

User avatar
Adam Kesher
Posts: 19
Joined: 24 Oct 2012, 09:38
Location: Dijon, France

Re: How to get a given number of randomly chosen particles ?

Post by Adam Kesher » 09 Feb 2014, 20:42

Hey
thanks a lot for the answer !
guess what, I have another question right now
What if I want to access that particular array
of points to, let's say, build another point cloud
based on those points ? can this array be
"memorized" in some way ?
Thanks !

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 07:44

Re: How to get a given number of randomly chosen particles ?

Post by Bullit » 09 Feb 2014, 22:06

In an Empty point cloud make an Ice tree.

Get 1st point cloud point position>add point node>ice tree

NNois
Posts: 754
Joined: 09 Jun 2009, 18:33

Re: How to get a given number of randomly chosen particles ?

Post by NNois » 09 Feb 2014, 22:49

humm,
to memorize and reuse later this array you need to collect it, there is two way, or you collect it an real array, or you don't collect it really but but a per particle "flag" on each to remember it, this "per point value" or "per object array".
Here a screenshoot that illustrate it.

With that on a new point cloud "cloud2" you can gather for example "get cloud1._mypositions > add point> etc...."
Or
if you are in per particle "get cloud1._im_selected > build array from set > find in array the true ones then select to point positions to create a new pcloud....
You do not have the required permissions to view the files attached to this post.

User avatar
Adam Kesher
Posts: 19
Joined: 24 Oct 2012, 09:38
Location: Dijon, France

Re: How to get a given number of randomly chosen particles ?

Post by Adam Kesher » 10 Feb 2014, 09:24

Thanks guys for the answer
NNois yeah I figured out last evening that I could
store them points in a custom value and reuse them
afterwards but your screenshot made it easier for
me to understand how to return different types of
contexts. Also I didn't know that Build In Array could
manage boolean values.
have a nice day