Sign in to follow this  

Muzzle Flash

This topic is 4831 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

Well I am a bit puzzled on how I could create such an effect. In most FPS games muzzleFlash are a animated QUAD.like this: This looks good if you stand in front or behind the gun. But it would be invisible from above or below the model. This might not be a problem and I could live with it. Can it be done so it works from above and below?. Perhaps a new longer animated texture???

Share this post


Link to post
Share on other sites
Easiest appreach would be to either use a simple model representing the flame (like the grenade explosions in quake2), or to use several alpha-textured quads laid in a "cross" to create an illusion of a volumeric flame. This method is commonly used to create trees in 3d games.

Share this post


Link to post
Share on other sites
A small model seems like the best solution.

I could make a simple tube and then a aplha layered texture?,or should the model be shaped like a flame with a reddish texture and some transparency?

Share this post


Link to post
Share on other sites
A 3D model representing that effect won't look so good.You might want to look for "axial billboarding".You can represent those 5 "flames" I see in the image with 5 textured billboarded quads.Each one of them will always face the camera,but as a whole,they will be a 3D entity that can be viewed from different angles.

Share this post


Link to post
Share on other sites
how about a cone?
aligned so that the pointed tip is in the gun barrel
and the base end fans out in front

then use that texture of yours on the cone, where you map it to the cone's x and y coords (z is the cone's long axis)

this way from the front it looks just like the normal flash
but from the sides you see it kinda spreading out and forward

Share this post


Link to post
Share on other sites
I agree that billboarded quad is probably your best bet. If you don't want to do the calculations to make it always face the camera, you can use the ARB_point_sprite extention (or the NV/ATI specific versions). When enabled, it generates texture coordinates for point primatives. This is especially good for performance when you have a lot of particles (such as a particle system) because you only send one vertex per particle instead of 4 for a quad...but in this case, it might just be a matter of simplicity so you don't have to do the math to make it always face the camera (unless you like that type of thing, then go for it!).

Share this post


Link to post
Share on other sites

This topic is 4831 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this