How to texture a cylinder map in OpenGL?

I know how to make ATVs, and it was pretty intuitive with the coordinates of the u, v texture, but it's hard for me to figure it out. Any help is appreciated.

+3
source share
1 answer

Try to think about the parametric representation of the cylinder.

cylinder(u, v):
    x = r * cos(u * 2*pi)
    y = r * sin(u * 2*pi)
    z = v

u and v are exactly the values ​​that you used as texture coordinates.

+3
source

Source: https://habr.com/ru/post/1781116/


All Articles