Metalness and Roughness Maps
Explore how to enhance the realism of 3D materials in Three.js by using metalness and roughness maps. Learn to control material properties for shiny or rough surfaces by applying textures that affect how light interacts with each part of a mesh, improving the visual complexity of your scenes.
We'll cover the following...
Create more realistic materials
When discussing the materials available in Three.js, we mentioned that a good default material to use is THREE.MeshStandardMaterial. We can use this to create shiny, metal-like materials but also to apply roughness to make the mesh look more like wood or plastic. By using the metalness and roughness properties, we can configure the material to represent what we want.
Aside from these two properties, we 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 ...