Hello,
I’ve been looking into ways of adjusting the UVs of a mesh based on it’s scaling, to avoid the texture looking all stretchy.
Basically something like this:
I’ve found a good solution to this problem by @PavelBoytchev : https://codepen.io/boytchev/pen/rNZxLLK?editors=0010
But sadly, this does not work reliably for every case:
https://codepen.io/vendduke/pen/jOjNgEb
Notice how for (non-box-shaped) meshes with a smaller y scaling, the UVs of angled faces do not match with the UVs of the rest of the mesh.
Is there a solution for correctly calculating the UVs of a mesh, no matter the scaling?
Any help is appreciated, thanks!
Also tagging @PavelBoytchev since he shared the code in the first place.