Metalness and roughness maps
When discussing the materials available in Three.js, we mentioned that a good default material to use is THREE.MeshStandardMaterial. You can use this to create shiny, metal-like materials, but also to apply a roughness, to make it look more like wood or plastic. By using the metalness and roughness properties of the material, we can configure the material to represent the material that we want. Aside from these two properties, you can also configure these properties by using a texture. So, if we have a rough object and we want to specify that a certain part of that object is shiny, we can set the metalnessMap property of the THREE.MeshStandardMaterial and, if we want to indicate that some parts of the mesh should ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access