Chapter 4. Materials and Textures

In this chapter, we'll cover the following recipes:

  • Adding depth to a mesh with a bump map
  • Adding depth to a mesh with a normal map
  • Using HTML canvas as a texture
  • Using HTML video as a texture
  • Creating a mesh with multiple materials
  • Using separate materials for faces
  • Setting up repeating textures
  • Making part of an object transparent
  • Using a cubemap to create reflective materials
  • Using a dynamic cubemap to create reflective materials
  • Using Blender to create custom UV mapping
  • Configuring blend modes
  • Using a shadow map for fixed shadows

Introduction

Three.js offers a large number of different materials and supports many different types of textures. These textures provide a great way to create interesting effects and graphics. In ...

Get Three.js Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.