Normal map bake artifacts when using Bevel shader #70189

Closed
opened 2019-09-23 20:12:31 +02:00 by Max · 8 comments

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: f6cb5f5449
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.

Normal.png

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.

Report comparison.png

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.
Bevel shader normals map bake.blend

**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: `f6cb5f5449` 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. ![Normal.png](https://archive.blender.org/developer/F7772413/Normal.png) 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. ![Report comparison.png](https://archive.blender.org/developer/F7772416/Report_comparison.png) **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. [Bevel shader normals map bake.blend](https://archive.blender.org/developer/F7772420/Bevel_shader_normals_map_bake.blend)
Author

Added subscriber: @Raytraced

Added subscriber: @Raytraced

Added subscriber: @AndyDavies-3

Added subscriber: @AndyDavies-3

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

Bevel shader normals map bake_fixed.blend

2019-09-25_04-13-57.png

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 [Bevel shader normals map bake_fixed.blend](https://archive.blender.org/developer/F7774132/Bevel_shader_normals_map_bake_fixed.blend) ![2019-09-25_04-13-57.png](https://archive.blender.org/developer/F7774134/2019-09-25_04-13-57.png)
Author

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:

  • 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).
  • It does not cause any artifacts while baking without using bevel shader in blender as well as in other software (3ds Max).

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):

Comparison.png

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

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: - 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). - It does not cause any artifacts while baking without using bevel shader in blender as well as in other software (3ds Max). # 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): ![Comparison.png](https://archive.blender.org/developer/F7776193/Comparison.png) 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 :)

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 :)
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Hi and thx for the report (sorry it took so long to answer)!

To me, this looks like a duplicate of #61916 (Visible wireframe artifacts after baking normal map with bevel shader) & #72011 (Visible wireframe artifacts after baking normal map with bevel shader (2)).
Will merge these reports and hope for a timely fix, thx again for reporting!

Hi and thx for the report (sorry it took so long to answer)! To me, this looks like a duplicate of #61916 (Visible wireframe artifacts after baking normal map with bevel shader) & #72011 (Visible wireframe artifacts after baking normal map with bevel shader (2)). Will merge these reports and hope for a timely fix, thx again for reporting!
Member

Closed as duplicate of #72011

Closed as duplicate of #72011
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#70189
No description provided.