Using Blender to create custom UV mapping

If you want to apply a texture (a 2D image) to a geometry, you need to tell Three.js which part of the texture should be used for a specific THREE.face object. The definition of how a texture maps to the individual faces of a geometry is called a UV mapping. A UV mapping, for example, tells Three.js how to map a 2D map of the earth to a 3D sphere geometry. When you're working with simple shapes, or the basic geometries provided with Three.js, the standard UV mapping that's provided is often enough. However, when shapes become more complex or you have some specific texture mapping requirements, you need to change how each face of a geometry is mapped to part of a texture. One option is to do this by hand, ...

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.