Game Development Community

Particles Dissapearing when their source goes off-screen

by Jay Barnson · in Torque Game Engine · 02/20/2006 (7:20 pm) · 5 replies

Hey folks.

I have a little problem that I was hoping someone might have a quick & easy answer to.

I have some objects that are leaving a particle trail behind them as they fly along (they are *cough*flyingcows*cough*). The problem is that when the source object goes outside the camera's view frustrum, all the particles emitted by the attached emitter also dissapear - though the particles are still within the frustrum and should still be visible.

Here's a pic:

www.rampantgames.com/blogimages/ac-smoketrail.jpg
The moment the back edge of the cow model at the upper left crosses the edge of the screen, the smoke trail behind it instantly dissapears, which is an ugly effect. Even worse, if you move the camera so that the cow is now even partly within the viewport, the entire trail behind it springs into being.

Is there a quick & easy way to extend the visibility of the particles from the emitter somehow?

Jay Barnson
Tales of the Rampant Coyote

About the author

Jay has been a mainstream and indie game developer for a... uh, long time. His professional start came in 1994 developing titles for the then-unknown and upcoming Sony Playstation. He runs Rampant Games and blogs at Tales of the Rampant Coyote.


#1
02/20/2006 (8:07 pm)
We see this in our game as well. Whenever you throw a grenade a big dust particle explodes into the air, however if the grenade source goes off screen the entire dust particle dissapears, and then comes back when its back inview.

Would love to find a solution for this.
#2
02/21/2006 (6:44 am)
I too have noticed this, quite annoying. Unfortunately I haven't worked out a fix as yet :(

Nice helicopter by the way :)
#3
02/21/2006 (7:50 am)
Yeah, whoever did the helicopter is a friggin' genius... :)

It looks much better than my cows.

So nobody has an answer to the particle-trail problem yet? I suppose one thing I COULD do is create a mounted invisible object off the back of the the rocket (in this instance) with a long collision volume, and have IT spawn the particles - but I'm going to have to do something similar for EVERY object that has some kind of particle trail. I'd rather adopt a more generic option if there is one.
#4
02/21/2006 (2:08 pm)
This resource:

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9643

dealt with a similiar problem with shadows, so maybe it will be a good starting point.

Another idea is to expand the bounding box of the emitter to include the maximum distance away of a particles.

-Jeff
#5
02/23/2006 (7:28 pm)
Hmmm.... I didn't even think about expanding the bounding box of the emitter. Thanks Jeff! That could be the ticket.

I've noticed a similar problem with shadows... so I may have to follow what you did there (but using the TLK) to make sure shadows don't vanish when objects move offscreen.