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 / Proper transparency, without alpha + pngs

Author
Message
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 30th Jul 2004 20:55 Edited at: 31st Jul 2004 03:37
Hi,

Before patches 5.4 and 5.5 I was able to place anumber of plains together, texture them with a simple greyscale smoke image and ghost them ,giving thee following effects



However, now I find that the pure black areas still are transparent, but the "borderline" areas [ie. the greys in between] overwrite any other transparent object. You get intersections, like so:



The red circle shows a plain perfectly treansparent. The blue circle shows what happens when these plains overlap.

I've been searching and found numerous possible solutions, none that work for me:

- disable object zdepth on plains
- try different ghosting methods
- alpha mapping doesn't work either

I would try with PNGs and alpha layers, but I only have photoshop element and have no idea how to recreate that image using alpha.

Does anybody know why this happens?

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
adr
22
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 30th Jul 2004 21:57
I have the exact same problem since P5.4. I made a kick ass fire system which used what looks to be the same technique as you. And then after the patch, I get the same artifacts as you.

David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 30th Jul 2004 22:24
Thank you! I was incredibly annoyed, it looks so amazing when it works right.

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 31st Jul 2004 03:32 Edited at: 31st Jul 2004 03:34
If you use a transparent PNG, and convert it to a pre-mipmapped .DDS file (there is a post somewhere mentioning a free PSP/PS .dds export plugin) - and use that instead you should be jammin.

Fiddly and awkward but worth the hassle when you see the difference it makes.

EDIT: BTW, it's the internal mipmapping that causes the glitches - when you have polygons behind the transparent polygons, tis why it looks so good with no backdrop.


Van-B


Muhahahahaha.
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 31st Jul 2004 03:40
Is there a way to convert to a PNG, using an existing image, that also makes the mid-tones [ie greys] transparent?

I've tried photoshop elements help files, they're rubbish and contains one entry for alpha which is of no use whatsoever.

Hmm, I liked it working the old way

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
zircher
22
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 31st Jul 2004 05:37 Edited at: 31st Jul 2004 05:44
I've been told that this is possible with modern PNGs to have multiple levels of transparency. I can do that manually with programs like MS Photo Editor. Unfortunately, my 2D tools are too cheap/old to do that at the whole image level where you have a color image and an alpha mask and want to blend them together.

You might have to invest in a current version of PaintShop Pro for that. I do not know if GIMP can do that or not. Sadly, my GIMP-FU is weak.
--
TAZ

Browsing the GIMP docs reveals that you can add an alpha channel layer. So, it looks like that feature is supported.

http://www.gimp.org/

The "it" is a kind of force that gives rise to technology, something undefined, but inhuman, mechanical, lifeless, a blind monster, a death force. - ZatAoMM
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 31st Jul 2004 07:05
It's really not the solution to do this, but you can load your image, convert to a memblock, then apply your own alpha layer manually - even basing it on the original image (which may be fine for light foliage). The defects appear when DBPro tries to calculate it's own mipmap.

There are free DDS converters on the ATI and nVIDIA websites apparantly, but I've never tried them. You should try DDS before getting messy with memblocks, DDS files are a proven fix.


Van-B


Muhahahahaha.
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 31st Jul 2004 07:21
Ah okay. DDS it is then

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 31st Jul 2004 07:23 Edited at: 31st Jul 2004 07:24
If your interested ... here is the link that VanB was referring to http://forum.thegamecreators.com/?m=forum_view&t=30994&b=2 reference DDS importers.

David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 31st Jul 2004 07:24
Thanks

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"

Login to post a reply

Server time is: 2025-06-12 11:10:58
Your offset time is: 2025-06-12 11:10:58