Ambient occlusion node doesn't apply to beveled edges #88292

Closed
opened 2021-05-14 21:10:46 +02:00 by Steffen Hartmann · 21 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce RTX 3060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 462.31

Blender Version
Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-05-03 23:07, hash: e6bf272abd
Worked: don't know
Short description of error
Ambient occlusion node doesn't apply to beveled edges. As you can see on the picture below, the bevel is just white and the surrounding dark. I've tested in cycles and eevee - both the same issue.
Screenshot 2021-05-14 205741.png

edit: I've tested a bit with the math node and i got a good result yet now i can't get rid of those thin lines around the bevel on the out edges
Screenshot 2021-05-14 213449.png

Exact steps for others to reproduce the error
Use the bevel modifier (or create a bevel on an object/mesh via edit mode) and use the ambient occlusion node + color ramp to create a mask for inner edges. The AO node doesn't work on the bevel.

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce RTX 3060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 462.31 **Blender Version** Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-05-03 23:07, hash: `e6bf272abd` Worked: don't know **Short description of error** Ambient occlusion node doesn't apply to beveled edges. As you can see on the picture below, the bevel is just white and the surrounding dark. I've tested in cycles and eevee - both the same issue. ![Screenshot 2021-05-14 205741.png](https://archive.blender.org/developer/F10103234/Screenshot_2021-05-14_205741.png) edit: I've tested a bit with the math node and i got a good result yet now i can't get rid of those thin lines around the bevel on the out edges ![Screenshot 2021-05-14 213449.png](https://archive.blender.org/developer/F10103390/Screenshot_2021-05-14_213449.png) **Exact steps for others to reproduce the error** Use the bevel modifier (or create a bevel on an object/mesh via edit mode) and use the ambient occlusion node + color ramp to create a mask for inner edges. The AO node doesn't work on the bevel.

Added subscriber: @Harti

Added subscriber: @Harti

#90134 was marked as duplicate of this issue

#90134 was marked as duplicate of this issue

Added subscriber: @costa

Added subscriber: @costa

This comment was removed by @costa

*This comment was removed by @costa*
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

