Page MenuHome

Ambient occlusion node doesn't apply to beveled edges
Closed, ArchivedPublic

Description

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

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

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.

Event Timeline

Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Needs Information from User.Tue, Jul 13, 3:43 PM

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:

Does this not work for you?

Raimund Klink (Raimund58) closed this task as Archived.Wed, Jul 14, 3:07 PM

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.

Philipp Oeser (lichtwerk) reopened this task as Needs Information from User.Wed, Jul 14, 3:17 PM

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

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

Philipp Oeser (lichtwerk) closed this task as Archived.Thu, Jul 22, 5:42 PM

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

I know there is still the pointiness option in the geometry node but that usually doesn't work that great too.

Like those faces on the bottom cylinder are bright and the side facing faces of the other cylinders are black. Weird.

Philipp Oeser (lichtwerk) reopened this task as Needs Information from Developers.Mon, Jul 26, 10:56 AM

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


this is your case as seen from a the surrounding area (appear darker):

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:

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 Van Lommel (brecht): am I right on this? (would it possibly make sense to make uniform sampling optional for AO? would this be noisier then?)

The analysis by @Philipp Oeser (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.