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

Author
Message
Algae Man
23
Years of Service
User Offline
Joined: 11th Nov 2002
Location: Canada
Posted: 2nd Nov 2003 19:56 Edited at: 2nd Nov 2003 20:00
I'm new to DarkBasic Pro. I just tried out one of my programs from DBC to see if it would run faster/smoother etc. I was surprised to see that the ghosted objects were looking very strange. It's my understanding that in the original DB, ghosted objects used 'alphablending'. The colour values of the pixels of the ghosted object were simply added to the colours of the pixels behind them. Thus black would be completely invisible and white would be opaque. This is how my program looked in DBC. But when I ran it in DBPro, the black was somehow transparent and opaque at the same time. It's very confusing. Sometimes the black parts of an object may be completely see-through and sometimes they may obscure objects behind them. Does DBPro use a different method for alphablending? I've tried experimenting with SET OBJECT EMISSIVE and SET OBJECT AMBIENCE, but to no avail. Can someone help me?


A picture of my program in DBPro. Notice how the ghosted plain in the centre (a star) has an opaque black box around it, yet some parts are transparent. Notice also how the blue plains in the centre are also partly transparent, yet some have black around them as well.
Mussi
23
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 2nd Nov 2003 20:02
I'm having the same prob to

Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 80GB HD 7200rmp U133, Geforce 4 Ti4400 128mb ddr sdram
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 2nd Nov 2003 21:40 Edited at: 2nd Nov 2003 21:41
You need to use SET OBJECT TRANSPARENCY ObjectNumber,1

I believe that pre-Patch 4 this was enabled by default, but now you have to explicitly set black transparency on.

Mussi
23
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 2nd Nov 2003 21:46
I did that but if you look good you can see the objects are really transperent but are like covering the other planes

Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 80GB HD 7200rmp U133, Geforce 4 Ti4400 128mb ddr sdram
Algae Man
23
Years of Service
User Offline
Joined: 11th Nov 2002
Location: Canada
Posted: 3rd Nov 2003 18:45
Thanks Rob K. Everything seems to be fine and dandy now.

Login to post a reply

Server time is: 2026-07-26 16:02:58
Your offset time is: 2026-07-26 16:02:58