Jump to content

Blending issue


photo

Recommended Posts

Posted

It seems like transparent materials are broken for a long time - I was able to reproduce the bug in February build..

Materials with non-default blending parameters are almost faded when rendered above scattering, regardless of their blending values. It is very easy to reproduce the bug with samples_render/scattering_00. Just set Blending src/dest parameters to any value (i.e. src alpha/one minus src alpha that means 100% opaque for that texture) and you'll see the effect. 'Post scattering' checkbox solves the problem but that is not a solution.

 

post-26-0-25938500-1318000168_thumb.png post-26-0-87528400-1318000204_thumb.png

Posted

"Post deferred" flag does the trick :)

 

While this is acceptable trick for decals and clutter objects, real scene objects are not recommended to use this flag:

 

1. In deferred lighting mode there are different transparency artifacts:

post-26-0-01864300-1318406425_thumb.png

Using standard light mode gives performance drop without noticeable picture changes.

 

2. Regardless of light mode semi-transparent areas shows black background instead of sky and scattering:

post-26-0-86160100-1318406806_thumb.png

It can be partially avoided by Alpha Testing by culling semi-transparent areas but that is definitely not a solution.

 

3. In some real-world cases (hard to reproduce with statues) HDR and potentially other effects based on deferred pass give huge errors:

post-26-0-87718200-1318407562_thumb.jpg

 

Year 2000-2002 games (Warcraft 3, Unreal, Deus Ex, etc.) were using alpha blending frequently for light beams, glasses, magic crystals, holograms, etc. SpeedTree starting with 2.0 version uses gradient alpha to avoid leaves aliasing. NeHe lessons that I used to learn OpenGL more than a decade ago shows how to use alpha blended materials. Than why in year 2012 with next-gen 3d engine we are restricted to use pre-historic Alpha Testing or trade off some features (deferred lighting, HDR, scattering, AO, etc.) for alpha-blended materials?

 

Conclusion: blending should work for any kind of materials without 'tricks' and visual artifacts.

  • Like 1
Posted

Thank you for informative description. After our developers deal with burning issues at hand, they will see what can be done about this issue. But it would hardly be in the nearest future.

×
×
  • Create New...