I would like to create a new attribute id on particles based on distance from origin.
So, how could i sort some particles at a specific frame, based on distance, like Sort SOP “Proximity to Point”.
I can calculate distance (length) in POP VOP, but how can i transform in unique integer, from 0 to X (0,1,2,3,…,X)
Thanks.
Sorting particles by distance (proximity to point)
9079 5 3-
- fsimerey
- Member
- 279 posts
- Joined: Dec. 2009
- Offline
-
- Mike Lowes
- Member
- 1 posts
- Joined: March 2014
- Offline
I've attached a file with a solution if this is what you mean.
Used a vop sop to calculate the distance from the origin for each point into an attribute.
Then use the sort node by this attribute…
Then a new id attribute based on point number. Copied the new id attribute back on to the original points in case you don't want to change the point order…
Hope this helps…
Used a vop sop to calculate the distance from the origin for each point into an attribute.
Then use the sort node by this attribute…
Then a new id attribute based on point number. Copied the new id attribute back on to the original points in case you don't want to change the point order…
Hope this helps…
-
- fsimerey
- Member
- 279 posts
- Joined: Dec. 2009
- Offline
Thanks for reply, but no, it isn't what i'm looking for.
I want to sort directly inside a POP VOP at a specific frame. I need to sort my particles and it's impossible inside a popnet.
I need this to attract particles on another animated geometry with a POP Attrack, and i want the closest particles be attracted by the proximity of geometry. So my geometry is sorted by distance from origin, and i want sort my particles in the same way but at a specific frame.
Thanks anyway
I want to sort directly inside a POP VOP at a specific frame. I need to sort my particles and it's impossible inside a popnet.
I need this to attract particles on another animated geometry with a POP Attrack, and i want the closest particles be attracted by the proximity of geometry. So my geometry is sorted by distance from origin, and i want sort my particles in the same way but at a specific frame.
Thanks anyway

-
- Sadjad Rabiee
- Member
- 1391 posts
- Joined: Dec. 2010
- Offline
-
- robonilla
- Member
- 84 posts
- Joined: May 2012
- Offline
If you are doing pops inside DOPs you can use a SOP solver with a SORT to sort them by proximity to your desired point and then use that attribute inside your POPVOP.
I did a quick example, check it out.
For ilustration I color the particles inside a POPVOP with a ramp based on the proximity id created based on proximity to a the Null object.
Is this what you were trying to do? or did I misunderstood?
I did a quick example, check it out.
For ilustration I color the particles inside a POPVOP with a ramp based on the proximity id created based on proximity to a the Null object.
Is this what you were trying to do? or did I misunderstood?
-
- fsimerey
- Member
- 279 posts
- Joined: Dec. 2009
- Offline
-
- Quick Links