Verzerrungsfreie spherische Projektion eines Gitters

Spherical mapping a grid without distortion

Der einfachste Weg eine Textur auf eine Kugeloberfläche abzubilden ist die spherische Projektion. Ausgehend von einer Textur mit den Proportionnen 2:1 stellt U (repräsentiert die horizontale Richtung der Textur) den Längengrad und V (vertikale Richtung der Textur) den Breitengrad dar. In anderen Worten U geht von 0 bis 1 um den Äquator und V geht von 0 bis 1 von Pol zu Pol.

The easiest way to project a texture map onto a sphere is spherical mapping. The source is a rectangular texture with a proportion of 2:1. U (the horizontal direction of the Texture) is defined to be the longitude and V (the vertical direction) to be the latitude on the sphere. In other words U goes from 0 to 1 around the equator and V goes from 0 to 1 from pole to pole.

Eightball Texture

Bei dieser Art von Projektion kommt es an den Polen zu Verzerrungen. Sehen wir uns an wie sich das bei dieser Textur auswirkt. Die Linien werden zu den Polen hin immer dünner. Der Grund für diese Verzerrungen liegt darin, daß die Textur keine Information über die Linienbreite enthält, sondern über Winkel. Da die Durchmesser der Breitenkreise zu den Polen immer mehr abnehmen, wird bei gleichen Winkel auch die Länge des zugehörenden Kreisbogens immer kleiner. Eine andere Interpretation ist, daß sich lauter unendlich dünne Linie in den Polen überschneiden.

Using this kind of projection, distortion ('pinching') occurs at the poles. If we look at the result of applying this texture to a sphere, we see the lines getting more and more thin near the poles. The reason for this disortion is that no information about linewidth is stored in the texture; rather, only angular information is stored. Since circles of latitude diameter are decreasing as we come closer to the poles, the same angles result in decreasing lengths of the circular arcs. Another interpretation is that infinitely thin lines cross at the poles.

Eightball Texture

In manchen Fällen ist es aber möglich diese Verzerrungen auszugleichen. Dazu berechnet man für den Breitengrad welcher Winkel notwendig ist um einen Kreisbogen gleicher Länge wie auf den Äquator zu erzeugen. Die folgende Textur ist mit dem "Antispherical" Zusatzmodul für Gimp berechnet.

In some cases it is possible to compensate for this distortion. For this purpose we are calculating what angle is needed on a circle of latitude to give a circular arc with the same length as on the equator. The following texture is calculated with the "Antispherical" plugin for Gimp.

Eightball Texture

Und hier das Resultat. Keine sichtbare Verzerrung an den Polen.

The final result, without any observable distortion near the poles.

Eightball Texture

Verweise

References

Virtual Terrain Project
Spherical Textures

Ray Tracing: Graphics for the Masses by Paul Rademacher
Texture Mapping Spheres

Spherical Projections (Stereographic and Cylindrical) by Paul Bourke
Direct Polar

"Antispherical" Zusatzmodul für Gimp

"Antispherical" plugin for Gimp

Installation

tar xvfj antispherical.tar.bz2
cd antispherical/src
make
cp antispherical ~/.gimp-2.2/plug-ins/.

Anwendung

Usage

Um den "Antispherical" Zusatzmodul anwenden zu können muß die Textur in zwei Ebenen aufgeteilt werden. Die Hintergrundebene enthält die Teile der Textur die unverändert bleiben. Die Teile (vertikale Linien, etc.) die korrigiert werden sollen kommen in eine transparente Ebene. Diese Objekte dürfen sich nicht überschneiden, müssen also durch transparente Bereiche getrennt sein. Ist eine horizontale Linie ganz gefüllt, enthält also keine transparenten Bereiche, wird sie ignoriert.

To apply the "Antispherical" plugin the texture has to be split into two layers. The background layer contains the parts of the texture which will stay unmodified. Parts of the texture which should be corrected (vertical lines, etc.) are placed in a transparent layer. These objects may not overlap; they have to be separated by transparent areas. Completely filled horizontal lines (without transparent areas) are ignored.

Eightball Texture
Hintergrund
Background layer

Eightball Texture
Transparente Ebene (gelb=transparent)
Transparent layer (yellow=transparent)

Author

Christian Bucher