Page MenuHome

Visible wireframe artifacts after baking normal map with bevel shader (2)
Open, Confirmed, MediumPublic

Description

System Information
Operating system: Windows 10 Pro
Graphics card: Radeon(TM) RX 460 Graphics

Blender Version
Broken: 2.81 (sub 16), branch: master, commit date: 2019-11-20 14:27, hash: 26bd5ebd42e3, type: Release
Worked: do not know

Short description of error
Wire-frame like artifacts on the baked normal map when using bevel shader node

Exact steps for others to reproduce the error

  1. Open provided .blend file
  2. Select the half_sphere object
  3. In "Render Properties" panel in the "Bake" section press "Bake"
  4. Replace the normal input of the Principled BSDF node with the newly baked normal map
  5. Preview the normals on the half_sphere and plane objects

Long description of error

It seems to me that the bevel shader node is affecting the normals across the all shading points on the surface and not just at the place where there is beveling,
which produces easily visible artifacts that follow the mesh wire-frame, especially when using high gloss values.

In the image bellow and in the blend file normal map is shown on a plane to see the issue more easily:

But the issue is visible on the model itself and persists when working with other models and blend files:



Normal map exaggerated with levels in PS for illustration:


Clearly visible artifacts in the places where normals should be flat (pointing up) and shouldn't be affected by the bevel node.
This is why i think (i might be guessing too much) this is the same issue as in https://developer.blender.org/T61916. But the OP never responded to clarify the issue.

As i tried to work around this issue i also found out:

  1. Artifacts are also visible when baking with low-poly, high-poly and averaged cage setup
  2. Artifacts are not visible when baking object space normals

Which is really not a viable option since there is no multi-sampling when baking in blender, and we get other kind of artifacts where normals should simply be flat.
Below is object space map rebaked to tangent space map

  1. When i subtract world normals from geometry node with world normals from bevel node i saw this:

Which at first seems as expected result, but when i added gamma node after the vector math node:

Result above suggest to me (i am just guessing as a layman) that the range of bevel shader node effect on the surface normals is quite wider then it should be. Setup i used is provided in "Collection 2" of the blend file.

So is this a bug, an unavoidable side effect of bevel shader, or it can be improved so this effect is masked and doesn't affect places where normals should remain flat?!

Details

Type
Bug

Event Timeline

Little update:

Using uncompressed tiff format seems to give better results.

png bake

tiff bake

and with using setup like this one can get rid of most of the artifacts

Tho they are still somewhat present when i tested with other models

Philipp Oeser (lichtwerk) lowered the priority of this task from Needs Triage by Developer to Confirmed, Medium.Fri, Nov 29, 12:27 PM

The baking issues where mentioned in comments from D2803: Cycles: add bevel shader, for raytrace based rounded edges. as well and in T61916: Visible wireframe artifacts after baking normal map with bevel shader (which just died because of inactivity).

Not knowing the internals well, I am not even sure if one get around this issue [other than your proposed node setup workaround], interesting point though about tangent vs. object space.
Will confirm for now, maybe cycles wizards can shed some light on this?

CC @Brecht Van Lommel (brecht)
CC @Stefan Werner (swerner)
CC @Lukas Stockner (lukasstockner97)
CC @Sergey Sharybin (sergey)