Print at Dec 17, 2025, 7:13:40 PM

Posted by Puybaret at Oct 5, 2008, 4:06:00 PM
Re: Question about .mtl files
I think you must define texture coordinates on your object, often called UV coordinates.
But note I discovered that there was a bug in the OBJ file loader of Java 3D. If an object of a 3D model use texture coordinates, then all the other objects must have also texture coordinates (even if these other objects don't use any texture), otherwise the texture won't be displayed correctly.
For example, in the photo frame http://sweethome3d.sourceforge.net/models/AntelopeCanyonFrame.zip I designed with Blender, the picture is a texture applied to a rectangle with UV coordinates, but the grey and the black part of the frame defines also texture UV coordinates, otherwise it wouldn't work.



----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator