AO color node memorial

Is there anything we can do to bring the Cycles AO color node back onto the targets list?
If I recall correctly it was on there for a few iterations and then disappeared again…
Any chance for it to reappear?
It would be so incredibly useful to be able to mix shaders based on cavity without the use of OSL or baked maps - directly inside a material!
I guess such a node can’t be done with some basic python, right?
Anyone else waiting for that node?

AO Color would not have made possible what you want to do. You need to be able to shoot rays (AO or otherwise) in the shader, only OSL can do that for now. You can’t do it with Python, either.

You should do it with baked maps or vertex colors anyway, shooting rays in a shader becomes extremely expensive and you need a lot of rays to get a good gradient for a cavity map. Especially for indirect rays this would be a total waste and make render times explode.

Ah, I always thought that if you were able to switch AO strength to negative values (as you can do in some OSL AO scripts), it would have the same effect as if you would flip the normals of your object: the AO rays would be shot from inside resulting in cavity instead of AO…
Am I wrong with that (quite simplistic) thought?
My current workflow includes OSL or baked maps, but both of those options are difficult on GPU. OSL doesn’t work anyway and I tend to have many slightly different sub-objects in my models (in ArchViz, for example slightly distorted or cut facade plates…) which all needed dirt/wear but result in huge amounts of maps which again is difficult to handle with limited GPU RAM…
Is there anything else I could improve on that workflow? Did I miss anything?
Actually my first post was a bit misleading: AO/dirt would be the most important use case for an AO color node… Cavity/wear is only the second most important :slight_smile:

If some shaders decide that “negative strength” means “invert the rays” then that’s just how it is. That’s just a design decision.

“AO color” would have worked by sampling the AO first, then feed it into the shader. That’s almost free, since a single AO sample doesn’t make much of a difference. You wouldn’t have been able to control the length or direction of the AO ray per-material though. You can’t use a single AO sample for texture blending, unless it’s a simple linear blend. (Then it averages out the same I think). You can’t use a non-linear color ramp or so. Coming to think of it though, with branched-path, I guess you could do more AO samples for a better gradient.

The difference here is that the ray is not being shot from the shader. That’d be bad for performance and especially the GPU wouldn’t like it.

Instead of using texture maps, you can use vertex color dirt.