Archived

This topic is now archived and is closed to further replies.

Smoke trails...

This topic is 5650 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all! Do you know any cool method to create smoke trails? I have tried with a particle system but I must spawn a lot of particles if I want a nice effect. Any suggestion are welcome!

Share this post


Link to post
Share on other sites
I was trying to implement some dynamically created quads joined together in a stream. They would slowly expand outwards as billboards, and their endpoints would be properly connected, so there would be a lot of algebra every frame (since the orientation of the billboards depends on the viewpoint).

Also, the trail slowly fades away starting at the far end, and the texture is a smoke trail with an alpha component to it, and is tile-able along one dimension, that has a billowing animation effect.

I never totally implemented it, not yet anyway, so I don't know how good or bad it ultimately would look.

It's kind of an enhancement of the smoke trail behind the missiles in Half Life.

It probably wouldn't work well for a train or a fire, but I think it's suitable for jets and missiles.


[edited by - Waverider on June 24, 2002 10:58:04 AM]

Share this post


Link to post
Share on other sites
Well, I''ve been wondering about the same thing. What I was trying to do was implement a smoke trail (a general purpose one) without having to use a particle system (most of them intimidate me).

So I thought about it. Let''s say we have a sprite (sprite[4]) of a ball of smoke. Lets say sprite[4] is when its fully bright, sprite[3] is when the brightness starts to fade, sprite[2] is when the transparency really kicks in, sprite[1] is when its barely visible, and sprite[0] is when you cant see it at all.

Then lets think about a trail. If we fire a missile, it will go on a path. Lets say that path is

A-B-C-D-E-F-G-H-I-J. SO the missile goes from A to J.

Well, At point A, where we fire the missile, we create a sprite. Then when the missile reaches point B, we reduce the original sprite''s transparency down one and create a new sprite.

So in essence,

@A: sprite1[4]
@B: sprite1[3], sprite2[4]
@B: sprite1[2], sprite2[3], sprite3[4]
@C: sprite1[1], sprite2[2], sprite3[3]
@D: sprite1[0], sprite2[1], sprite3[2]
@E: , sprite2[0], sprite3[1], sprite1[4]
@F: , , sprite3[0], sprite1[3], sprite2[4]


Hopefully you understand that. The only reason it goes back to sprite1 and sprite2 is because its easier on your memory. You could always use a sprite5 if you want.

So basically whats going on is the first sprite is placed and goes until it wears out. While its burning, the second sprite is placed, and -it- goes till it burns out. While -it- is burning, the third sprite is placed, etc.

Hope that helps.
~Dwarf

Share this post


Link to post
Share on other sites