Command Palette

Search for a command to run...

Hectal
Back to the lesson: Topic 12.4 — Noise and Shaping Functions
3D Web · Example 2 of 2

Metal flake on a ball

A plain ShaderMaterial with a hand-written light. The build topic does the same inside a MeshPhysicalMaterial so the scene's lights apply.

Noise is random numbers made smooth: hash a grid, blend the corners (value noise), add smaller copies (fBm). Shaping functions bend a number's curve. Together they make clouds, rust, and the paint's metal flake.

Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.

Ready for more? This phase has 5 hands-on exercises with automatic checks.

Practice questions

Write the code in the editor, run it, then open the model answer to compare.

01

Make fBm with 3 octaves and a gain of 0.7.

02

Turn the value noise into rust: dark brown where the noise is above 0.6.

Explain it without notes

01

Why is value noise smooth when hash noise is not?

02

Why compute flakes in object space instead of screen or world space?

Metal flake on a ball
Press Run to see the page.
idle

Console

Nothing logged yet.

Expected console output

shaders: 1 | draw calls: 1