Cycles Baking Denoise Margins Issue

I’m super excited about being able to denoise Cycles bakes with 3.0. However, I am having an issue that when I bake with a margin, the margin pixels produce an ugly seam. Here is a closeup of part of a UV patch that has been baked with denoise:

You can see that the margin pixels are darker and much ‘noisier’ than the island area, and when drawn in game the seams are quite ugly. I can sidestep the issue by baking with no margin and using an external tool to pad the UV islands separately, but is there any way to get Blender to correctly bake the margins? Even if I could at least get the margins to match in brightness with the edges of the island that would be a big help.

I did find and which seem to touch on this, so I’m guessing there isn’t really a solution for now, but maybe I’m wrong. In the first link someone says cycles bakes only the pixels which are inside the polygon on the UV map. The border is then generated by just repeating these colors outwards which doesn’t actually seem to be the case, since duplicating the border pixels outward would at least make the margin pixels match in brightness with the edge pixels.

Thanks for any help.

Edit: Apparently, it seems as if even baking without margins won’t work, because the problem seems to be with the edges of the denoised bake themselves. Even UV seams that lie on a flat surface end up with dark banding at the very edge, which is repeated and blurred into the margin.

1 Like

Don’t think that is a thing yet.

Margin bake works on my end.

Yeah, I don’t think the problem is with the margins after all, it’s a problem with the denoising. If I bake without denoise, the seams turn out just fine, but as soon as I enable denoise, then I get dark banding along the island edges. eg:


On the left is a noisy bake, on the right is the same bake with denoise. The left island fits well in-game with the other half of the part, with no visible seam, but the denoised version has dark banding at the seams that is quite visible, and it is those darkened pixels that get expanded out to make the margin.

The link you provided gives the reason for this, I think: Since the filtering happens in pixel (and therefore UV) space, seams in the UV mapping show up in the final result because pixels in a different UV island will be outside the denoising radius and therefore missed. So maybe they’ll provide a fix for it in 3.1 or something. Until then, I’m not sure baking denoise is quite usable yet, unless the seams are well hidden.

1 Like

Are you baking lighting with the textures?

Yes. The objects are solid colored, so I am essentially baking colored lightmaps.

Just realized the same issue here. Trying to bake a scene and i got all those visible seams and didn`t know why untill now!
I guess the solution is to uncheck denoise in baking and use it in the compositor for the already baked textures ?

Late to this thread - was that the best solution?

I would really appreciate anyone’s advice on this issue because I am trying to work through it now!

The best way i found is to use the Compositor to denoise the baked map, and not the render itself. Here is a short tutorial how to do that. And one more thing. After you denoise it you need to switch to Image Editor and choose View Node to save or use the map from the compositor.

1 Like

Hi–thanks so much for your reply! I actually looked at that solution, but I found that the denoiser in the compositor really does not give the quality of a bake that the denoiser in the rendered gives (it almost desaturates the bake, but at least it is a bake without noise). Have you also experienced this?

I haven`t tweaked that configuration but basically in the Compositor you can do a lot of image manipulation, If you think its desaturated you can adjust it by adding a Hue Saturation Value node.