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 / Problem with transaprency

Author
Message
Felwys
20
Years of Service
User Offline
Joined: 13th Dec 2003
Location:
Posted: 13th Feb 2004 02:19
Hi.

I'm tring and traing but i cant this thing works. I want to make sky with clouds, i use this code:

color Backdrop rgb(190,210,246)
make object sphere 1, -2000
load image 1, "c:\program\media\nuves.tga"
texture object 1, 2
wait key


but the only thing that i see it's a semy black sphere, even if the tga file has transparency layers and its 32 bits depth.

What im doing wrong?

here is the link of the "nuves.tga"
http://aidaheiras.com/tag/

felwys
sponge008
20
Years of Service
User Offline
Joined: 8th Feb 2004
Location: MA, USA
Posted: 13th Feb 2004 02:43
OK, first of all, copy the image into the project folder. It will be in My Computer, C, Program Files, Dark Basic, My Projects. After that, use a POSITIVE radius for the sphere. Voila!
BearCDPOLD
20
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 13th Feb 2004 04:52
As long as the location of the file is correct, you don't need to place it in the program folder. You need to make the radius negative then turn culling off with SET OBJECT or however it works in Pro.

Juvenile Industries
Current Project: KillZone(FPS)
Soon to come:An rts, and a snowball fight game
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 13th Feb 2004 04:57
make the radius positive, and use:

set object cull 1,0

then, use this command:

set object transparency 1,2


Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia Ti4200 AGP 8x 128MB
Felwys
20
Years of Service
User Offline
Joined: 13th Dec 2003
Location:
Posted: 13th Feb 2004 20:59
Thanks, it works now...

but, i dont understand what is the flag number 2 for?

thanks

felwys
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 14th Feb 2004 04:07
to be honest I'm not entirely sure. but experimentation has shown that a flag of 1 doesn't "blend" the translucent parts well, where as a flag of 2 seems to do a much better job!

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia Ti4200 AGP 8x 128MB

Login to post a reply

Server time is: 2024-09-21 20:47:10
Your offset time is: 2024-09-21 20:47:10