dkurtaev / planets_factory

Tool for modeling terrain of small planets.
1 stars 0 forks source link

Icosphere texturing #10

Closed dkurtaev closed 8 years ago

dkurtaev commented 8 years ago

Add support of icosphere texturing. Make optimal texture storing but keep dimensions as power of 2. Implement drawing on planet via textures.

dkurtaev commented 8 years ago

Tried unwrap icosphere by initial triangles of icosahedron. Chosen storing as illustrated here. Dimension of texture:

1.5*sqrt(3)*a x 5.5*a, where a - size of triangle's edge.

If, for example, width is 2^k:

height = 1.5*sqrt(3)/5.5 * 2^k ~ 0.47 * 2^k <= 2^(k-1)
dkurtaev commented 8 years ago

PR: #12