I’m currently rebuilding a project in React and leveraging react-three-fiber.
I’m not sure if I’m setting the wrapping correctly, could someone have a look at this here? Essentially I’m using useTexture and then altering the return Texture objects that it gives me. Works fine for repeat.set, but I don’t know
Have a look at the sole of this shoe, you will need to open the image at 100% to see the detail
Please ignore the lighting, I haven’t gotten there yet
Ignore the artifact on the heel of the react-three-fiber shoe
One possibility off the top of my head is that useGLTF may be loading the model differently to GLTFLoader? I doubt that though. Any ideas?
useGLTF is a thin wrapper around new GLTFLoader().load(url, set), it integrates it into suspense. the difference must have another explanation.
if you are re-using the same texture in several places than that could be something to look at bc useLoaders all cache. given the same url in two places it will serve the same object. you shift uv’s here, and you shift uv’s there, the last one wins. when you need to re-use an asset you should clone it.
Thanks for the direction, the first suggestion isn’t the case here oddly enough, I’ll figure it out though. The odd thing on the heel is definitely z-fighting, the shoe takes printed decals there and likely just needs to be shifted a bit