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 / Transparent textures and objects? Sprites in 3D?

Author
Message
Luigison
23
Years of Service
User Offline
Joined: 9th Jun 2003
Location: California
Posted: 27th Aug 2003 06:28
I am making a game that has images of characters textured onto plains similiar to those in Paper Mario. With sprites the black areas are made transparent in DarkBASIC, but this doesn't seem to work with textures and objects.

1) Is it possible to make textures and/or objects partially transparent?

I tried using sprites in my 3D world, but my program always locked up or didn't show anything.

2) Is there some conflict with using 3D objects and sprites at the same time?

With boxes, rectangles, and plain I have no problem with the camera, but when I make a small cylinder the camera is in a different position even when I tell it where to be.

3) What could be causing the camera to move, and how do I fix it?

"Bob does not exist"
DrakeX
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 27th Aug 2003 07:02
you can use the SET IMAGE COLORKEY command before loading your textures.

here's some sample code:

set image colorkey 255,0,0
`these 2 will use pure red as the transparent color
load texture "blah.bmp",1
load texture "blah2.bmp",2

set image colorkey 255,0,255
`this texture will use magenta as the transparent color
load texture "blah3.bmp",3

then after you load your textures and texture your objects (or after you just load your objects), use the SET OBJECT TRANSPARENT <obj>,1 to make those transparent pixels.. transparent.

stop looking at me!
randi
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United States
Posted: 27th Aug 2003 08:37
With U5 you have the new command...
'set alpha mapping on'
...which is great command and I have already found some neat stuff to do with it.

With my computer, 2D and 3D mixed goes real slow.
But I have a geforce 2. Old by todays standards.

And for the camera...
have you turned 'autocam' off?


Now just waiting for Fallout's sarcastic remarks.

Eric T
23
Years of Service
User Offline
Joined: 7th Apr 2003
Location: My location is where I am at this time.
Posted: 27th Aug 2003 08:43
In darkbasic 0,0,0 is registered as transparent, in which 0,0,0 is black.. so if you change the color to 0,0,1 it will show.

Working on 4 projects 2 RPG(programming texturing and 3d map), 1 3rd person shooter (Programming), and a special project.

Login to post a reply

Server time is: 2026-07-23 01:51:13
Your offset time is: 2026-07-23 01:51:13