Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8092112

Non-standard Sphere texture mapping

XMLWordPrintable

      A common and mostly used texture mapping for spheres in 3D computing is the direct polar projection, also known as spherical or equirectangular projection.

      For instance, the 4 texture files of the 3D Sphere Ensemble application are built for this projection.

      However, the current texture mapping of a JavaFX sphere does not correspond to the direct polar projection. This leads to distorted continents in the 3D Sphere Ensemble application, the poles occupy too much space. Other textures should be used here.

      The current texture mapping of a JavaFX sphere should be documented in the API.

      Alternatively, the standard texture mapping could be used in JavaFX as well, by changing line 323 in Sphere.java from:
                      tPoints[tPos + 1] = ty; // which is 0.5f + (float) Math.sin(va) * 0.5f;
      to linear:
                      tPoints[tPos + 1] = 0.5f + va / (float) Math.PI;



            Unassigned Unassigned
            jehrkejfx Jens Ehrke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Imported: