Layered textures in three.js

708 views Asked by At

I'm loading a fbx model with multiple objects inside made with Cinema4D. When the model is loaded I get this warning console message.

THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer.

I understand that this message is about the normal layers, bump maps or other, but in the fbx file are loaded with it's own url. Anyone know if there is any way to load this properly? Or export it differently from C4D?

Thanks

2

There are 2 answers

0
M - On

By default, Three.js only draws one texture type per mesh. For instance, you can only assign one texture to material.map, you can't layer them one on top of the other. It sounds like your Cinema4D objects have two or more textures layered one on top of the other.

In order to layer multiple textures one on top of the other, you'll need to create one mesh per texture. Maybe give them a very slight offset in position to layer them in the correct order. Alternatively, you could flatten your layered textures into a single image.

0
Paul On

how about using several meshes with slightly different scale-ings and different textures ? Like matroschka puppets. So if the textures are transparent you can see the underlying ones, too.