Arrays - How to select/mod specific particle in a pointCloud

Discussions about SOFTIMAGEs© Interactive Creative Environment©
Post Reply
biOss
Posts: 10
Joined: 27 Mar 2012, 10:43

Arrays - How to select/mod specific particle in a pointCloud

Post by biOss » 05 Dec 2013, 11:26

Hi there,
I always getting hard times with Arrays.
I have a poinCloud (16x16 grid) and I want to select a particle from that pointCloud. I guess I can do that with getClosestPoint and a null object.
But I don't now how I can modify the point properties (like position, shape, color, etc.). I'm not sure we can do this kind of things in ICE but it seems logical to me.

With super-duper logical deduction, I did this setup below. And it is suprisingly(!) doesn't work.
Image

I think there is something wrong on my logical assumptions with Arrays in ICE. How can I correct this problem. How did you guys understand how arrays work?

caledonian_tartan
Posts: 253
Joined: 17 Feb 2010, 15:13

Re: Arrays - How to select/mod specific particle in a pointCloud

Post by caledonian_tartan » 05 Dec 2013, 14:02

you don't to select in array with get point ID.

what comes out there is already in per point context.

just plug into the source of a get data and call it "pointposition". NOT "this.pointposition" NOT "self.pointposition".
SI 2015 @ WIN7-64

biOss
Posts: 10
Joined: 27 Mar 2012, 10:43

Re: Arrays - How to select/mod specific particle in a pointCloud

Post by biOss » 05 Dec 2013, 16:52

Thank you caledonian_tartan.
I did what you said and it seems ok.
What about setting the new data of selected point (nearest point to null object).
Set Data\.pointPosition doesn't work for me.
I think Set Data\.pointPosition try to set every points in pointCloud. I guess I need to filter the nearest point when I want to set it. But how ?
Couldn't I just say to ICE which particle I want to set ?

Image

caledonian_tartan
Posts: 253
Joined: 17 Feb 2010, 15:13

Re: Arrays - How to select/mod specific particle in a pointCloud

Post by caledonian_tartan » 05 Dec 2013, 16:55

for the set data you need to set "self." or "this." before "pointposition".
Just like you did with the tmp attribute

or just grab the factory "Set Particle Position" Compound.


EDIT: and yes. like that all points will be moving. one possibility is to use a "test particle ID" and connect to an "if" node and the "if" node to your "add" node. so the particle with the defined ID (from test) will do what you put in the "true" port and the others will go through "false"
SI 2015 @ WIN7-64


biOss
Posts: 10
Joined: 27 Mar 2012, 10:43

Re: Arrays - How to select/mod specific particle in a pointCloud

Post by biOss » 06 Dec 2013, 13:53

@caledonian_tartan: set point position doesn't work for this setup. It says structure mismatch. I think pointPosition and the data comes from GetClosestPoints->get pointPosition are different thing. I find a video on vimeo. Stephen Blair explain why this happens.
https://vimeo.com/31719315#at=0

So I change the setup like this.
Image

Now I can set pointPosition. But all points are at the same coordinate now.

So I filtered them like you said before.
Image

But when I try to connect getClosestPoints output to testParticleID input it says;
Image

Thank you @Bullit I will try.
Any advice ? :o3
Last edited by biOss on 06 Dec 2013, 14:58, edited 1 time in total.

User avatar
xsisupport
Posts: 713
Joined: 09 Jun 2009, 11:02
Location: Montreal Canada
Contact:

Re: Arrays - How to select/mod specific particle in a pointCloud

Post by xsisupport » 06 Dec 2013, 14:29

Maybe try using a Filter instead.
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage

biOss
Posts: 10
Joined: 27 Mar 2012, 10:43

Re: Arrays - How to select/mod specific particle in a pointCloud

Post by biOss » 06 Dec 2013, 16:11

Thank you Steve.
I feel I'm getting close to it.

Could I kindly ask why my "get id" node turned red ? ^:)^
Image

User avatar
xsisupport
Posts: 713
Joined: 09 Jun 2009, 11:02
Location: Montreal Canada
Contact:

Re: Arrays - How to select/mod specific particle in a pointCloud

Post by xsisupport » 06 Dec 2013, 16:32

No ID
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage

User avatar
xsisupport
Posts: 713
Joined: 09 Jun 2009, 11:02
Location: Montreal Canada
Contact:

Re: Arrays - How to select/mod specific particle in a pointCloud

Post by xsisupport » 06 Dec 2013, 16:34

xsisupport wrote:No ID
ID is a special ICE attribute. It applies only to points, and you cannot set it manually. The ID attribute is automatically set by the Add Point and Clone Point nodes as well as by any compounds that contain them (including the various Emitters and Spawning compounds). However, if you get a point cloud from the Get Primitive menu, the ID attribute has not been set. As soon as you connect an Add Point node, ID is initialized and set for all points. The ICE framework ensures that IDs are always unique and never reused. In particular, the Clone Point node and compounds that include it (such as the Spawning compounds) copy every attribute except the ID.
// Steve Blair
// "You're not a runner, you're just a guy who runs" -- my wife
//
// My Blogs: Arnold | Softimage

biOss
Posts: 10
Joined: 27 Mar 2012, 10:43

Re: Arrays - How to select/mod specific particle in a pointCloud

Post by biOss » 06 Dec 2013, 20:26

Oh, now I got it !
Everything is clear and working now.
Thank you so much Steve.

Post Reply

Who is online

Users browsing this forum: brandwatch [Bot] and 57 guests