Adding depth to a mesh with a bump map
For detailed models, you require geometries with a large number of vertices and faces. If a geometry contains a very large number of vertices, loading the geometry and rendering it will take more time than it would take for a simple model. If you've got a scene with a large number of models, it is a good idea to try and minimize the number of vertices for better performance. There are a number of different techniques that you can use for this. In this recipe, we'll show you how you can use a bump map texture to add the illusion of depth to your model.
Getting ready
To get ready for this recipe, we need to get the textures that we want to use on our geometries. For this recipe, we require two textures: a color ...
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.