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 / PNG files with planes

Author
Message
deaths judge
19
Years of Service
User Offline
Joined: 4th Jan 2007
Location:
Posted: 14th Sep 2009 23:01
i am trying to get the effect of a ring around the planet. I have made the ring in photoshop with transparent background and exported as a .png file, but when i texture the plane none of the transparency shows and it looks all messed up. why is this happening . in-game image attached

[[[[wobble]]]] {{{{wobble}}}}
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 14th Sep 2009 23:22
Use 'set object transparency' to enable transparency on an object. (With multiple transparent objects you may have to experiment with the transparency mode to get the correct draw order)

Sixty Squares
20
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 15th Sep 2009 00:03
Adding to what Diggsey said, I find mode 1 best for transparent .BMP files and modes 3 and 6 best for .PNG files. But that's just me.

<-- Spell based team dueling game!
JDforce
21
Years of Service
User Offline
Joined: 27th Jul 2004
Location: Sea of Tranquility
Posted: 17th Sep 2009 00:39 Edited at: 23rd Sep 2009 03:01
Deaths Judge,
Your problem could be the PNG format itself. Use 32 bit with alpha from photoshop.

I attached a fully working sample with planet and ring that you can experiment with. Included are media files and a working PNG. The plane I used is quite large in order to demonstrate a full gradient in the ring.

In this case, shininess of the ring depends on incident light hitting it, so if you rotate the plane away from light, it will seem to fade or darken as any other object would.

Project created with synergy IDE. If you have any path related error, use notepad to open the dbpro file and edit paths manually.

EDIT: I updated the program

May the 3d force B with U
JDforce
21
Years of Service
User Offline
Joined: 27th Jul 2004
Location: Sea of Tranquility
Posted: 23rd Sep 2009 03:03
Here you have a screenshot. The latest version of the program I posted has some other PNG textures for the planet ring.

May the 3d force B with U
deaths judge
19
Years of Service
User Offline
Joined: 4th Jan 2007
Location:
Posted: 18th Jan 2010 11:08
thanks for this . ive only just got back to creating my game, because of mum being in hospital with cancer. But ill give this a try mate

[[[[wobble]]]] {{{{wobble}}}}
Rain Man
18
Years of Service
User Offline
Joined: 19th Nov 2007
Location:
Posted: 20th Jan 2010 07:57
Quote: "ive only just got back to creating my game, because of mum being in hospital with cancer."


I'm sorry to hear that. I hope your mother gets better soon.

Ten minutes to Wapner.
Masqutti
16
Years of Service
User Offline
Joined: 8th Jan 2010
Location: insanity
Posted: 20th Jan 2010 08:44
I guess you can use SET OBJET command to set the transparency flag, but also light, fog, etc. So you can make the lights be irrelevant to the rendering of this object, so it'll render same amount of lightness at every direction if i'm right.. If that's wanted i mean.^^

hmmmh.. that didn't compile
deaths judge
19
Years of Service
User Offline
Joined: 4th Jan 2007
Location:
Posted: 23rd Feb 2010 10:45
cheers rain man, she died about 2 weeks ago . but got back to making my game now so cheers for the help.

[[[[wobble]]]] {{{{wobble}}}}

Login to post a reply

Server time is: 2026-07-27 05:12:27
Your offset time is: 2026-07-27 05:12:27