Page MenuHome

Normal map bake artifacts when using Bevel shader
Open, Needs Triage by DeveloperPublic

Description

System Information
Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: GeForce GTX 770/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 398.82

Blender Version
Broken: version: 2.80 (sub 75), branch: master, commit date: 2019-07-29 14:47, hash: rBf6cb5f54494e
Worked: (optional)

Short description of error
Baked normal map contains artifacts when baking from High-poly geometry with Bevel shader applied. Artifacts seem to be based on High-poly topology, changing it's triangulation affects the result, but does not eliminate artifacts completely.

Rendering just High-poly object with Bevel shader applied does not display similar artifacts on its own. Baking normal map using same objects without applying Bevel shader does not display these artifacts either.

Exact steps for others to reproduce the error
With attached .blend file click "Bake" on the right side of the UI. Observe resulting normal map artifacts.

Details

Type
Bug

Event Timeline

Hi Max,

I'm not so sure this can be considered a bug per se, but rather is a result of the HP being not being suitable for baking. Even though the bevel shader can do great things, there still are limitations and you have to be sensible about the kind of geometry you expect to be processed by it. You always really want to avoid long thin triangles in all your meshes and ensure that your HP has as an even topology as possible, so that it is sampled as evenly as possible. Ngons will still be triangulated (as will quads) but for best results they need relitivly close verts to connect to, as to not cause issues as shown in your screenshots. It's one of the major downsides of working with the boolean + bevel workflow that has become popular over the past few years as people tend to forget that the old rules still apply, or never really learnt them in the first place (if they are new 3d users). :)

In summary, the errors you are seeing are down to the many small, thin trangles being bunched together very closley. If you even out the topology then the error is substantially reduced. Some banding errors are still visible, but that is down to limited bit precision in the 8bit bakes and can be fixed (probably) with a 16bit image or greater.

Hope that helps!

-Andy

Hi Andy,

I understand your implications about geometry having potential problems, however I still believe that there is nothing inherently wrong with it that should affect baking in such a way. I know that long thin triangles are bad in general (though to my understanding it is mainly performance wise?) and I see that reducing them somewhat alleviates the error here. It however does not remove it completely it seems. The reasons I considered this behavior to be a bug are the following:

  1. This geometry does not cause any problems on its own, there are no artifacts in all blender render scenarios including viewport rendering, as well as other software/real-time renderers (3ds Max, Sketchfab).
  2. It does not cause any artifacts while baking without using bevel shader in blender as well as in other software (3ds Max).
  3. It does not cause any artifacts when rendered with bevel shader outside of baking.

Considering these, it seems to me like there is nothing that should prevent a perfect bake in such a case.

One more thing I found just recently, changing global render samples to 1 seems to remove the problem completely. The resulting normal map is very noisy this way however, which can be somewhat remedied by baking at higher resolution and downsizing manually. Here is the comparison of results achieved when baking with render samples lowered to 1 (Samples mentioned on a picture are Bevel node samples property):

This further strengthens my perception that the result that was achieved in a first place is unintended.

Hi Max,

The triangle issue is also persistent for high poly objects (though not for the same perf. related reasons as with LP geo) because you need to have reasonable geometry in order to perform certain operations. Your errors are showing up exactly where the long thin triangles are connected to the bottom of the hemispherical cutout, which leads me to belive it's probably a limitation of the bevel implimentation when applied to the mesh for baking, which is caused by poor topology. I'm guessing that the cycles render implimentation is in screenspace so it doesnt have the same limitations, but I cant say for sure.

Other than that I would have to leave it to the devs to think about :)