Hello. I’m trying to display a weapon model. It has 8 different parts that each need their own base color, heightmap, metallic, normal map and roughness map. So in total 40 different textures. How could I optimally load in all of these textures for each of their respective parts?
Here is an example of what I currently have with just applying a normal map to one of the parts of the gun.
textureLoader.load("./Eclipse_Low_Body1_Normal.jpg", function (texture) {
console.log("traversing")
mesh.traverse(function (child){
console.log("child", child)
if (child instanceof THREE.Mesh && child.name == "Body1_low") {
child.material.normalMap = texture
child.material.baseColor =
child.material.needsUpdate = true
}
})
})
As you can see with my current approach it would take 40 separate textureLoader.load() calls.