blending - smoke sprites

Started by
13 comments, last by dpadam450 18 years ago
Quote:Original post by judge dreadzif i use (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) it looks better, but its a bit dark. the trouble with both is that they seem to lose a lot all the detail and look a bit blobby. they are both commutative additive functions right?

Wrong. SRC_ALPHA, ONE_MINUS_SRC_ALPHA is not communative or additive and is what you want for smoke.
Advertisement
Quote:Original post by Kalidor
Just so you know, glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) is what people mean when they talk about standard alpha blending. If that still doesn't look right to you maybe it's a problem with your art? A screenshot would definitely help.



ok, thats all i needed to know really, thanks. so if i use glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) then i need to sort the particles first so they render in the right order? would that maybe make it look better? heres a screen shot anyway, as you can see it all looks a bit blobby, theres not much detail going on. looks kind of like frog spawn at the moment.


smoke sprites


Looks about right, try making the particles about twice as big and adding more contrast and variation in the smoke texture. Also try changing the colour tint based on how old the particle is.
i cant see the screenshot
but yes u need to sort the polys also
use glDepthMask( GL_FALSE );
when u draw the smoke
Well if you are doing squares rendered with a smoke cloud texture, then make anything that you want to blend with the background complete black. Then use glBlendFunc(GL_SRC_ALPHA, GL_ONE).

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

This topic is closed to new replies.

Advertisement