I guess the way the fire looks in the first picture is the way you want it to look like, right?
Now, the problem you have in picture 2 is not a problem of the blending... you add colors, and the blending itself works perfect...
But to achieve the effect you want, you don't have to use ANY effect except using alpha channel.
So the problem lies not in your code, but in your fire image.
This one should be designed with alpha channel, so the parts which should be visible are with no or a bit transparency, and to the edges with more transparency.
<a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>
I have no fire image. These are all just untextured quads with different alpha values.
Don't you think this is a little "overload" for a fireparticle?
Have you tried not to use any blend effect? Just using Alpha? And if so, try decreasing transparency... maybe your "quads" are too transparent.
<a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>
Well, what do you suggest else? And no blending looks... crappy...
Instead of GL_ONE, GL_ONE
Try GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA
Or GL_ONE, GL_SRC_ALPHA
(I always forget which argument is which, so if it looks wrong you can try swap the two around aswell.)
The first one doesn't look good and the background shines through, the second one brings the same result I had with GL_SRC_ALPHA, GL_DST_ALPHA. Nice on black background, but not nice on not-black background.
Hi 3_of_8,
I am sorry for not aswering anymore. But I guess I cannot help you any further here, because I am no OpenGL guy. I don't know the renderstates of OpenGL or what they do.
In general I would use a bitmap for fire, no GLQuads. I made fire effects a thousand times in DirectX and never had any problems with it using ADD effect or only Alpha for transparency. Don't know how people do fireeffects in OpenGL, but I cannot imagine that you are the first person with those "problems"
<a href="http://www.greatgamesexperiment.com/game/Valgard/?utm_source=gge&utm_medium=badge_game"><img border="0" alt="GGE" title="GGE" src="http://static.greatgamesexperiment.com/badge/game/valgard/gge400x56.png"></a>
Never mind.
Well, you say bitmaps. What do you mean, saying "bitmaps"? A number of Textured quads acting like fire particles or one textured quad which has an animated flame texture on it?
What he means is a few texture quads, over just one animated quad. In fact, you can just use an image of a white square, so long as the background fades out correctly. Then you can draw it with a slightly different color and make it vary a little. Or reuse the particle for other effects, like beams and gauss blasts.
Bookmarks