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 Discussion / Transperancy encodeing?

Author
Message
ScottyB
18
Years of Service
User Offline
Joined: 26th Jul 2007
Location:
Posted: 6th Aug 2007 19:51
I usually use THE GIMP to add transparentcy to my images
in freebasic there special .TGA files.

How is this done in DarkBasic?

Like when you don't want the black background of a picture to be
plotted on the screen but want the picture itself.

Thanks
and
P.S. I really like how fast this compiler is doing things.
I could'nt do this in freebasic so easily.
Though I still like what it can do.
Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 6th Aug 2007 21:39
Pitch Black(0) is transparent in DB and as far as I know the transparent colour cannot be changed.
If you are pasting an image there is an extra optional parameter to set its transparency(1/0)
Sprites are show transparency by default.

Your signature has been erased by a mod because it was rubbish.
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 7th Aug 2007 02:38 Edited at: 7th Aug 2007 02:47
Quote: "Pitch Black(0) is transparent in DB "


Yes - when transparency is set ON in 3d, sprites, and images.

Example of an image with transparency:



For 3d, for pure transparency (where ever the image is black) use SET OBJECT - for translucency (alpha blending) use GHOST OBJECT ON - and reduce the ambient light and use FADE OBJECT to affect the translucency of the object.

If you want to get real fancy, code a crossfader or alpha blender. In the main DarkBASIC folder, there is a subfolder called extras. If you have DarkBASIC enhanced you can use TransitionMaker to do screen effects like crossfading among other things.

Enjoy your day.
ScottyB
18
Years of Service
User Offline
Joined: 26th Jul 2007
Location:
Posted: 7th Aug 2007 04:06
Awesome!
Now, I can make explosions look like there suppose too.
Set object did the transperancy I needed.
Thanks guys
You've been a great help.
Really, Lot's of you!

Peace!
And bye for now.
SAB

Login to post a reply

Server time is: 2026-07-05 22:39:41
Your offset time is: 2026-07-05 22:39:41