PBR material

PBR 머티리얼

Describing a material with just two values — metalness and roughness — that map closely to how light physically reflects.

Also known as: Physically Based RenderingMeshStandardMaterialmetalness/roughness
···
js
import * as THREE from 'three';
import { RoomEnvironment } from 'three/addons/environments/RoomEnvironment.js';
const renderer = new THREE.WebGLRenderer({ antialias: true });
renderer.setPixelRatio(Math.min(devicePixelRatio, 2));
document.body.appendChild(renderer.domElement);
const scene = new THREE.Scene();
scene.background = new THREE.Color(0x14141f);
const pmrem = new THREE.PMREMGenerator(renderer);
scene.environment = pmrem.fromScene(new RoomEnvironment(), 0.04).texture;
const camera = new THREE.PerspectiveCamera(40, 1, 0.1, 100);
camera.position.set(0, 0.4, 8.5);
const ROWS = 3, COLS = 5;
const group = new THREE.Group();
for (let row = 0; row < ROWS; row++) {
  for (let col = 0; col < COLS; col++) {
    const metalness = row / (ROWS - 1);
    const roughness = col / (COLS - 1);
    const mat = new THREE.MeshStandardMaterial({ color: 0xc9702e, metalness, roughness });
    const mesh = new THREE.Mesh(new THREE.SphereGeometry(0.55, 48, 48), mat);
    mesh.position.set((col - (COLS - 1) / 2) * 1.35, (row - (ROWS - 1) / 2) * 1.35, 0);
    group.add(mesh);
  }
}
scene.add(group);
const light = new THREE.DirectionalLight(0xffffff, 1.2);
light.position.set(3, 4, 5);
scene.add(light);
function resize() { renderer.setSize(innerWidth, innerHeight); camera.aspect = innerWidth / innerHeight; camera.updateProjectionMatrix(); }
addEventListener('resize', resize); resize();
renderer.setAnimationLoop((t) => {
  group.rotation.y = Math.sin(t * 0.00015) * 0.35;
  renderer.render(scene, camera);
});

PBR (Physically Based Rendering) defines "what a material looks like" through parameters close to the physics of light reflecting off a surface, instead of painting a color by eye. THREE.MeshStandardMaterial boils down to two values: metalness (0 = ordinary material, 1 = metal) and roughness (0 = mirror-smooth, 1 = fully matte). Get that combination right and the surface reads convincingly under any lighting.

The demo lays the same-colored sphere out in a 5×3 grid, sweeping roughness across columns and metalness across rows. Top-left (rough, non-metal) reads like matte plastic; bottom-right (smooth, metal) reads like a mirror.

A metal (metalness = 1) renders flat black without something around it to reflect. So this demo, like the environment-map entry, sets up a quick lighting environment with RoomEnvironment + PMREMGenerator. When you need finer control — physically based glass, transmission — step up to MeshPhysicalMaterial, the extended superset of MeshStandardMaterial.

When to use

Product renders, near-photoreal 3D UI elements, and mimicking real materials like metal, plastic, or ceramic.