Table of Contents
Scratch
Controls
Density
The density of the scratches, a higher density creates more scratches.
Width
The width of each scratch, which is also randomised per scratch.
Scale
This allows for scaling the procedural up or down.
Strength
The strength of the scratches. This can be used to mask the scratches if the Strength is driven using the node input.
Seed
The seed for the noise used to position and rotate the scratches. A different seed creates a different distribution of scratches even if all the other parameters are identical.
Divisions
Internally, this value is used to determine the “search range” for scratches around the currently shaded spot. Larger values will result in longer rendering times. Decreasing this value will product less scratches (which can be countered by increasing the density). Useful values are between 5 and 50.
The Roughness and Anisotropic values can be used to drive any parameter. The naming used is for convenience as they should be connected to the inputs of the same names in the Principled BSDF node for a scratch effect.
Base Roughness
The Roughness value to send to the node output if no scratch is hit.
If this value is used to drive the Roughness of the Principled BSDF material (or any other really), make sure that the sum of the Base Roughness, Scratch Roughness and Roughness Variation is not more than 100%.
Scratch Roughness
The Roughness value to send to the node output if the current shaded spot is on a scratch.
Roughness Variation +/-
This is the range that the Scratch Roughness will change from scratch to scratch based on the underlying noise. Use this to add some variance to the scratches.
Base Anisotropic
The Anisotropic value to send to the node output if no scratch is hit.
If this value is used to drive Anisotropic of the Principled BSDF material (or any other really), make sure that the sum of the Base Anisotropic, Scratch Anisotropic and Anisotropic Variation is not more than 100%.
Scratch Anisotropic
The Anisotropic value to send to the node output if the current shaded spot is on a scratch.
Anisotropic Variation +/-
This is the range that Scratch Anisotropic will change from scratch to scratch based on the underlying noise. Use this to add some variance to the scratches.
Rotation Offset
This adds an offset to the Rotation output which can be used to control the direction of the anisotropic shading.
Connections
Inputs
The inputs correspond to the controls of the same name.
Outputs
Roughness
This outputs the Scratch Roughness if the current spot is on a scratch, otherwise the Base Roughness.
Anisotropic
This outputs the Scratch Anisotropic value if the current spot is on a scratch, otherwise Base Anisotropic.
Rotation
This is the direction of the Anisotropic value, based on the direction of the scratch as well as the Rotation Offset.
Mask
This outputs white if the spot is on a scratch, otherwise black. The Strength is also taken into account.
This is the plugin of the month for February 2021, made possible by the finest patrons on Patreon.
Scratch is based on scratch.osl by John Su - https://github.com/cuckon/scratched