Jump to content
  • Advertisement

Archived

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

Jarod20

Semi-Transparency With DirectDraw

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

Hi I''m trying to figure out how to put semi-transparency on a bitmap or attached some kind of semi-transparency color on a surface. I''m using DirectX 8, I know it can be done somehow because I seen it in StarCraft and StarCraft was built with DirectDraw. Any info on this would be much help, thanx.

Share this post


Link to post
Share on other sites
Advertisement
Well i dont claim to be an expert programmer using direct x (i am at the sigle surface random pixle stage).

My theroy on how they do it, is to average the rgb value of the character and the ground, and if you want to you could try that with a gray scaled bitmap for like a ghost look (im assuming your talking about bitmaps and direct draw here)

dont ask me how to go about implementing that though

Share this post


Link to post
Share on other sites
if you are using dx8, then you are NOT using directdraw. which means you just set the alphablending values correctly and your set.

if you need a mask, then create a 32bit image with alpha channel (save as tga or png). then set appropriate blend modes.

if you trully are using directdraw, then you MUST be using dd7 or less. in that case see the vast amount of messages here asking how to do software alphablening.

though i think you want to do color keying, which cuts out a particular color whne blitting an image.

Share this post


Link to post
Share on other sites
that he is using the dx8 sdk doesn''t mean he can''t use DDraw7...

AVATAN RPG ENGINE
http://www.avatan.de.vu

Share this post


Link to post
Share on other sites
as an FYI, you can use directdraw3 if you want with directsound8 and directinput6. dx is COM based and as long as you have the sdk that supports the highest version you want to use, then you can use it and ALL previous versions. this should be in the faq (and if its not, someone please add it).

Share this post


Link to post
Share on other sites

  • 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!