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.

DarkBASIC Professional Discussion / "set object transparency" doesn't work again...

Author
Message
n3t3r453r
23
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Russia
Posted: 31st May 2003 01:29
Transparency doesn't work in this code:



Why? And when it will be fixed? Or I haven't understood something?
I'd like to change the world, but God doesn't want to give me sources!
Kensupen
23
Years of Service
User Offline
Joined: 19th Sep 2002
Location: United States
Posted: 31st May 2003 01:43
You need to check your texture(s) for the object. I'm using colorkey 255,0,255 and all my objects work fine with set object transparency obj,2
The pixels have to be exactly rgb(0,0,0) or they will draw. So, you have to have the textures as a .BMP

-Kensupen

Nerdsoft Creations - Lead Programmer
System Specs: AMD XP 1700+, WinXP Home, 1GB PC133 ram and Radeon 9500 using DX9
n3t3r453r
23
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Russia
Posted: 31st May 2003 09:53 Edited at: 31st May 2003 09:54
BMP? Why? I'm using TARGA or PNG and all works fine on p4, but on p4.1 it doesn't work at all!

I'd like to change the world, but God doesn't want to give me sources!
Kensupen
23
Years of Service
User Offline
Joined: 19th Sep 2002
Location: United States
Posted: 31st May 2003 12:12
Do this. Load your textures in Paint shop or a similar program. Use the color picker to find the RGB values of your "black" that is supposed to be transparent. It's it's not exactly rgb(0,0,0) then it won't be transparent. Only DBC has a tolerance level when it comes to transparency color, DBPro does not.

-Kensupen

Nerdsoft Creations - Lead Programmer
System Specs: AMD XP 1700+, WinXP Home, 1GB PC133 ram and Radeon 9500 using DX9
n3t3r453r
23
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Russia
Posted: 31st May 2003 14:16
No,no,no... I've said it worked fine on DBPro v4.0, but it doesn't works on v4.1 And I'm sure that transparent color is exacly RGB(0,0,0): I've checked it in photoshop7.

I'd like to change the world, but God doesn't want to give me sources!
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 31st May 2003 14:36
Transparency on targa and png format files are controlled *only* by the alpha settings within the files.

Convert the black pixels to true alpha and they'll work ... or run this function for each image to generate alpha information (0,0,0 is transparent, only works for 32bit images).

n3t3r453r
23
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Russia
Posted: 31st May 2003 18:35
Thanks Ian, I think I should use DDS textures with true alpha in this case.

I'd like to change the world, but God doesn't want to give me sources!

Login to post a reply

Server time is: 2026-07-11 11:42:25
Your offset time is: 2026-07-11 11:42:25