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 / Making black in textures transparent

Author
Message
OnQue Int
17
Years of Service
User Offline
Joined: 8th Jun 2007
Location:
Posted: 3rd Dec 2008 19:56
I have tried all commands and nothing this is my code

set image colorkey 0,0,0
load object "objects\buildings\beach\misc\M_building_1.x",B_Building_1
position object B_Building_1,15717,1157,25286
yrotate object B_Building_1,90
SET OBJECT diffuse B_Building_1,RGB(3,3,3)
SET OBJECT AMBIENCE B_Building_1,RGB(115,115,115)
scale object B_Building_1,2700,2100,2100
SC_SETUPCOMPLEXOBJECT B_Building_1,2,2
texture object B_Building_1,44
set object b_Building_1,1,0,0 ----- and ive tried 1,1,1...1,0,1
set object transparency B_Building_1,4


and nothing changes still solid
Talak
15
Years of Service
User Offline
Joined: 26th Nov 2008
Location: Australia
Posted: 3rd Dec 2008 21:57
If your texture is PNG, TGA or DDS it needs it's own alpha channel. Otherwise, could the SET OBJECT DIFFUSE command be interfering?
OnQue Int
17
Years of Service
User Offline
Joined: 8th Jun 2007
Location:
Posted: 3rd Dec 2008 22:11
How do you give it its own alpha channel?
Talak
15
Years of Service
User Offline
Joined: 26th Nov 2008
Location: Australia
Posted: 3rd Dec 2008 22:37
Here's a tutorial for photoshop:
http://www.axialis.com/tutorials/tutorial-misc001.html
You should be able to adapt it for other paint programs.

If you're using DDS format, copy and paste the area you want transparent into the pre-existing alpha channel (if you're using an alpha DDS format).

Otherwise you could try a different format for your texture, such as JPG, with your current code.

Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 4th Dec 2008 03:44
Try a different transparency level like 1 instead of 4.

set object transparency B_Building_1,1

OnQue Int
17
Years of Service
User Offline
Joined: 8th Jun 2007
Location:
Posted: 4th Dec 2008 06:07
60 squares, thanks that work load off my shoulders

Login to post a reply

Server time is: 2024-09-27 22:27:56
Your offset time is: 2024-09-27 22:27:56