Jump to content
  • Advertisement
Sign in to follow this  
proctoglyvenol

Missile trails

This topic is 4249 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, I want to put smoke trails behind missiles for my flight sim game. The most obvious way is to put a number of smoke textured billboards back to back along the path of the missile. However, it's too expensive as there might be dozens of missiles flying around. I can just put a huge billboarded plane stretched in z axis for smoke and use an animated texture on it, but then I cannot curve it the way I want (homing missiles etc). So, what would be a cheap yet convincing way to implement trails? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Why do you think it is too expensive? Even if there are dozens of missiles in the air, that should not be a problem on modern hardware. If you don't have any special restrictions, I believe one particle emitter per missile would be the easiest/best way.

Share this post


Link to post
Share on other sites
B-old is right, you can push thousands of particles with minimal performance hit these days - especially if you billboard in a shader, you don't need to, but you can.

You could look at using Point Sprites, GL can do these, and I believe DX will be able to aswell. This is essentially 1 vertex per sprite, and they are billboarded for you by hardware/driver.

Share this post


Link to post
Share on other sites
Thanks for the reply. Even 128 sprites per missile brings down my frame rate by 10. Which I know is ridiculous. It might be a problem with my engine. I'll take a look at it. Thanks again.

Share this post


Link to post
Share on other sites
Which engine are you using? Are you testing your framerate in debug mode? Try building a release and check your framerate then.

Share this post


Link to post
Share on other sites
its most likely fillrate limited (easy to see when u draw the trails draw he sprites as 1 pixel big) if it is check how to improve that

Share this post


Link to post
Share on other sites
If you are rendering close to the camera i can imagine its fillrate related - otherwise I can not. You should barely feel a knock on framerate with thousands of particles - assuming geforce 5 or 6...

Share this post


Link to post
Share on other sites
Quote:
Original post by proctoglyvenol
I can just put a huge billboarded plane stretched in z axis for smoke and use an animated texture on it, but then I cannot curve it the way I want (homing missiles etc).


Half-Life 1 used this technique for rocket trails. They chopped the trail at regular intervals to allow for curves.

I.e. They create a billboarded plane starting from the firing point and stretching to the rockets position. After the rocket has moved a meter, that billboard becomes frozen, and a new one is created. The new one stretches from the end of the previous billboard to the rockets position. Repeat... and fade them out over time.

Share this post


Link to post
Share on other sites
Quote:
Original post by proctoglyvenol
Thanks for the reply. Even 128 sprites per missile brings down my frame rate by 10. Which I know is ridiculous. It might be a problem with my engine. I'll take a look at it. Thanks again.

Drops it by 10 frames from what initial value? If you're rendering at 500 frames per second, a 10 fps drop means nothing. If you're running at 60 and dropping to 50, though, yeah that'd mean that it's pushing something rather hard.

Also, what type of hardware do you have, and what minimum requirements are you looking for?

Share this post


Link to post
Share on other sites
Another thing to remember if using separate billboard particles is the speed of the missile and your update tick time - you may get gaps between your smoke particles.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!