Arrays - How to select/mod specific particle in a pointCloud
Arrays - How to select/mod specific particle in a pointCloud
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.
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?
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.
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?
-
- Posts: 253
- Joined: 17 Feb 2010, 15:13
Re: Arrays - How to select/mod specific particle in a pointCloud
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".
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
Re: Arrays - How to select/mod specific particle in a pointCloud
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 ?
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 ?
-
- Posts: 253
- Joined: 17 Feb 2010, 15:13
Re: Arrays - How to select/mod specific particle in a pointCloud
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"
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
Re: Arrays - How to select/mod specific particle in a pointCloud
@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.
Now I can set pointPosition. But all points are at the same coordinate now.
So I filtered them like you said before.
But when I try to connect getClosestPoints output to testParticleID input it says;
Thank you @Bullit I will try.
Any advice ?
https://vimeo.com/31719315#at=0
So I change the setup like this.
Now I can set pointPosition. But all points are at the same coordinate now.
So I filtered them like you said before.
But when I try to connect getClosestPoints output to testParticleID input it says;
Thank you @Bullit I will try.
Any advice ?
Last edited by biOss on 06 Dec 2013, 14:58, edited 1 time in total.
- xsisupport
- Posts: 713
- Joined: 09 Jun 2009, 11:02
- Location: Montreal Canada
- Contact:
Re: Arrays - How to select/mod specific particle in a pointCloud
Maybe try using a Filter instead.
Re: Arrays - How to select/mod specific particle in a pointCloud
Thank you Steve.
I feel I'm getting close to it.
Could I kindly ask why my "get id" node turned red ?
I feel I'm getting close to it.
Could I kindly ask why my "get id" node turned red ?
- xsisupport
- Posts: 713
- Joined: 09 Jun 2009, 11:02
- Location: Montreal Canada
- Contact:
- xsisupport
- Posts: 713
- Joined: 09 Jun 2009, 11:02
- Location: Montreal Canada
- Contact:
Re: Arrays - How to select/mod specific particle in a pointCloud
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.xsisupport wrote:No ID
Re: Arrays - How to select/mod specific particle in a pointCloud
Oh, now I got it !
Everything is clear and working now.
Thank you so much Steve.
Everything is clear and working now.
Thank you so much Steve.
Who is online
Users browsing this forum: brandwatch [Bot] and 57 guests