creating glowing bullets?

i’ve seen in a lot of opengl games use an effect where they have those energy type bullets, you know the onces that have a glow, how would you create such things?

i’ve attached some examples,

http://www.geocities.com/sulim_2000/1.png

http://www.geocities.com/sulim_2000/2.png

http://www.geocities.com/sulim_2000/3.png

are these just sprites or has there been some special effect or something done here (maybe particles system)?

thanks

Those bullets probably use the GL_BLEND option, which allows you to do Alpha Blending. Put simply:

  1. Get a kick-ass artist to create a nice glowing bullet. (I say kick-ass, because I sure as hell can’t do it! :))

  2. Ask the artist to add a blurred partial transparency layer to the bullet, to give it that “glow effect”.

  3. Render on screen after calling “glEnable(GL_BLEND)”. You may have to call glBlendFunc() to set the right blending method before you render to the screen.

Does that help?

more specifically ,a lot of those effects use a simple GL_ONE ,GL_ONE blend which can give great results with the right texture. I’ve found that a fairly simple texture fading from (say) blue to black can look fantastic if you add in a smidgeon red and green in the middle. If you use an additive blend then even a small amount of particles together will give you a white core fading to blue at the edge of the bullet/explosion/whatever you’re trying to jazz up as the RGB values oversaturate in the middle.

D.

also another thing is that the bullets seem to make every thing they go near glow as well (you know light up, from light of the bullet).

hows would that be down?

thx

Depends on the game. You basicly render the stuff around the bullet brighter. This can be very complex.

You can also use lighting.

There was some recent discussion on glowing objects on GD-Algorithms:

http://sourceforge.net/mailarchive/forum.php?forum_id=6188&max_rows=25&style=ultimate&viewmonth=200412

If you want something more advanced than just blended sprites then you need screen-based glow/bloom (which I use in Quix). Theres a good article on it on Gamasutra.com (“Tron 2.0 glow” or something like that).

Would this technique work in a 3D? Cause I have experimented with it and I cant make it look good, from all angles.

Works great in both 2d and 3d ('cos its just a screen-space effect). A bit heavy on the fillrate though.

[quote][…]

  1. Get a kick-ass artist to create a nice glowing bullet. (I say kick-ass, because I sure as hell can’t do it! :))
    […]
    [/quote]
    http://kaioa.com/k/shaft.jpg

For creating that light saber ish effect the “kick ass” artist (eg me) needs to create a very “tricky” texture like this one:

http://kaioa.com/k/lightning3newnpm.jpg

;D

yeah yeah stop being clever and tell me how the hell I am supposed to create glowing bullet traces . Right now I am using a somewhat ugly GL_LINE. Tried with some geometry but that stank

???

Oh forgot to mention that the texture is put onto 3 billbords in that case. The glowing magic in this case is the result of filtered scaling together with add blending. With 1:1 pixels you would need to create the blurryness yourself.

Well, basically you just create a black texture with some rather dark colors and some gaussian blur.

Not all good loking effects are hard to do :wink:

edit: A single billboard would have done the trick. For the same effect the glow color should be a tad brighter than (because it’s added only once and not 3 times).