Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Alpha Channel

Author
Message
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 14th May 2003 11:10
Not really DB-Related but still fairly simple, how do I make a texture translucent using alpha channels? I've tried doing it in PSP and Photoshop but it didn't come out correctly so I'm guessing I'm doing something wrong, could someone please take me through the process? Thanks.
"Computers are useless they can only give you answers."
Dr DooMer
21
Years of Service
User Offline
Joined: 22nd Dec 2002
Location: United Kingdom
Posted: 14th May 2003 20:58
Well, first off you'll need to know that .bmp files can't save an alpha channel, just in case you were trying to use those. You'll have to use something like .tif or .tga instead.

I don't use Photoshop, but I think I can help with PSP. The best way to do it is create a new mask - I'd use "From image", "This window" and "Source opacity" settings, but you're free to do what you like.

Now then, from this, you won't see much change in the image. What you do next is go back to the 'Masks' drop-down menu and choose to edit the mask. You colour palette should now switch to greyscale. Applying different grey values to the image will now set the alpha channel - black for see-through, white for opaque and greys for translucent.

When you're finally done, I don't know if it's necessary, but it's probably a good idea to go back to 'Masks' again and choose to save the mask to the alpha channel. Now save the image in a format supporting the alpha channel, and load it into DB!

Hope this helps!

"I am a living, thinking entity who was created in the sea of information."
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 15th May 2003 01:49
That's very similar to what I did, but I changed opacity under the Layer palette. Anyway, I did all that you said and tried saving it as .tga .tif and .png but none work - most of the time I see a greyish image except .tgah where the whole thing is black.

Is there a special way I have to load it into DB? Because I'm just using the Load Image command, or does it only work with DBP?

"Computers are useless they can only give you answers."
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 15th May 2003 02:38
I don't think you can do this. You can load an image with black areas (anything from RGB(0,0,0) to RGB(10,10,10)) and specify that these areas should be transparent. You can also Ghost an object to make the entire object transparent.

Graphics formats with alpha channels don't translate to alpha channels in Direct X.

Tell me I'm wrong, it would be fantastic if I was!

Thanks in advance.
All the Best,
StevieVee
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 15th May 2003 04:52
Exeat - I'm 99% sure that the alpha channels only work in DBPro, at least I've never seen them working in DBC.

StevieVee - what you said is correct, but only for DB. DBPro most definitely does support true alpha channels. It's the best way to make transparent (or semi-transparent) textures for objects/sprites and the ONLY way to make things like rainbow shading textures!

Only TGA and PNG support it.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 15th May 2003 09:45 Edited at: 15th May 2003 09:59
Aaah, I usually test things like that in DBC because I'm so used to DarkEdit lol. I'll just open up DBP and run a test now though.

If this is true then I'll resend my tutorial using alpha channels instead of the ghost command.

Edit: Just tested and it still doesn't work, are you sure there isn't a specific command I have to use or anything?

"Computers are useless they can only give you answers."
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 15th May 2003 16:12
Depends.. for sprites/images there is no command, the alpha channel will pick up automatically. For objects "set object transparency" and the colorkey command will do the trick (for some reason DBPro at the moment converts the alpha channel to white).

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 16th May 2003 11:56
Finally I've made an alpha channel for the image and it works fairly well in a PNG Alpha channel viewer I found. The only problem is that my alpha channel isn't using one solid colour, it's a gradient of greys so the image gets gradually more translucent.

DBP however, can only make one grey transparent because the Colorkey command tells us which grey, and therefore I can't have a gradient of transparency like the ghost command would give. Right?

"Computers are useless they can only give you answers."

Login to post a reply

Server time is: 2024-09-20 07:33:03
Your offset time is: 2024-09-20 07:33:03