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 / Patch 3 transparent textured objects

Author
Message
Kensupen
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: United States
Posted: 26th Nov 2002 21:37
I have patch 3 installed, and when I have an object loaded with a transparent color of RGB(255,0,255) and SET IMAGE COLORKEY(255,0,255) the purple colo is still drawn when I load the object no matter how I use SET OBJECT or SET OBJECT TRANSPARENCY. Was this supposed to be fixed in 3 or is this a patch 4 thing?

-Kensupen
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 26th Nov 2002 22:14
SET IMAGE COLORKEY only works with images. For objects you still need black.

DigAw.com
Game in developement: The Magic Land
Kensupen
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: United States
Posted: 26th Nov 2002 23:15
It worked when I re-textured it in Patch 1, but it's one object with 2 textures, so it got screwed up.
The manual states that SET IMAGE COLORKEY works for objects too. (At least that's what I read and was told in the chat with DBS)

-Kensupen
Easily Confused
21
Years of Service
User Offline
Joined: 22nd Oct 2002
Location: U.K. Earth. (turn right at Venus)
Posted: 26th Nov 2002 23:22
While working with sprites, I've found that you need to call Set Image Colorkey before you load your images, you may have to do the same if you havn't done so.

"Earth is the cradle of humanity,
but one cannot live in a cradle forever"
Konstantin E. Tsiolkovsky (1911)
Kensupen
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: United States
Posted: 26th Nov 2002 23:40
Ok, so it works with black, the only problem I see now is that there is a 1 pixel wide area around my tree leaves texture that still isn't showing what is behind it.
More info:
I have a tree using 2 plains in an "X" pattern and textured with the top of a tree/leaves and then a polygon trunk. The only thing that doesn't show behind the "transparent" parts of the tree in that 1 pixel area is the other plain of the tree. Objects and the matrix show just fine.
If the DBS team needs a screenshot, I can make one.

-Kensupen
Kensupen
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: United States
Posted: 26th Nov 2002 23:42
SET OBJECT TRANSPARENCY
This command will set the transparency state of the specified object. Setting the transparency to one will ensure the object does not
draw the transparent colour during final rendering. The transparent colour is determined by the SET IMAGE COLORKEY command.

SYNTAX
SET OBJECT TRANSPARENCY Object Number, Flag

This is straight out of the help file. So, I guess SET IMAGE COLORKEY is now broke too, or the help file is wrong. I left the texture black as a transparent color, and set the colorkey to 255,0,255 and it's transparent. I'm confused.

-Kensupen

Login to post a reply

Server time is: 2024-05-07 19:58:55
Your offset time is: 2024-05-07 19:58:55