PDA

View Full Version : Spawning a trail from a shape instance


Mafx
05-07-2007, 03:02 AM
Hi all,

I have a plane which gets hit with a missle and I have set up a second copy of the plane which I cut up into 5 pieces and grouped together again. I have a particle event that uses the geometry as a shape instance and the pieces fly apart and fall towards the ground.. all works well and the client is happy with that part etc etc.

BUT I want to spawn a trail from the pieces of geometry as I am using Afterburn with this and that is where it looks crap. Due to the fact the pieces are really just one particle when I spawn it the trail comes from one point in the geometry, as some of the pieces are large it doesn't look good at all.. what I would like is for the spawning to be coming from all surfaces on the instanced geometry.

I really can't figure out how to make this happen, can someone fill in the blanks for me on this one.

Thanks

S.

Bobo
05-07-2007, 03:14 AM
Hi all,

I have a plane which gets hit with a missle and I have set up a second copy of the plane which I cut up into 5 pieces and grouped together again. I have a particle event that uses the geometry as a shape instance and the pieces fly apart and fall towards the ground.. all works well and the client is happy with that part etc etc.

BUT I want to spawn a trail from the pieces of geometry as I am using Afterburn with this and that is where it looks crap. Due to the fact the pieces are really just one particle when I spawn it the trail comes from one point in the geometry, as some of the pieces are large it doesn't look good at all.. what I would like is for the spawning to be coming from all surfaces on the instanced geometry.

I really can't figure out how to make this happen, can someone fill in the blanks for me on this one.

Thanks

S.


*Bake the animation of the particle chunks to actual geometry objects or just drive them with the particle system as described in the "Particle Motion Transfer to Scene Objects" tutorial in the MAXScript reference or my page.
*Then use these animated plane pieces as the emitters of particles using Position Object operator.

Mafx
05-07-2007, 03:28 AM
I can see how it works from the sample file but am not sure how to change that script to represent the 5 pieces of geometry I have so I can use them as emitters.

The flow is simple enough as is the flow I have for this one event.. just not sure what to put here;
global My_Athmospheric_Gizmos_01 = $SphereGizmo*

when it comes to my geometry.

ta

S.

Bobo
05-07-2007, 04:01 AM
I can see how it works from the sample file but am not sure how to change that script to represent the 5 pieces of geometry I have so I can use them as emitters.

The flow is simple enough as is the flow I have for this one event.. just not sure what to put here;
global My_Athmospheric_Gizmos_01 = $SphereGizmo*

when it comes to my geometry.

ta

S.

If your pieces are named identically, for example "PlanePiece01", "PlanePiece02" and so on, you can put there

global My_Athmospheric_Gizmos_01 = $PlanePiece*

If they are not, you can just list the objects in an array like

global My_Athmospheric_Gizmos_01 = #($SomePiece,$AnotherPiece,$Piece03,$YetAnotherPiece,$TheLastOne)

assuming that these are the names of the pieces...

Also, be sure to remove the line

My_Athmospheric_Gizmos_01[i].radius = 10 + pCont.ParticleAge*2

since your planes do not have a radius like the gizmos.

Mafx
05-07-2007, 05:15 AM
ok all the pieces are prefixed with debris_

so I have this;
on ChannelsUsed pCont do
(
pCont.useTM = true
pCont.useAge = true
)

on Init pCont do
(
global My_Athmospheric_Gizmos_01 = $debris*

)

on Proceed pCont do
(
partcount = pCont.NumParticles()
count = amin #(partcount,My_Athmospheric_Gizmos_01.count)
for i in 1 to count do
(
pCont.particleIndex = i
My_Athmospheric_Gizmos_01[i].transform = pCont.ParticleTM

)
)


on Release pCont do
(

)


The particles are not picking up the geometry but the particles themselves are not following the speed settings and the like as soon as the above script is kicked in. So with that I can test setting the pieces up as geomtry to get them to spawn...

spot who isnt good with MS!!

S.

PsychoSilence
05-07-2007, 10:14 AM
a more cheap approach would be the use of a mesher compound object. i attached a simple setup below...

kind regards

anselm

Mafx
05-07-2007, 11:05 AM
yes that will do nicely except I can't seem to orientate the mesher in any sort of correct fashion. I have the PF emitter attached to an object so I want the mesher to obviously spit out the particles from that point but it seems to be all over the shop.. is there a trick to the mesher.

Thanks heaps for the sample.

PsychoSilence
05-07-2007, 11:19 AM
the mesher and the flow should be at the same position to match. treat the mesher as an animated snapshot of your particle shape. i bet there are dozens of better explanations on what mesher is or does but this might help as well :shrug: maybe align the mehser to your flow and then link it. you really should give bobo´s approach a go as well!!!

cheers

anselm

Mafx
05-07-2007, 11:53 AM
I really tried bobo's way I just couldn't get it to do what I wanted. I had this weird issue where as soon as the frames hit the birth time the particles just dropped straight down... BUT when I scrubbed backwards the particles jumped to the correct spot with the geometry instanced but it was tiny.. 1% or so of what it should be.. play it forward the particles just drop.. scrub back they whoosh out to where they should be but obvioulsy in reverse..

very weird indeed.. I wish I could as I have the particles doing exactly what I need them to so if I can get the geometry on it and then be able to put the trails on that geometry oh how it would all come together.. just can't get the script to work.

S.

CGTalk Moderation
05-07-2007, 11:53 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.