I currently have a 3D model of the moon. You are able to pick a point on the moon and it takes longitude and latitude coordinates of that point and generates a mesh based on the heightmap. So if you select the inside of a crater, it will create a mesh of that crater and put you in it.

My issue, and focus of the question is that the visual of the north/south poles look correct on the globe, but the data being taken from the heightmap is that of the pre-wrapped image in which the poles are distorted (Shown below).

Heightmap of lunar surface

The look of the north pole on the sphere.

Sphere with wrap

If I chose any of those craters on the surface to generate, I end up with a mesh with stretched out craters, similar to the heightmap. I understand either a calculation must be done, or I need to alter the heightmap in some way I just don't know how.

see below the distorted craters.

Mesh distortion

  • 1
    \$\begingroup\$ Can you show us the code you're using to generate this result? It's often faster to fix broken code than make new working code from scratch. And even if we do need a full rewrite, seeing your existing code can help answers match your current API / method and variable names. \$\endgroup\$
    – DMGregory
    Sep 28 at 17:25
  • \$\begingroup\$ This is why I prefer to cube map to texture spheres, that lets you avoid the poles being weird \$\endgroup\$ Sep 29 at 9:01


You must log in to answer this question.

Browse other questions tagged .