Rust blended into corners based on AO (model by Emiliano Colantoni) Shader Nodes Distance: distance to trace rays and detect occlusion.Only Local: only detect occlusion from the object itself, and not others.Inside: detect convex rather than concave shapes, by computing occlusion inside the mesh.Samples: number of samples to use, keep as low as possible best performance.If render time is a concern, using Pointiness from the Geometry node or baking Ambient Occlusion will render faster. Similar to the Bevel shader, this is an expensive shader and can slow down renders significantly. It can for example be used to add weathering effects to corners only.
The Ambient Occlusion shader can now output a color or a float, for procedural texturing. The bevel modifier is a faster option when it works, but sometimes fails on complex or messy geometry. For that reason, we suggest to mainly use this for baking or still frame renders where render time is not as much of an issue. Note that this is a very expensive shader, and may slow down renders by 20% even if there is a lot of other complexity in the scene.
In the compositing nodes, create a Cryptomatte node and link the Render Layer matching Image and Crypto passes to it.Enable Cryptomatte Object render pass in the Passes panel, and render.Motion blur, depth of field, transparency, and antialiasing are better supported.The objects to create a mask for do not need to be specified in advance, rather they can be chosen while compositing.It is effectively a more powerful version of the Object and Material ID passes with two advantages: Cycles outputs the required render passes, which can then be used in the Blender compositor or another compositor with Cryptomatte support to create masks for specified objects. Cryptomatte is a standard to efficiently create mattes for compositing.