Clearcoat + Anisotropy Lab (r183 roadmap)

Side-by-side physical material comparison that demonstrates brushed anisotropic highlights with a clearcoat layer versus a baseline PBR material.

Key topics: three.js clearcoat, anisotropy, meshphysicalmaterial, pbr materials, r183

Overview

Many manufactured surfaces have more than one layer of reflection. Car paint has a glossy clear lacquer over coloured metallic flakes, and brushed aluminium stretches highlights along its brush direction. MeshPhysicalMaterial models both with clearcoat and anisotropy. This lab compares a sphere using them against a baseline PBR sphere under a live environment probe.

How it works

MeshPhysicalMaterial extends MeshStandardMaterial with extra lobes in its lighting model:

  • Clearcoat adds a second, independent specular layer on top of the base material, like varnish. clearcoat (0–1) sets its strength and clearcoatRoughness its glossiness. A rough metallic base under a sharp clearcoat is the classic car-paint look: blurred coloured reflections underneath and crisp white reflections on top.
  • Anisotropy makes roughness directional. Instead of a round highlight, light is stretched along one tangent direction, as on brushed metal, vinyl records or hair. anisotropy sets the strength and anisotropyRotation the direction in tangent space.

Both effects depend heavily on what the surface reflects, so a CubeCamera captures a changing environment into scene.environment, giving the highlights something to show.

Exploring the demo

Compare the two spheres and look for the double reflection on the clearcoat sphere: a sharp outer highlight over a softer inner one. Increase anisotropy and the highlight stretches into a streak; change the rotation and the streak spins around the surface. Raise clearcoat roughness to see the top layer frost over.

Practical advice

Physical material features cost extra shader work, so enable them only where they make a visible difference, typically hero objects such as vehicles and products. Anisotropy needs tangents, which are generated from UVs, so meshes need sensible UV layouts. Continue with iridescence and thin-film materials, experiment freely in the material editor, and see how environment capture works in environment maps.

What this code does

- Physical Material Focus: uses `MeshPhysicalMaterial` for advanced surface response beyond base metal/roughness.
- Side-by-Side Readability: baseline PBR sphere is shown next to a clearcoat + anisotropy sphere to make differences obvious.
- Anisotropy Behavior: directional highlight stretching is controlled via `anisotropy` and `anisotropyRotation`.
- Clearcoat Layering: `clearcoat` and `clearcoatRoughness` add a second glossy lobe over the base material.
- Live Environment Probe: dynamic cube camera capture drives `scene.environment` for time-varying reflections.
- Practical Use: useful for car paint, coated metals, brushed finishes, and manufactured product renders.

Continue Learning

JavaScript Implementation

ES6+
import * as THREE from 'three'

const material = new THREE.MeshPhysicalMaterial({
  color: 0xf2f6ff,
  metalness: 0.7,
  roughness: 0.35,
  anisotropy: 0.8,
  anisotropyRotation: 0.25,
  clearcoat: 0.9,
  clearcoatRoughness: 0.1
})

const mesh = new THREE.Mesh(
  new THREE.SphereGeometry(1, 64, 64),
  material
)
scene.environment = envMap
scene.add(mesh)

Related demos

Trending this week

Most popular