Dont think this is actually a bug?
It just happens that those particular faces are really not that much occluded.
Not 100%sure if the whole hemisphere is traced for AO (should be the case), but the bevelled faces normal points to a lot of "free space" (and looking from the normal only a tiny fraction of its hemisphere actually has occluding faces in there.

If you start putting geometry there, you will see occlusion:
#88292.blend

Does this not work for you?

Dont think this is actually a bug? It just happens that those particular faces are really not that much occluded. Not 100%sure if the whole hemisphere is traced for AO (should be the case), but the bevelled faces normal points to a lot of "free space" (and looking from the normal only a tiny fraction of its hemisphere actually has occluding faces in there. If you start putting geometry there, you will see occlusion: [#88292.blend](https://archive.blender.org/developer/F10223232/T88292.blend) Does this not work for you?
Contributor

Added subscriber: @Raimund58

Added subscriber: @Raimund58
Contributor

Changed status from 'Needs User Info' to: 'Archived'

Changed status from 'Needs User Info' to: 'Archived'
Contributor

No activity for more than a week. As per the tracker policy we assume the issue is gone and can be closed.

Thanks again for the report. If the problem persists please open a new report with the required information.

No activity for more than a week. As per the tracker policy we assume the issue is gone and can be closed. Thanks again for the report. If the problem persists please open a new report with the required information.
Member

Changed status from 'Archived' to: 'Needs User Info'

Changed status from 'Archived' to: 'Needs User Info'
Member

Eh, this was just one day without response...

Eh, this was just one day without response...
Contributor

My bad, sorry. I've read "Juni"
I apologise

My bad, sorry. I've read "Juni" I apologise
Member

Changed status from 'Needs User Info' to: 'Archived'

Changed status from 'Needs User Info' to: 'Archived'
Member

No activity for more than a week. As per the tracker policy we assume the issue is gone and can be closed.

Thanks again for the report. If the problem persists please open a new report with the required information.

No activity for more than a week. As per the tracker policy we assume the issue is gone and can be closed. Thanks again for the report. If the problem persists please open a new report with the required information.

Sorry for the delay! I've tried the blend file and it clearly shows the problem. The beveled areas should be dark too but instead they are bright. This makes it close to impossible to use the ao node for a crease or edge mask (for edge wear or dirty creases). image.png

I know there is still the pointiness option in the geometry node but that usually doesn't work that great too. image.png Like those faces on the bottom cylinder are bright and the side facing faces of the other cylinders are black. Weird.

Sorry for the delay! I've tried the blend file and it clearly shows the problem. The beveled areas should be dark too but instead they are bright. This makes it close to impossible to use the ao node for a crease or edge mask (for edge wear or dirty creases). ![image.png](https://archive.blender.org/developer/F10236740/image.png) I know there is still the pointiness option in the geometry node but that usually doesn't work that great too. ![image.png](https://archive.blender.org/developer/F10236757/image.png) Like those faces on the bottom cylinder are bright and the side facing faces of the other cylinders are black. Weird.
Member

Changed status from 'Archived' to: 'Needs Developer To Reproduce'

Changed status from 'Archived' to: 'Needs Developer To Reproduce'
Member

Added subscriber: @brecht

Added subscriber: @brecht
Member

The thing is, these two situations are not the same (note the direction of the surface normal):

this is your case as seen from a bevelled area (appear brighter):
image.png
this is your case as seen from a the surrounding area (appear darker):
image.png

Now one might think: from both surfaces, half of the hemisphere blocks, the other half is unblocked, so why are these not the same value in AO?
I believe this is due to the fact that the sampling is weighted (see sample_cos_hemisphere vs sample_uniform_hemisphere), so samples around the surface normal have a much higher chance of contributing to (diffuse) shading than samples at lower gazing angles:
image.png

So in the case of the bevelled areas, a lot more "green stuff" is around the surface normal as opposed to the darker surrounding areas (where a lot of light blocking is in the high area of intrest (sampling wise).

I think this makes sense from the light transport (the contribution of light coming in from the direction of the surface normal is just higher than the contribution from light at lower gazing angles).
Now for Ambient Occlusion I am not 100% sure (it might come down to what you define this to and also where and how it is used in production).
I believe there are renderers out there where you can pick whethter you'd want uniform or cosine weighted distribution (maybe for exactly these reasons).

Still dont think this is a bug, but would like get input from module devs:
@brecht: am I right on this? (would it possibly make sense to make uniform sampling optional for AO? would this be noisier then?)

The thing is, these two situations are not the same (note the direction of the surface normal): this is your case as seen from a bevelled area (appear brighter): ![image.png](https://archive.blender.org/developer/F10238014/image.png) this is your case as seen from a the surrounding area (appear darker): ![image.png](https://archive.blender.org/developer/F10238023/image.png) Now one might think: from both surfaces, half of the hemisphere blocks, the other half is unblocked, so why are these not the same value in AO? I believe this is due to the fact that the sampling is weighted (see `sample_cos_hemisphere` vs `sample_uniform_hemisphere`), so samples around the surface normal have a much higher chance of contributing to (diffuse) shading than samples at lower gazing angles: ![image.png](https://archive.blender.org/developer/F10238021/image.png) So in the case of the bevelled areas, a lot more "green stuff" is around the surface normal as opposed to the darker surrounding areas (where a lot of light blocking is in the high area of intrest (sampling wise). I think this makes sense from the light transport (the contribution of light coming in from the direction of the surface normal is just higher than the contribution from light at lower gazing angles). Now for Ambient Occlusion I am not 100% sure (it might come down to what you define this to and also where and how it is used in production). I believe there are renderers out there where you can pick whethter you'd want uniform or cosine weighted distribution (maybe for exactly these reasons). Still dont think this is a bug, but would like get input from module devs: @brecht: am I right on this? (would it possibly make sense to make uniform sampling optional for AO? would this be noisier then?)

Changed status from 'Needs Developer To Reproduce' to: 'Archived'

Changed status from 'Needs Developer To Reproduce' to: 'Archived'

The analysis by @lichtwerk is correct. More control over the weighting would be a good feature to add, but that's outside the scope of the bug tracker.

The analysis by @lichtwerk is correct. More control over the weighting would be a good feature to add, but that's outside the scope of the bug tracker.
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
6 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#88292
No description provided.