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 / [SOLVED] Some part of my texture need to be transparent!

Author
Message
Alduce
18
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 17th Nov 2020 18:23
Hi guys I have a plane object where I put a texture (a BMP rapresenting my game map)
So I add a sky sphere to have my terrain + sky.

Now the question: can I make some parts of the terrain texture as transparent?
Something like the sprite command SET IMAGE COLORKEY.

It is possible?

Thank you in advance to all!

The author of this post has marked a post as an answer.

Go to answer

Alduce
18
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 17th Nov 2020 18:44 Edited at: 17th Nov 2020 18:45
EDIT :
ok I solved using set object obj_numb,1,1,0,0,0
But only using a BMP as texture image..

Can I use same command with a less heavy image format? like PNG or other format

Using BMP is really HEAVY!
smerf
15
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 18th Nov 2020 02:47
Png supports transparency by default within the image so yes

Alduce
18
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 18th Nov 2020 16:59
Hi smerf, I tried using PNG but I get no trasparency!

i saved my BMP image into PNG format but I get trasparency ONLY using bmp!
Why?

Scorpyo
18
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 21st Nov 2020 07:51
This post has been marked by the post author as the answer.
I use pixelformer (free) for png transparencies . It can also provide semi-transparent textures like glass if you play with the opacity settings
Import BMP
Convert format to RGB with Alpha (RGBA)
cut out the areas that you want transparent
Export to .png
It doesn't work with very big BMP files
If your terrain BMP is too big try the same procedure using GIMP (free)
Alduce
18
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 21st Nov 2020 13:50
Scorpyo really THANK YOU!.
I will test pixelformer and in case my BMP is too large (now BMP = 140mb / PNG = 1,99mb) so I will try GIMP!
Stay tuned please!
Alduce
18
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 21st Nov 2020 14:21 Edited at: 21st Nov 2020 14:22
EDIT: Your solution work GREAT Scorpyo!
A big thank you my friend


(noto ora che sei Italiano dammi in privato i tuoi contatti se ti va!)

Login to post a reply

Server time is: 2020-12-03 14:38:42
Your offset time is: 2020-12-03 14:38:42