In both images I used the same textures, propaties and material (MeshStandardMaterial) for the meshes. But in the one with more contrast I loaded the geometry with obj Loader, so it’s a BufferGeometry, and in the other one I created the box with BoxGeometry. I don’t understand why, if it uses the same material, it looks so different. I hope someone can help me.
Could be any number of differences between a default three.js box and one in an OBJ file… UV coordinates, vertex colors, or vertex normals would be the most likely guesses. Is there a demo you can share?
Thanks for the quick reply, I don’t think it could be something with vertex colors, but here are my demos. The code is a bit messy, but the loading is done in libs/Level.js under LevelObject async load(). The version with the high contrast and OBJ loader is at https://maikeio.ddns.net and the version with BoxGeometry is at https://maikeio.ddns.net/withCubeMesh. I don’t know if there is a better and faster way to share the demo than uploading it to my web server.
If I make a BoxGeometry in the three.js editor and attach both the normal map and map to it, and reduce normal scale to 0.5 as you’re doing, it looks much more like your OBJ example… I’m not quite sure what to make of that, though.
Here, in that scene in the three.js editor, I do the same as in my game, and get the same result.
(one with more Contrast than the other, but both the same material)
If it helps any here is the GitHub Repo of the Project https://github.com/Maikeio/SnakeMaze and the scene I created with the three.js editor
scene (1).json (73.4 KB)
I have solved it. At least somehow, when I reduce the y-normal scale of the loaded object to 0, it looks the same as the object created with BoxGeometry with x and y set to 0.5. I don’t know why this is, but here’s the solution to making two objects look the same, one loaded and one not.