Graphics Reference
In-Depth Information
as RGB values. When you apply a normal map to a specific face, Three.js uses
the information from this normal map and the normal of the face to add depth to
that face without adding additional vertices. For more information on how normal
maps are used, refer to the site at http://www.opengl-tutorial.org/intermediate-tutori-
als/tutorial-13-normal-mapping/ .
There's more…
You can fine-tune the height and direction in which the information from the normal
map is applied to the face of geometry. For this, you can use the normalScale
property like this:
normalCube.material.normalScale.x = 1;
normalCube.material.normalScale.y = 1;
To see this effect in action, look at the example for this recipe, 04.02-add-depth-
to-mesh-with-normal-map.html , where you can use the menu in the top-right
section to change this value.
See also
• An alternative for normal maps is bump maps. In the Add depth to a mesh
with a bump map recipe, we show you how to use such a map instead of a
normal map
Search WWH ::




Custom Search