AO node in Cycles - Color Output
The AO node in Cycles only has a "Shader" output type, meaning I can't use it as a texture. It would be awesome to have a "color" output as well for integrating it in materials.
The AO node in Cycles only has a "Shader" output type, meaning I can't use it as a texture. It would be awesome to have a "color" output as well for integrating it in materials.
15 Comments
For more info, I made a proposal about this some time ago: wiki.blender.org/index.php/User:Gregzaal/AO_node_proposal
The problem with your proposal is that what you want to do is non-linearly mapping the result of an AO evaluation, e.g. with a Color Ramp. This just doesn't work without taking a good amount of AO samples before feeding the ramp, every time the shader is evaluated . The shader would become extremely expensive, that's why you really want to pre-compute the occlusion on a texture or a vertex map.
Lukas says what you want is not possible, but I'd rather say it is impractical. Having said that, having just a single AO sample per shader evaluation (maybe with distance and falloff) that averages out over multiple passes may still be useful - this is what I believe Octane does. You just can't use this with a Color Ramp, you will get exactly the problem that your image shows: wiki.blender.org/index.php/File:Osl_ao_issue.png
This would indeed be very useful, but sadly it's not possible in a pathtracer (for reasons I explained here: blenderartists.org/forum/showthread.php )...
Probably they use the same trick as the OSL AO shaders floating around on the web, returning either 0 or 1 depending on a random ray - for mixing shaders, that works, but not for more advanced setups. Alternatively, you can of course always bake AO and use it as a texture.
Yeah I usually bake AO to use it like this. It also makes great dirtmap masks and so on.
let's say it's impossible for a color node ... the shader one still can have a distance parameter, to use it in indor scene for exemple
@lukasstockner97 I understand that 'Real AO' color input cannot work in path tracer but for procedural texturing purposes trick similar to this OSL script will be just fine. This feature even don't need do take account of other objects in scene to reduce computation cost (but option for that can be nice). In most cases baked textures for single asset contain only "self AO" and thats enough for creating procedural masks.
Not taking into account the other objects in the scene would likely not reduce computational cost significantly - raytracing a BVH is logarithmic in complexity, after all.
You say tricks "similar to the OSL script" would be fine, but then you will still face this issue: wiki.blender.org/index.php/File:Osl_ao_issue.png
You won't be getting a "sharp" dividing line, which would be a requirement for even a basic wear-and-tear shader.
Yes, we should add this functionality. :)
That with a distance and falloff input would be great
I think this is added in right now, at least in Eevee it is
Please Insert this Node in Cycles, this is better way as Geomentry/Pointiness Node.
Please with Angle Option and effectiv radius
I like this idea, it's good for use , like pointiness
I have to say this would be really nice to have... no idea how hard it would be to implement though :3
This would be insanely useful. Especially when used in combination with "pointiness".