Archived

This topic is now archived and is closed to further replies.

particleG

Black smoke with blending...

Recommended Posts

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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites