[fixed]EMT_TRANSPARENT_ALPHA_CHANNEL bug ?

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
terefang
Posts: 48
Joined: Tue Jun 21, 2005 9:56 am

[fixed]EMT_TRANSPARENT_ALPHA_CHANNEL bug ?

Post by terefang »

hi!

i use some custom models (nwmax) with alpha-textures.

if i set EMT_TRANSPARENT_ALPHA_CHANNEL the model looks (bad) like:


Image


if i set EMT_TRANSPARENT_ALPHA_CHANNEL_REF the model looks (ok) like:


Image

the used textures are all
Format: TGA (Truevision Targa i
Geometry: 512x512
Class: DirectClass
Colorspace: RGB
Type: TrueColorMatte
Depth: 8 bits
Channel depth:
Red: 8-bits
Green: 8-bits
Blue: 8-bits
Opacity: 8-bits
Channel statistics:
Red:
Min: 0
Max: 123
Mean: 46.1269
Standard deviation: 13.7274
Green:
Min: 0
Max: 134
Mean: 54.4052
Standard deviation: 13.8006
Blue:
Min: 0
Max: 82
Mean: 30.8418
Standard deviation: 11.8168
Opacity:
Min: 0
Max: 255
Mean: 102.075
Standard deviation: 124.03
i can post the mesh creation code if needed.

cheers,
[/code]
terefang
nVidia 7800GT/256, AMD64-X2 4k2, Latest Fedora/CentOS
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Yep, it's a bug. Going to fix it in the next release. I think some people already posted fixes for this in this forum.
terefang
Posts: 48
Joined: Tue Jun 21, 2005 9:56 am

Post by terefang »

the fix you're refering to is for
OpenGL with EMT_TRANSPARENT_ALPHA_CHANNEL_REF

but my bug-report is for dx8+9+opengl with the
EMT_TRANSPARENT_ALPHA_CHANNEL option set
on the material.

i already recompiled the material renderer with zbuffer enabled, but
this causes (parts) of other alpha-textures to disappear as seen here:

Image

OR is this probably the (correct) fix and the above is simply a limitation
of the engines animated mesh implementation ?

the entire model(s) you see in the snapshot are actually only "one"
scenenode ...
terefang
nVidia 7800GT/256, AMD64-X2 4k2, Latest Fedora/CentOS
fcoutant

Post by fcoutant »

I have found a solution for this.
Look at this post: http://irrlicht.sourceforge.net/phpBB2/ ... php?t=7545
May not be perfect, since I only did it for OpenGL, but you may be able to translate the idea easily to DX8/9.
bosko
Posts: 2
Joined: Sat Sep 01, 2012 3:38 pm

Re: EMT_TRANSPARENT_ALPHA_CHANNEL bug ?

Post by bosko »

maybe this will help
here's the code to add to your scene manager:

Code: Select all

pSceneMgr->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT, true);
And to your scene node's material:

Code: Select all

Material.setFlag(video::EMF_ZWRITE_ENABLE, true);
from link: http://irrlicht.sourceforge.net/forum/v ... hp?t=39210
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: EMT_TRANSPARENT_ALPHA_CHANNEL bug ?

Post by CuteAlien »

You just dug up a nearly 8 year old thread ... :-)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply