PDA

View Full Version : Particle Collisions?


Tiziano
12-14-2005, 08:48 PM
Is it possible to change a particle's color once it collides with another particle?

Basically I have two emitters that point at each other. Once the particles from each emitter hit each other I'd like them to change color while the remaining particles stay the same.

So far I think this is a TP problem for which I'm still learning.
I've tried a simple Xpresso collision node but it seems I'm missing something in concept as I'm unable to succeed.

Can someone put me on the right track with this or is it even possible to do in the first place?

Tiziano
12-14-2005, 09:05 PM
I 'may' have found the answer over here:
http://bonkers.de/tp/knowhow.html#singleout

Srek
12-15-2005, 07:58 AM
Yes, thats your basic solution. In case of a collision it depends on how you handle the collision. If you do it with a PPassAB node with a detection radius just put the particle from the Pass you want in a different group, if you use some other setup to detect the collision just use the very same result to trigger a PGroup node to switch the particles from one group to another.
Cheers
Björn

Tiziano
12-15-2005, 03:42 PM
Thanks Srek,
I tried a bit last night but no luck yet.
When I get home from work I'll give it another shot :thumbsup:

Tiziano
12-17-2005, 01:52 AM
Well, I can't figure out the collisions :banghead: .
I'm finally able to get two emitters to emit colored particles (thanks both to Srek's site and some at C4dCafe :thumbsup: ) but I can't seem to figure out how to detect a collision between particles from each emitter.

:shrug: Wondering though whether I'm approaching this correctly? Would I be better off comparing distance rather than looking for a collision?

Anyway, attached is the current file to show my route.

Srek
12-17-2005, 09:55 AM
Hi,
you are trying to use two seperate PPass nodes for this, this can't work.
Take a look here for more oinfo on this: http://www.bonkers.de/tp/knowhow.html
Also you are checking on an exact distance of zero, this will probably never ever happen. You will have to check on two times the particle diameter (or any value you want) and lower.
PPassAB can make this much easier, it already has an option to limit particle iteration to particles within a set distance. It's not only easier to use but also much faster since particle that are not within the distance are not used in the iteration.

Cheers
Björn

Tiziano
12-17-2005, 07:45 PM
Also you are checking on an exact distance of zero, this will probably never ever happen. You will have to check on two times the particle diameter (or any value you want) and lower.
PPassAB can make this much easier...

:lightbulb

Two times the diameter. Hmmm. I would have thought it would be two times the radius?
So is it checking from the center of the particles?
Maybe learning this will keep me young :D .

Srek
12-18-2005, 09:44 AM
:lightbulb

Two times the diameter. Hmmm. I would have thought it would be two times the radius?
So is it checking from the center of the particles?
Maybe learning this will keep me young :D .

I realy meant two times the radius or if you have particles of different size both radii added.
Cheers
Björn

CGTalk Moderation
12-18-2005, 09:44 AM
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.