Link to GIF: https://i.imgur.com/pHxsyju.gif
I’m trying to dynamically create a sphere but the UVs are messed up and make the circles I draw stretch. Is there any way I could make this happen through code?
Link to GIF: https://i.imgur.com/pHxsyju.gif
I’m trying to dynamically create a sphere but the UVs are messed up and make the circles I draw stretch. Is there any way I could make this happen through code?
What do you consider “proper UVs”? The mere fact that it is absolutely impossible to map a spherical surface without distortion onto a flat surface makes this request already quite vague ^^. There is a huge variety of map projections out there and none could be considered “proper”.
Most textures designed for spheres use an equirectangular projection. Your sphere looks like you used an orthographic projection. It’s still not clear what you’re after since, as I said, it’s difficult to minimize distortion on a sphere. A common solution when you want minimal distortion across the whole sphere is to use a “cube sphere”. As I said, this also has distortion, since this can not be avoided, however the distortion is relatively small. Games like Spore used cube-spheres for their planets. Here’s the paper they published on that topic.
Sebastian Lague has a series on YT on that topic as well.