Page 1 of 1

maybe it's a bug : trans_alphach artifacts

Posted: Thu Aug 19, 2010 1:48 am
by Terry
Hello folks,

i's using irrlicht to build my scene,for trees models there's one artifact.The tree trunks are solid and the leaves are defined as
"trans_alphach" type,and the textures for leaves are tga format which support alpha chanal transparence.The artifact is that we could see other tree leaves whose material are "trans_alphach",but not for solid material objects.
"backface culling" has been canceled to show tree leaves,but that's not the reason,it seem's like there are some errors in z-buffer.

scene organization is by irrEdit-1.5.

have a look,you can see other trees by leaves.
if images here can not be shown,please copy and paste the URL
Image

Image

Posted: Thu Aug 19, 2010 2:24 am
by Terry
hoho,
problem is solved,it's my mistake.
By default irrlicht forbidden z-buffer of transparent material.
just adding:
smgr->getParameters()->setAttribute(scene::ALLOW_ZWRITE_ON_TRANSPARENT,true);

That's all right!