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 / trouble with transparency, please help

Author
Message
Dracula
18
Years of Service
User Offline
Joined: 7th Aug 2006
Location: DBP Recreation of Castle Csejthe
Posted: 7th Jan 2007 23:50 Edited at: 7th Jan 2007 23:58
I am having trouble with transparency. I made the space between the fence rails black 0,0,0 and used set object transparency obj,1, but the transparency is spotty and looks terrible. Can anyone think of what the problem might be?

here is a look at the problem. The blue in fence should be transparent, as should all the space between the rails:



Thanks for any help

D
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 8th Jan 2007 01:02 Edited at: 8th Jan 2007 01:04
it could be a number of things, with object transparency you really have to tweak the settings until you get something that looks right...

things to try,

1) There are many different flags for the set object transparency command, try using

set object transparency objid, 2
or
set object transparency objid, 3
...
and so on up to 6 (or 5, not sure, but go to 6 to be safe... if you go higher than that it doesn't change anything)

see if any of those give a better result

2) It's possible that DBPro is unintentionally ruining your nicely outlined blackness with it's mip mapping... try loading up the texture like this
load image "mytexture.whatever", imageid, 1

(also try tweaking the set object transparency flag again after you've added the flag to the load image)


also... in your texture, it's best if you leave the edges clear cut and harsh, because as far as i know DBPro won't bother to apply the smooth fade off at the edges... or if it does, it looks ugly when you put one transparent object infront of another... (which i think is happening with your axe)

good luck!

One man, one lawnmower, plenty of angry groundhogs.
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 8th Jan 2007 01:49 Edited at: 8th Jan 2007 01:53
It looks to me like the texture is using .jpg instead of .bmp or .png. Jpg is the worst picture format you can use because it changes the colors... so you'll never see a fully black background in .jpg.
Dracula
18
Years of Service
User Offline
Joined: 7th Aug 2006
Location: DBP Recreation of Castle Csejthe
Posted: 8th Jan 2007 04:27
I was using a .jpg. I changed it to PNG and get no transparency at all, BMP looks better, but I still get a bunch of garbage. Am I doing something wrong? here is a look:



Thanks,

D
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 8th Jan 2007 15:36
Quote: "I changed it to PNG"


But did you clean the image up?

The artifacting in a JPG is added by the compression algorythms - not DB, so if you loaded the JPG into a paint program and simply saved it back out as a BMP, then the artifacting will still be there.

The colours may be very close and difficult to see, but if the transparency in DB is set to 0,0,0 then even pixels which are 1,1,1 will not be transparent.

Load the BMP and zoom in really close to the 'black' areas and repaint all the 'nearly' black pixels and that ought to fix the problem.

TDK_Man

Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 10th Jan 2007 07:47
What I do to clean it up images is fill in those areas with a color that you can see but isn't a color thats close to what you want to keep.

Like use bright blue in the place of black till it fills in properly. If even one pixel isn't right you'll see it a lot faster surrounded by blue. When everything is just right replace the blue with true black.
Dracula
18
Years of Service
User Offline
Joined: 7th Aug 2006
Location: DBP Recreation of Castle Csejthe
Posted: 12th Jan 2007 02:16
thanks everyone got it working. this is getting fun!!! (more fun, that is)

Login to post a reply

Server time is: 2024-09-25 15:25:52
Your offset time is: 2024-09-25 15:25:52