transparency: alpha vs. add_color
alright, thank you hybrid
i've just wrote a simple app that reproduces the problem. i've precompiled for win xp, but of course included the source:
http://irrlichtirc.g0dsoft.com/morris/alpha.zip
http://irrlichtirc.g0dsoft.com/morris/main.cpp
http://irrlichtirc.g0dsoft.com/morris/test.png
now, to summarize what i've found out so far:
* using EMT_TRANSPARENT_ADD_COLOR works just fine.
* changing MaterialTypeParam to lower values is important to make the borders look good, but this only works for light objects.
* darker objects get a weird lighted border
* using a .tga file instead of .png didnt make any difference
* directx has the same problem (and even worse - see below)
what i think may be the source of the problem:
* a bug in irrlicht's driver(s)
* there are different ways to create alpha channels in graphics programs; one of them might give better results (no success yet)
i eventually tried directx as driver and the same problem appeared, plus the images where extremely flickery while moving the fps camera. don't know why this happens .
i hope this helps everyone to understand the problem, and i hope this is not a bug but a thing that can be fixed otherwise.
i've just wrote a simple app that reproduces the problem. i've precompiled for win xp, but of course included the source:
http://irrlichtirc.g0dsoft.com/morris/alpha.zip
http://irrlichtirc.g0dsoft.com/morris/main.cpp
http://irrlichtirc.g0dsoft.com/morris/test.png
now, to summarize what i've found out so far:
* using EMT_TRANSPARENT_ADD_COLOR works just fine.
* changing MaterialTypeParam to lower values is important to make the borders look good, but this only works for light objects.
* darker objects get a weird lighted border
* using a .tga file instead of .png didnt make any difference
* directx has the same problem (and even worse - see below)
what i think may be the source of the problem:
* a bug in irrlicht's driver(s)
* there are different ways to create alpha channels in graphics programs; one of them might give better results (no success yet)
i eventually tried directx as driver and the same problem appeared, plus the images where extremely flickery while moving the fps camera. don't know why this happens .
i hope this helps everyone to understand the problem, and i hope this is not a bug but a thing that can be fixed otherwise.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Ok, found the problem. The color of the transparent part seems to be white (although it's not visible at all in Gimp). Anyway, once I fill that part with other colors the border changes to less visible colors. Maybe it's a good idea to keep the alpha mask a little smaller than the actual image to provide a proper border.