Skip to Content
Raspberry Pi 3 Cookbook for Python Programmers - Third Edition
book

Raspberry Pi 3 Cookbook for Python Programmers - Third Edition

by Steven Lawrence Fernandes, Tim Cox
April 2018
Beginner content levelBeginner
552 pages
13h 58m
English
Packt Publishing
Content preview from Raspberry Pi 3 Cookbook for Python Programmers - Third Edition

Changing the object's textures and .mtl files

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. 

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Raspberry Pi for Python Programmers Cookbook - Second Edition

Raspberry Pi for Python Programmers Cookbook - Second Edition

Tim Cox

Publisher Resources

ISBN: 9781788629874Supplemental Content