Icosahedron OpenGL Texture Mapping

Currently, I have no solution for displaying the icosahedron texture seamlessly from pole to pole. The structural mapping of this primitive is apparently a common problem that has not yet been completely resolved. I did a lot of research and I tried many different approaches for generating uv coordinates, the closest (and smallest) approach is this:

GLfloat u = 0.5f * ( 1.0f + atan2( z , x ) * ( 1 / M_PI ));  
GLfloat v = acos( y ) * ( 1 / M_PI );

The icosahedron or geosphere is part of various open source infrastructures such as jMonkeyEngine or Geist3D, but none of the implementations work correctly. Is it possible to display the expanded rectangular texture, or am I mistaken? Each piece of code is welcome.

I downloaded the Xcode here project , which is built with openFrameworks 0.61 for the iPhone. Inside there are also two PNG files, each of which shows a different seam change.

+3
source share
2 answers

. . . , 2D- .

, cubemap .

+3

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


All Articles