April 2018
Beginner
552 pages
13h 58m
English
The texture that is applied to the surface of the model is contained within the .mtl file of the model. This file defines the textures and how they are applied as set by the modeling software. Complex models may contain multiple textures for various parts of the object.
If no material is defined, the first texture in the shader is used (in our example, this is the bumptex texture). To add a new texture to the object, add (or edit) the following line in the .mtl file (that is, to use water.jpg):
map_Kd ../textures/water.jpg
More information about .mtl files and .obj files can be found at the following Wikipedia link: https://en.wikipedia.org/wiki/Wavefront_.obj_file.