f3d
f3d copied to clipboard
--texture-base-color with opacity and depth peeling is not correct
Describe the bug Using a texture base color with opacity and depth peeling, without setting --opacity, cause a wrong rendering
To Reproduce Steps to reproduce the behavior:
-
Open the file using
f3d --dry-run WaterBottle.glb --texture-base-color=/home/glow/f3d/src/testing/data/albedo_mod.png --depth-peeling --geometry-only:
-
wrong rendering:

- Using the following provide a correct rendering:
f3d --dry-run WaterBottle.glb --texture-base-color=/home/glow/f3d/src/testing/data/albedo_mod.png --depth-peeling --geometry-only --opacity=0
Expected behavior
Correct translucent rendering, like this:

- The --opacity parameter is not taken into account at all, apart from enabling translucentsy, it should multiply.
Indeed. This texture is RGBA, with an alpha channel containing translucent pixels. But VTK isn't aware the object is translucent. My suggestion is to force the translucent flag on the actor if the color texture has 4 channels.
Sounds like a good approach
Looks like this should be set inside VTK, not in F3D, but maybe I'm mistaken.
Added a note a about the fact this is not multiplied.
See #333 for more info