skip to Main Content

a have a model in maya/blender, which has multiple UV’s.

I thought that the .mtl has all the info about materials/textures ( as i can see the links in the .mtl ), but apperently i have to link every texture to an object @ src=”texture.jpg”.

Is there any other way than combining those textures in photoshop/gimp, or breaking my model into separate .obj’s having their own texture ?

Should i look more into the custom shading options in aframe/three.js @ registerShader ?

2

Answers


  1. The OBJ/MTL format does not support multiple UV sets. It may not support multiple materials on the same geometry either, I’m not sure. FBX and Collada do support multiple UVs, so you could try one of those.

    But, searching for “threejs multiple UVs” shows that it is not easy to do multiple UVs without custom shaders, even once you have a newer model format. I would maybe try to bake your multiple UVs down into a single set in the modeling software, if that’s possible.

    Login or Signup to reply.
  2. MTL files can associate different texture maps with different material groups in the OBJ file, but the OBJ file can only describe a single set of UVs per poly face. Whether or not your OBJ writer or THREE’s OBJ reader supports it is a different matter.

    On a side note: the actual Wavefront OBJ spec is interesting in that it supported all kinds of things no one implemented after 1999 or so, including NURBS patches with trim curves, and 1D texture maps (essentially LUTs)

    https://en.wikipedia.org/wiki/Wavefront_.obj_file

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search