PDA

View Full Version : Can I delete particles from a cache based on the particle phase? (it's a Lagoa sim)


CerberusC
07-17-2012, 06:16 PM
Hi Guys.

Another question for today:

Can I delete particles from a cache based on the particle phase? (it's a Lagoa sim)

The target for that is that i want to create two different meshes, one mesh will contain all the simulation, no matter what phase i'm using, and i want the other just with one of the two phases i'm using, so my objective is to cache the simulation and delete all particles that don't belong to the phase i want.

Cheers.

CerberusC
07-17-2012, 07:26 PM
Ok, i've done it.

I can't access the phase information, because there is no such information in the cache (can it be added?), but i used the particle color, since i used two different colors for every phase, i used the particle color, i converted it to RGBA and then the scalars to a vector4, then i did the same with my predefined color, i passed a simple comparison equal test, and used an if to test it, then if it was true, i deleted the particles, and solved! i have my two different particle caches :D

Hope this helps another newbie in the future :)

Cheers.

CGTalk Moderation
07-17-2012, 07:26 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.