In Chapter 4, Working with Three.js Materials, we introduced you to the various materials that are available in Three.js. However, we didn't discuss applying textures to meshes. In this chapter, we'll look at that subject. Specifically, we'll discuss the following topics:
- Loading textures in Three.js and applying them to a mesh
- Using bump, normal, and displacement maps to apply depth and detail to a mesh
- Creating fake shadows using a lightmap and an ambient occlusion map
- Using specular, metalness, and roughness maps to set the shininess of specific parts of a mesh
- Applying an alpha map for partial transparency of an object
- Adding detailed reflections to a material using an environment map
- Fine-tuning and customizing the UV mapping of a mesh
- Using the HTML5 canvas and video element as input for a texture
Let...