three.jsaframetexturing

How to apply multiple textures on one model in aframe


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 ?


Solution

  • 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.