• Advertisement
Sign in to follow this  

Alpha blending Question and some screenshots from my particle engine

This topic is 4591 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

Screenshots have gone offline due to hosts bandwidth limit sorry! [Edited by - Bitem2k on July 30, 2005 3:05:10 PM]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Bitem2k

Does anyone know how to load a smoke texture in direct3d? When i try and load it (black on a white background) the alpha blending (i think) seems to be
removing the wrong colour! Does this having anything to do with settings the blend modes?



Yeah, it is probably your blend modes. Someone around here probably knows what blend modes you need...(I am at school and don't have any of my source handy).

Share this post


Link to post
Share on other sites
Before anyone can help I think it would be helpful if you at least showed us the part where you are setting your alpha blending mode. For smoke you likely do not want an additive blend (which is probably what you have set for these particles you are showing above) since you don't want to make the smoke look like its glowing. Would you consider using a texture format like targa and creating an alpha channel for the smoke. Its easy enough to make -- just create your smoke texture and clone the same image into the alpha channel. You will need to set D3DRS_SRCBLEND and D3DRS_DESTBLEND to the appropriate values. It should be

device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE);
device->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_SRCALPHA);

(correct me if I'm wrong -- I don't have my source with me atm). In any case it should be something like that.

Share this post


Link to post
Share on other sites
Could you post the result, as well as the exact settings?

Quote:
If anyone's intrested i'll post the source and textures


Your textures are cool, post them if you may.

Share this post


Link to post
Share on other sites
Ive just got home from work(The time is 05.21 GMT ,now i need a beer and much much sleep!) I will post project and textures asap ( however as stated before this code is horrendous! you have been warned.)

Also before i post i need to implement an easy way for you to change the texture used for the point sprite particle, at the moment you have to hardcode it.

As for the exact settings for the screenshots, i cant help you! you must experiment with my test particle engine yourself ( the screenshots are a product of about 2 mins fiddling; which is good fun anyway.

The final screenshot from my last post is the window that allows you to control the particles dynamically( so a change to a slider will be updated in realtime(cool!))

Id say Ill try and post it tommorow(today! when I wake up, anyway), and ill start a new thread for it and post a link in this one, ok?.

Share this post


Link to post
Share on other sites
I can't help you here (I haven't worked with DX for long), but I just wanted to say that those particle effects are very cool looking IMO. Great job!

Share this post


Link to post
Share on other sites
thanks! they do look cool dont they! I cant wait to make an improved version of this particle engine and slap it into a game!

Share this post


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

  • Advertisement