maybe it's a bug : trans_alphach artifacts

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Terry
Posts: 55
Joined: Wed Jan 27, 2010 6:16 am
Location: Peking/China

maybe it's a bug : trans_alphach artifacts

Post 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
Terry
Posts: 55
Joined: Wed Jan 27, 2010 6:16 am
Location: Peking/China

Post 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!
Post Reply