Jump to content
  • Advertisement
Sign in to follow this  
judge dreadz

blending - smoke sprites

This topic is 4484 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i am trying to create a smoke effect using sprites. i'm not sure what blending options i should be using, at the moment i cant get it to look right (i'm using additive blending and getting saturation). can anyone offer any advice? you can see the kind of effect i'm trying to do here: http://director-online.com/howto/ud_articles/ud259/FINAL_FIRE_DEMO.html thanks

Share this post


Link to post
Share on other sites
Advertisement
I think glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) is the apropriate funktion for smoke.

Share this post


Link to post
Share on other sites
Hrm, looks absolutely fine to me...

Image Hosted by ImageShack.us

What seems to be the problem, exactly? Is the smoke supposed to be white-ish instead of black?

Share this post


Link to post
Share on other sites
lol runelancer, thats not my work! thats an example of what i want it to look like, mine doesnt look anything like that.

the actual effect i am trying to copy is from GPU gems, all it says is that alpha blending is used instead of additive blending, and that they have to sort the particles because the blending function is non-comutative. they dont actually say what blending functions they use though, and i am a bit confused because i thought alpha blending was additive blending.

Share this post


Link to post
Share on other sites
I am not sure (maybe someone wise can make it clear) but there are types of blending which are commutative. Additive blending is commutative but - like you've said - alpha bleding is not. I agree with blending function suggested by nefthy.

Share this post


Link to post
Share on other sites
could you post a screen shot and some code of you particle system? Or atleast try to describe the problem you have better. With "Its does not look right" its difficult to help you.

Share this post


Link to post
Share on other sites
well i tried (GL_SRC_ALPHA, GL_ONE) and i get color saturation. if 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? which i dont think is what i need, i think i need alpha blending (says the book) but i dont know what alpha blending is. sorry i cant give any more info then that really!

Share this post


Link to post
Share on other sites
Saturation can have many couses, maybe the saturated areas are overdrawn to often, maybe the colors you use for the particles is to bright, maybe, maybe, maybe...

Quote:
Original post by judge dreadz
sorry i cant give any more info then that really!


Atleast make a screenshot or something.

Share this post


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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!