Page MenuHome

AO distance ignores textures with black
Closed, ResolvedPublic


System Information
Win 10 64, Nvidia GTX 960 4GB

Blender Version
Broken: 2.79 38b72fb
Worked: never

Short description of error
When a texture with pure black is plugged to the distance input of AO node, it completely ignores the texture. Also when using Factor output of a checker texture it doesn't work even with values above 0.

Exact steps for others to reproduce the error
Attached is a blend file with a simple geometry and AO shader. Just render preview in viewport. I added two colors (as "Combine RGB" for better readability of values) - one is pure black 0,0,0 and one is slightly lighter 0.001. Factor output doesn't work at all.

Event Timeline

Philipp Oeser (lichtwerk) triaged this task as Confirmed, Medium priority.

Can confirm this,

seems like the AO node returns early when max_dist is zero.
What I find strange is that it will output black/0.0 in this case, see here

If you consider previous behavior of the AO BSDF node [which would take the distance globally from world light_settings], this would result in unoccluded/white/1.0 at zero distance.

Also note that if you dont link the Distance socket to anything and set the distance to 0.0 numerically, this will actually NOT early out directly, but take the Distance value from world light_settings (AO panel), see here
[that might have its usecases, but confused me for a bit...]

Oh, @Brecht Van Lommel (brecht) was quicker :) [phab hung here for a bit, so my comment came late...]