Alphablndd/CKeyed textures - Irrlich zbuffer inconsistency?

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
mikademus
Posts: 7
Joined: Fri May 23, 2008 8:26 pm

Alphablndd/CKeyed textures - Irrlich zbuffer inconsistency?

Post by mikademus »

Hi.

I am importing scenes from legacy formats (in this case 1998), which are saved in proprietary model files and using 8-bit .bmp textures.

Some of the models are of trees and similar objects, and these should be rendered colour-keyed, which is internally handled as alpha blends in Irrlicht.

However (1), when turning on alpha blending (using EMT_TRANSPARENT_ALPHA_CHANNEL_REF or EMT_TRANSPARENT_ALPHA_CHANNEL) z\buffer writing is automatically disabled. This cannot be turned on again, which is what is written in the online reference (the z-write flag is ignored).

However (2), this is only true for the DX renderer(s), under OpenGL it renders alpha AND writes to the Z-buffer.

What is correct behaviour? And I also need to say that this is a complete showstopper for me: I need a consistent and platform-portable system, I have to write colour-keyed data to the z-buffer, and I need to blend transparent surfaces over other geometry.

Many thanks for any help
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

It was originally intended to make it like in OpenGL for both drivers. But since many people were complaining about zbuffer problems in billboards Niko changed the behavior back temporarily. However, it will be definitely changed later on to the behavior of OpenGL, because that one is far more flexible. It's just not user-friendly for some common cases.
mikademus
Posts: 7
Joined: Fri May 23, 2008 8:26 pm

Post by mikademus »

Hi Hybrid, and thanks for your patient help in the channel!

As for the discussion here, only changing in DirectX sounds like a very strange decision, since that makes the supported rederers mutually inconsistent and incompatible with the documentation.

On the channel, another very helpful person, CuteAlient I think (many thanks for your assistance!), said "program only for OGL and problem fixed", however, this is not acceptable: if I get a terrain-capable car that have problems with off-road driving, the solution is not to stick to paved roads.

I hope Irrlicht as a system will mature into more serious usability (which entails consistency as well as technical capacities), because I do like the system and wish to keep using it.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, that was a last minute change right before the 1.4 release. And it is still not fixed for 1.4.1. We're definitely going to unify the two again, though.
Post Reply