Browse Source

fix PBR material order

Gregg Tavares 5 years ago
parent
commit
5e204c261f

+ 1 - 1
threejs/lessons/resources/threejs-materials.js

@@ -76,7 +76,7 @@ import {threejsLessonUtils} from './threejs-lesson-utils.js';
         const material = new MatCtor({
           color,
           roughness: r / (numRough - 1),
-          metalness: m / (numMetal - 1),
+          metalness: 1 - m / (numMetal - 1),
         });
         const mesh = new THREE.Mesh(highPolySphereGeometry, material);
         row.push(mesh);

+ 2 - 3
threejs/lessons/threejs-materials.md

@@ -169,9 +169,8 @@ have hard reflections whereas something that's not rough, like a billiard ball,
 is very shiny. Roughness goes from 0 to 1.
 
 The other setting, [`metalness`](MeshStandardMaterial.metalness), says
-how metal the material is. Metals behave differently than non-metals. For
-some reason this setting is un-intuitive and goes from 1, not metal at all,
-to 0, most metal like.
+how metal the material is. Metals behave differently than non-metals. 0
+for non-metal and 1 for metal.
 
 Here's a quick sample of `MeshStandardMaterial` with `roughness` from 0 to 1
 across and `metalness` from 0 to 1 down.