Scratches Noise*

Scratches Noise Preview

Scratches Noise simulates fine, semi-random etched lines across a surface. Unlike 3D fractal noise, this is a specialized 2D pattern generator that creates layered, anisotropic streaks of varying length, width, and curvature. By stacking multiple rotated grids of pseudo-random wavy lines, it produces dense, multi-directional networks ideal for brushed metal, microscopic wear, or damaged coating effects. Features a custom adaptive filtering engine that ensures smooth, alias-free rendering even with extremely thin lines and low sample counts.

Performance Cost 🟢 Low
Space 2D UV Space
Implementation Native Compiled C++
Devices (Cycles) CPU / GPU (1:1)

Usage & Behavior

With default values
High waviness and density
With no custom filtering (4 global samples)
With high custom filtering(and just 1 global sample!)

This node is strictly 2D, meaning it requires UV coordinates (or a planar projection) to function correctly. It works by generating a grid of cells, where each cell spawns a single "streak." These grids are then layered and rotated on top of each other. The result is highly customizable, ranging from parallel brushed lines to chaotic, crisscrossing damage.

Best Used For: Brushed metal, surface abrasion, ice skating rinks, microscopic plastic wear, and hair/fur strands.

Key Features

  • Anisotropic Structure: Generates directional lines rather than isotropic blobs.
  • Layer Stacking: Accumulates rotated grids for complex intersections.
  • Adaptive Filtering: Derivative-based anti-aliasing for stable rendering.
Adaptive Stable Filtering

One of the biggest challenges with thin line procedural patterns is aliasing (flickering or jagged lines) when viewed from a distance. Scratches Noise solves this using a robust, derivative-based filtering routine.

The code calculates the partial derivatives of the UV coordinates (dUVdx, dUVdy) to measure the "footprint" of the texture pixel on the screen. It then adaptively softens the scratch profile based on this footprint size. If the derivative is too small, it clamps to a minimum pixel width to prevent disappearance; if too large, it normalizes to prevent instability. This ensures that scratches remain visible and alias-free even at extreme angles or low render sample counts (down to 1 sample per pixel).

Parameters

Coords Vector
Input 2D texture coordinates (UVs). Since this noise relies on derivatives for filtering, using explicit UVs is highly recommended over generated coordinates.
Scale (default: 15.0)
Overall density of the scratches. Higher values create finer, more numerous lines.
Intensity (default: 1.0)
Global brightness multiplier. Use this to control the visibility of the scratches against a surface.

Geometry Control

Length Min / Max (default: 0.3 / 1.0)
Sets the range for random scratch lengths. The noise will randomly pick a length between these two values for each scratch.
Width Variation (default: 1.0)
Controls the randomness of the scratch thickness.
- High values: Mix of thin hairlines and thick gouges.
- Low values: Uniform width for all scratches.
Waviness (default: 0.1)
Amplitude of the sine wave applied along the scratch path.
- 0.0: Perfectly straight lines (machined look).
- High values: Curly, organic fibers (hair/wool).
Tip Softness (default: 0.1)
Controls the fade-out at the start and end of each scratch. Higher values make the scratches look like soft brush strokes rather than hard cuts.

Distribution & Layering

Layers (default: 5)
The number of independent scratch grids to stack. Each layer is rotated relative to the previous one to build up a complex, multi-directional network.
Layers Variation (default: 0.5)
Randomizes the intensity of each layer. This prevents the pattern from looking too uniform by making some scratches faint and others deep.
Rotation (default: 0.0)
Global rotation angle (in radians). Rotate this to align the brushing direction with your object's geometry.

Advanced

Filtering (default: 0.05)
Controls the strength of the anti-aliasing filter.
- 0.0: Disabled (sharpest, but prone to flickering).
- Higher values: Smoother, thicker lines that hold up better at distance.

Quick Recipes

Use these settings for different surface finishes.

Brushed Aluminum

Scale: 30.0
Layers: 2
Waviness: 0.0
Rotation: 0.0
High scale, low layers, and zero waviness create straight, parallel machining marks.

Surface Abrasion

Scale: 10.0
Layers: 8
Layers Var: 0.8
Rotation: (Any)
Many layers with high variation create a chaotic mess of random scratches.

Curly Wool Fiber

Scale: 40.0
Waviness: 0.8
Width Var: 0.2
Tip Softness: 0.5
High waviness and soft tips simulate fine organic hairs or fibers.
Technical Note: To ensure deterministic rendering across CPU and GPU, the noise uses a custom hashing function that avoids large-number modulo operations on the seed. The rotation logic uv * ca + (-uv.y, uv.x) * sa is applied per-layer to ensure isotropic distribution of the scratches.
↑ Back to Top

Leave a Reply