Page 1 of 1

Nebie's question: Something funny with Alpha blending...

Posted: 31 Dec 2023, 18:54
by Astromax
Dear all,
I am new to Ventuz, so please forgive me if what I'm asking is totally obvious to everyone but me...

I am trying to alpha blend two textured planes which partially overlap. The planes are imported from *.obj files containing vertices and texture coordinates, but no material specification.
I'm adding textures (in this primitive example, a red one and a green one, respectively). Then, I add an alpha value material stage with an alpha gradient. My expectation would be that the red texture smoothly fades into the green texture (BTW, the geometry containiung the red texture is slightly in the foreground). In reality and contrary to what I would expect, though, the red texture fades into the black background:
Image

Two narrow down the reason for this and possibly find an explanation by myself, I added two rectangles manually, made the exact same settings and the result is a smooth fade, as expected:
Image

This might be a bug but I much rather think that I made some mistakes not obvious to me. Could someone please help me? Thanks in advance.

Kind regards
Max

Re: Nebie's question: Something funny with Alpha blending...

Posted: 01 Jan 2024, 11:39
by Astromax
Hello once again,

answering to my own post: It turned out that the root cause for the described problem was a z-sort hickup. Using a ZSort node to explicitly specify z order solved the problem.

What I still do not understand (and what potentially might indeed be a bug?) is, why explicit z-sorting is neccessary in the first place. Shouldn't z-sorting automatically be done accordidng to how the geometries are arranged in 3D space? Any insight would be appreciated.

Kind regards
Max

Re: Nebie's question: Something funny with Alpha blending...

Posted: 04 Jan 2024, 15:46
by Dennis
Welcome!!!

No Worries :) Z-Buffer can be a PITA :)
Join our Discord server - there you can get help from our other Ventuzians as well, and i guess there are more people active and especially ONLINE :D

have a great Day and
RegArts
Dee

:ugeek: