Hello,
I pushed more testing following you advices. Please discard the last reply, above.
I am using composite mapper for performance reasons and I tested alpha blending. Sadly I have an issue with alpha blending and 0D polydata: https://gitlab.kitware.com/vtk/vtk/-/issues/18192
So I am back to depth peeling for now. I produced the screenshots below using your settings. Could you maybe try the script at the end of this post and tell me if you get the same results as those?
I have a blue-green cube on the left; a translated red cube in the middle with vertices overlapping the 1st cube and finally; a translated/rotated grey cube with non-overlapping vertices but co-planar fragments.
I rendered this scene with alpha blending and depth peeling. I am more interested in the cube 1 and 2 color blending than the 3rd cube artefacts
- Top-left alpha blending. I assumed that each cube is rendered separately and then everything is blended together. red+(blue+green) = dark grey. So we end up with a correct blending in this case
- Top-right legacy depth peeling: I guess the last inserted fragment replaces the other one. Since the 2nd cube is instanciated after the first cube, the peel will only render the 2nd cube overlapping fragments? So red only
- Bottom-left dual depth peeling: I cannot make sense of this one. Front peel should be red (see above), back peel should be red too, again see above. So we should have the same render as legacy depth peeling right?
- Bottom-right dual depth peeling with a little z offset for cube1. We have something similar to alpha blending but with artifacts
In the session, you will notice how I use 0.8
values for color. It looks like coplanar surfaces have their colors simply summed giving values close to 1.
(light grey) instead of darkening the result.
Here is the session. You can activate depth peeling, legacy or not at the top of the file. You can apply an offset to any of the cubes.
mini_coplanar.py (2.5 KB)
What do you think?