[SOLVED] Alpha transparency with two layers geometry create edge on top layer when rendering and perform

Hello there,

I’m a beginner on TD and I’m experiencing a weird behaviour on a 3D camera rendering with 2 layers.
The background layer is a video file (tz = -0.1), while the foreground layer (tz = 0.1) is a TOP constant with a mask. I also tried for that layer a simple TOP Rectangle + TOP Phong but the results remains the same with an edge on the polygon geometry.

Here some captures of the result using Transparency Order Independent Transparency on the render,

When I’m switching the render transparency to Sorted Draw with Blending, the foreground layer appear like if the Alpha was just not existing - why, I do not know…
With this option activated, I’m also getting a warning with an unclamped Alpha value while it seems there are between 0 and 1.

The only methods that get rid of the edge is Alpha-to-Coverage but it requires to increase the AntiAlias subsampling, and the performance decrease accordingly. It seems that this solution should be kept for complex scene, which is really not the case here with 2 simple geometry.

The overall network looks like this,

I went across the forum and all the suggestions I tried never made that edge disappear, so help is more than welcome!

[edit]
I spent a bit of time experimenting other paths, and I discovered that processing each geometry separately with 2 RenderPass TOP and composite them remove the edge line on the foreground polygon. I changed the box color in between, but this is not linked to that.

The alternate processing looks like this now,

I have to admit that I would prefer to only have to manage 1 rendering node, but at least I found a way to get that works.

Thanks a lot,
Christophe

Use the ‘Sorted Draw with Blending’ mode for this. You’ll want to turn on blending on the ‘Common’ page of the MAT for the geometry that is on-top (that is what the error is trying to tell you). Finally, you need to ensure the background is drawing before the foreground, so change the ‘Draw Priority’ parameter on the ‘Render’ page of Geometry COMP so the background one is higher than the foreground one. Check out the blending article on the wiki for more information.

1 Like

Thanks @Malcolm!

Indeed it works. I messed up on priority values when I tried, that’s why it wasn’t working.
The warning on alpha blend remains but the result is OK.

Have a good day!