Black smoke with blending...

Started by
4 comments, last by particleG 20 years, 9 months ago
I have been attempting to simulate smoke spewed from a damaged object. I have finished the smoke and particle systems except that there is just one problem, the smoke is white when blended enough with other particles, at best grayish (if I use GL_ONE_MINUS_DST_COLOR). It does not look very convincing of damage, more like a contrail or a cloud. Is there a way to color the smoke black and yet still keep the transparency and translucency. I have tried masking and various blending effects with no luck. thanks in advance
Advertisement
Hello, I don't know if you're using texture mapped quads but if you aren't try using those with a black texture, then using alpha blending might give you the desired effect. You might also try fading the particles a little earlier that way you can get another form of transparency.

Jon

[edited by - Jon723 on July 3, 2003 6:07:30 PM]
www.lefthandinteractive.net

tried it, simply coloring it black and using blending will make the texture go fully transparent.
Are you setting the %blending? It seems to me if you just tell open gl to make the black texture 30% transparent it should work ok.
use SrcAlpha*Particle + (1-SrcAlpha)*Background with a black textured particle then adjust your alpha values. Easy way to do this is setup alpha in your texture to define your shade and alpha in your vertices to define overall translucency.
ColorOut = Texture.RGB
AlphaOut = Texture.A * Vertex.A

glColor4f(0.0f, 0.0f, 0.0f, 0.3f);glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);		glEnable(GL_BLEND);Draw...glBlendFunc(GL_SRC_ALPHA, GL_ONE);glDisable(GL_BLEND); 


[edited by - Luke Philpot on July 4, 2003 8:59:04 PM]

This topic is closed to new replies.

Advertisement