View Full Version : TP targeting particles
paulselhi 07-09-2004, 02:05 PM I can see how to make an object become a target of am emitter's particles but how would you go about making particles targets of another emitter ?
Lets say i have two emiiters, one pumping out cubes the other spheres
i now setup a third- missile emitter and i want the missiles to only target the spheres
Is there a way to do this ? and in general if using a taget object is there a way to recognize that one target has been "locked on" and subsequent missiles must choose a new target
ohh..ohh... and is there a way to have the targets die on impact, i see how to kill the missiles with a pfragment but not the targets
|
|
Hi,
can be done but nothing for the faint of heart ;)
First step is to make your particles identifiable. Either use Loco and it's particle ID ports or one of my setups on www.bonkers.de to give each particle a unique id. It's enough to have a unique id within a particle group.
You need a Data field to store the particles ID as well as a field to store the locked particles id. By default set this to a value that will never be used. When fireing the missiles you can use the PPassABs feature of radius to determine which Sphere particles are within range.
.
.
.
Somehow it's easier with a scene :)
Please find a working example here http://www.bonkers.de/download/tp_singletargetrockets.c4d
Shouldn't be to hard to understand, if you run into problems just ask.
Cheers
Srek
paulselhi
07-09-2004, 03:09 PM
Thanks Srek i am d/l at the scene nowas an aside i got the particles to die on collision with each other by dissecting the TP particle collision preset removing the repluse node and adding 2 PDIE nodes and hooking up their input particle and on ports to the PPASS and TP partcle Collision nodes
If anyone want to try this the prest is in your object libary TP Particle Collisions
paulselhi
07-09-2004, 07:30 PM
Brilliant Srek !! You are indeed C4D's most powerful plugin !!
Here is a quick test animation i did using youir setup and some additions, it needs a lot of tweaking but at least now i know the base theory !!
http://www.black-and-white-to-color.com/stuff/misilelock.avi 2.89 MB DivX
Leebre
07-09-2004, 08:17 PM
Nice example paulselhi. Are the rockets actually speeding up as they lock onto a target? It looks like it anyway. I'm guessing PC for the smoke trails and explosions? Now you need some avoidance by the green guys and some explosion debris. Cool stuff.
paulselhi
07-09-2004, 11:09 PM
Actually i was not too happy with my spring settings and i think they are speeding up too much and there is ome weird behaviour as if some are locking on to the same target and when that dies the second rocket "bugs out" and flys off on a wild tangent
The explosion is a pfragmnet effect with the fragments being pyro fireball, the spaceships and the rockest are set to die via the PDie i mentioned earlier
yes pyro for the trails ( emit from particles - the rockets) and explosions
Yes avodance would be fun, not sure how to do that either !! srek ????
Yes avodance would be fun, not sure how to do that either !! srek ???? Well, you have the targets position and velocity and the rockets position and velocity. Extrapolate the future position of both, get the difference and subtract a part of it from the targets velocity vector. You can even change the length of the velocity vector, thereby accelerating the target away from the rocket. Caution, you might like to cap of the top velocity otherwise this might end in a pretty fast chase ;)
Cheers
Srek
CGTalk Moderation
01-18-2006, 04:00 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.