A place to talk about CG particles...
login.php?sid=708ee30877e1560a5c8c8578df3705be profile.php?mode=register&sid=708ee30877e1560a5c8c8578df3705be faq.php?sid=708ee30877e1560a5c8c8578df3705be memberlist.php?sid=708ee30877e1560a5c8c8578df3705be search.php?sid=708ee30877e1560a5c8c8578df3705be index.php?sid=708ee30877e1560a5c8c8578df3705be

Orbaz Technologies Forum Index » Particle Flow Tools: Box#3 » Delete one of the particles if they are both in same posit-n
Post new topic  Reply to topic View previous topic :: View next topic 
Delete one of the particles if they are both in same posit-n
PostPosted: Wed Jan 09, 2013 6:12 pm Reply with quote
Viper
Joined: 29 Sep 2004
Posts: 97
Location: LA, USA




I spawn particles in a given volume. The spawned particles have a such spread as some of them spawn at the same position. I need to check if two particles spawned at the same position then I need to delete one of them.
I use Particles suboperator with Aggregated Property 'Number Of Neighbors' to check if particles are in the same position. So, if I have two particles in the same position then both particles will give the 'Number Of Neighbors'=1. How can I delete one of them after that?
View user's profile Send private message MSN Messenger ICQ Number
PostPosted: Wed Jan 09, 2013 7:04 pm Reply with quote
nickolay411
Joined: 12 Jan 2009
Posts: 296
Location: LA




Howdy!

This is how I'd go about doing it. You were right in using the particles suboperator but instead of number of neighbors I would choose Closest particle Index. Now use that index number through a input proxy subop to find its Particle position vector. Subtract the particle's position from the closest particle position to find your length. Now setup a condition that if the length is less than .1 or 1 or 10 that would test true into the amount change subop to active the Delete type. You would notice both particles actually get deleted... This is because box 3 still doesn't have for loops. Sad So you'll have to setup another condition to keep one of them from deleting. I used the condition if Birth index is smaller than the closest particle birth index then delete. now create a function type boolean and connect both of your conditions together into delete true. This should save one of the particles with a smaller ID from getting deleted. This may make zero sense... So I attached an scene file.

Cheers,
Nick



Delete_Neighbor_By_Distance.max
 Description:
max 2010 box 3

Download
 Filename:  Delete_Neighbor_By_Distance.max
 Filesize:  236 KB
 Downloaded:  387 Time(s)

View user's profile Send private message AIM Address
PostPosted: Wed Jan 09, 2013 7:18 pm Reply with quote
nickolay411
Joined: 12 Jan 2009
Posts: 296
Location: LA




Edit: I used a proxy flow. But you can just use the closest particle position aggregated property...
View user's profile Send private message AIM Address
PostPosted: Wed Jan 09, 2013 7:21 pm Reply with quote
Viper
Joined: 29 Sep 2004
Posts: 97
Location: LA, USA




Thank you! I like the idea of using Birth Index to select one of the particles. I will try to use it.
View user's profile Send private message MSN Messenger ICQ Number
PostPosted: Wed Dec 24, 2014 5:07 am Reply with quote
reeja
Joined: 24 Dec 2014
Posts: 1
Location: USA




thank you for your honest post, I really appreciate that.
CISA practice exam questions
View user's profile Send private message
Delete one of the particles if they are both in same posit-n
Orbaz Technologies Forum Index » Particle Flow Tools: Box#3
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Post new topic  Reply to topic  


Copyrightę 2004-2005 Orbaz Technologies, Inc. All rights reserved.
Powered by phpBB © 2001, 2005 phpBB Group
phpBB Style by Vjacheslav Trushkin