Cannot understand if I'm doing right with textures

I’m not experienced in 3D and I’m making a little 3D visualizer for some products. It loads the obj file exported from the producer’s cad software and the user can visualize it switching different materials.

Textures are nothing particular, they should mimic the rough texture on the products surface but the result is not as I expected.

example:
The texture has a roughness map and a normal map generated by the map of a granular surface. I use this function on the material to make it wrap.

setMapsRepetitions (matMap){
matMap[‘wrapS’] = THREE.RepeatWrapping;
matMap[‘wrapT’] = THREE.RepeatWrapping;
}
that’s the result:


The texture looks stretched or clamped on some parts of the model, it’s not applied homogeneously.

Has it to do with the way the model was crafted (for example the surfaces were stretched when creating the model) or it is something I’m not doing right (stated that there are so many models that editing each one with blender is not feasible)?

matMap.repeat.set(5,5);
or change UV map in Blender / 3dsMax
or apply Box Mapping in three.js and matMap.repeat.set(5,5);

Box mapping was the keyword
I’ve found this

linking to this:

So my practical problem was solved, thank you.
I still have to better understand how it all works.

1 Like