Page 1 of 2
Texture pinching
Posted: 11.01.2004, 18:13
by ajtribick
Some of the supplied textures have "pinching" at the poles.
Examples are Earth cloudmap, Pluto, Charon. These textures are missing data at the poles.
I take it Celestia uses a spherical projection to map the textures onto the surface, so if the textures are created with say a cylindrical projection, it will cause pinching.
Oh yes, and there's a vertical yellow line in the Jupiter texture.
Posted: 11.01.2004, 19:01
by selden
Chaos,
You need to be somewhat more precise in your terminology.
Celestia uses the "simple cylindrical" map projection, also known as "equidistant cylindrical" and "Plate Car?e". When you use the term "cylindrical," you have to provide an appropriate modifier: there are several different types of cylindrical map projections.
At any rate, the pinching could be caused by using simple cylindrical maps that didn't include the areas nearest the poles (e.g. only went to +/- 85 degrees) or because the wrong conversion was used when converting maps into simple cylindrical, so that the polar regions weren't projected properly.
Posted: 11.01.2004, 19:44
by Rassilon
pole pinch can be done away with by using adobe photoshop or the gimp....polar coordinates filter
Posted: 11.01.2004, 20:06
by selden
Ras',
A quibble: adding horizontal distortions may be inappropriate if the map image actually is missing the polar regions. It may be more accurate to add several rows of pixels to the image at the top and bottom. Although this would create blank polar regions, the existing features would be drawn at the correct latitudes when the revised map is projected onto a sphere.
Posted: 11.01.2004, 23:17
by granthutchison
Buie's occultation albedo maps for Pluto and Charon (which Fridger used to prepare the Celestia maps) aren't missing data at the poles, so that can't be the explanation.
I confess I've always assumed that the pinch at the poles was an artefact produced by Celestia's texture handling - it seems to be present in most textures if you look closely enough (unless this is specific to my graphics card). Compare, for instance, the north polar cap of Mars as it appears on the Celestia texture and when Mars is displayed in Celestia - on my machine, I see the polar ice very visibly sucked towards the pole into a triangular wedge, very different from how it should appear. My old coarse grid textures had a line of contrasting pixels at their northern and southern edges, intended to appear as circular dots at the poles, but they never showed up as more than a smear of colour.
The yellow line on Jupiter is unpleasant - we should replace that.
Grant
Posted: 12.01.2004, 01:52
by Rassilon
Pole pinch is an artifact of texture mapping a sphere...The only way to have a clean polar cap is by doing what I stated above...or some third party plugin...
If you have an image of the polar region of said planet it is as simple as blending the two textures together...When you set polar regions in Photoshop you can skew the polar image you have to overlay to a rough 'oval' shape due to the distortion of the overall texture...If the texture was a perfect square you would only need apply the polar cap texture to the target planet texture while polar distortion is enabled...
1st step - rectangular to polar
2nd step apply polar texture (maybe distort a bit)
3rd step - polar to rectangular
4th step rotate 180°
5th step repeat 1 - 3
There are certain instances where there will still be a small pinch at the top but overall is not really noticable unless you get real close...Most of my worlkds so far Ive made I dont really notice any pinching...but on occasion Ive seen some small residue of this...All in all its the best way as of yet...unless chris changes the spheres for planets to a geosphere format...which I believe is alot larger to render...
Posted: 12.01.2004, 02:06
by Rassilon
this is a sample of a geosphere polar region rendered in 3d studio max with one of my planet textures...
it reduces it to null in my book...
Posted: 12.01.2004, 13:39
by ajtribick
Are you sure it is equidistant cylindrical projection being used?
I've been examining the textures in POV-ray and mapping the textures on to spheres using spherical projection (map_type 1) and equidistant cylindrical projection (map_type 2)
This is the comparison:
Top = Celestia (colours enhanced)
Middle = POV-ray, equidistant cylindrical projection
Bottom = POV-ray, spherical projection
Looks like the Mars texture is a spherical projection. Similarly for Mercury, Io...
The Charon and Pluto textures seem to be in some completely different type of mapping, or are missing data, similarly Enceladus.
That's all the textures I've tested, but I haven't found any which seem to be in cylindrical equidistant projection.
Posted: 12.01.2004, 15:25
by granthutchison
Chaos:
The problem here is that what POVray and other similar packages call a spherical texture mapping is what cartographers call a simple cylindrical projection. You and Selden are just having a nomenclature mismatch for the same thing.
Your demonstration with POVray proves my point, though - the texture pinch is a product of Celestia, not (necessarily) the textures themselves.
The Enceladus map
is a simple cylindrical projection - find the original
here, named as such by the cartographer who created it. The fact that the surface features line up with the labels in the IAU locations file for that body confirms that the map projection is correct. Similarly, Buie's Pluto and Charon maps are simple cylindrical projections.
In both cases I think the polar difficulties are because of low-res, low-angle photometric/photographic data failing to resolve perfectly at the pole - compounded in the case of Enceladus by an imaginary fill for the south pole.
Grant
Posted: 12.01.2004, 16:05
by selden
My current suspicion is that there may be a bug in how Celestia maps textures onto spheres. Whether it's in Celestia, OpenGL or the display hardware, I dunno.
I don't have access to the images right now (they're at home and I'm not), but one of the projections of an all-sky map that I'm working on looked quite bad at the poles. As I recall, its appearance could be explained by the mapping simply drawing triangular regions from the top and bottom of the texture instead of scaling the full length of the scanline.
One complication is that the visual representation is affected by the structure of the model that the image is being projected onto. The positions of the edges and the sizes of the facets can make a significant difference. I dunno if Celestia is trying to use some kind of idealized sphere (as POVRay does) or a model that approximates it.
Posted: 12.01.2004, 16:36
by granthutchison
Chaos:
Rereading your post, I'm puzzled by:
chaos syndrome wrote:Middle = POV-ray, equidistant cylindrical projection
I haven't used POVray for a year or two now, but my recollection was that the terminology at that time was an unmodified "cylindrical", not "equidistant cylindrical". If they've changed the name in the meantime it's an odd and misleading innovation, since the POVray cylindrical mapping is equidistant when mapped on to an appropriately orientated cylinder or prism, but far from equidistant when it's being mapped onto anything else.
Grant
Posted: 12.01.2004, 17:55
by Rassilon
Selden said:
My current suspicion is that there may be a bug in how Celestia maps textures onto spheres. Whether it's in Celestia, OpenGL or the display hardware, I dunno.
Considering that the same thing happens in any program that tries to map a texture to a sphere I hardly think its a problem with celestia, openGL or the display drivers... but a problem with the texture itself...considering that the triangles near the poles are different than near the equator it is prudent to say that the texture may be manipulated in such a way to fix this problem...Even on a geosphere a plain 1024 x 512 or larger texture with no pole editing will pinch at the poles and look awful...Most of the maps Ive come across on the net do not use the method I described above but some other method of scaling...I think the mars image is a good example of this...
The moon texture however is one that was developed using the method I stated above and I notice no pinch at the poles using this texture...
Im not sure the terms but simple cylindrical projection is one I think uses scaling the other may use the method I describe...
Posted: 12.01.2004, 18:27
by granthutchison
Rassilon wrote:Considering that the same thing happens in any program that tries to map a texture to a sphere I hardly think its a problem with celestia, openGL or the display drivers...
Rass', it doesn't happen in POVray, as chaos syndrome has just nicely shown above. And I haven't seen it in VRMLs I've built in the past. There's no logical necessity for it to happen, if the pixels are laid down correctly (linearly) in the vicinity of the poles - unfortunately, this isn't happening in Celestia, which is what I think Selden is commenting on. I agree with him.
Which moon texture are you talking about, BTW? I see a horrible pinch at both poles of the current Celestia distribution texture.
Grant
Posted: 12.01.2004, 19:36
by Rassilon
The moon texture may be one that wasnt included with the original distribution...I think its Jens actually...
Most engines Ive used do the same pinching effect I see in celestia Including 3d Studio Max...The above example I shot was of course with a texture I corrected using my method and a geosphere...
Are the two textures above used in POV different textures or are they the same texture applied with a different mapping modifier?
Posted: 12.01.2004, 20:12
by Rassilon
I think I need to clarify what exactly the textures are being referenced here and what thier correct labels are...
A. Cylindrical Projection? With the poles sort of scaled smaller?
B. Spherical Map?
B is the types of textures I create...I am guessing this is a spherical map and they are the ones that work best in celestia...
Posted: 12.01.2004, 21:08
by selden
Ras',
Yes, your example B appears to be the type of projection we're discussing: a simple cylindrical map aka "spherical".
Your example B shows the pinching problem, too. It's just not so obvious because the colors are pastels. Here's how one of its poles looks on my system. Note all the thin triangles pointing toward the center of the screen (toward the pole). Apparently Celestia is using an OpenGL Sphere definition routine, specifying many "slices". This, as well as your comment about 3DSMax having similar symptoms, leads me to suspect that it's caused by a design problem within OpenGL.
(as usual, this links to a much larger image)
Added slightly later: here's a view of the wireframe using the Ctrl-W command.
(I'm slightly amused by the moire pattern. But sometimes I'm easily entertained.)
Posted: 12.01.2004, 21:28
by Rassilon
Yes it appears to be a pixelation of sorts...Of course the worst the compression of the texture the worst the pinch looks...That texture I supplied was compressed 60%...
And the CTRL W option sheds some light on the dilemma...The type of sphere Celestia uses is the same type that gives me problems in any other program Ive used it in...A Geosphere would be a better model to use in Celestia...Maybe Ill look at the rendering code for the sphere and see if I can convert it to a geosphere...
Posted: 12.01.2004, 21:36
by selden
Posted: 12.01.2004, 21:41
by Rassilon
Second thought...I think Ill leave that one alone...
Damn you guys now that I really look at the tops of some of my planets Im starting to see these triangles
Not all of them just a few...
Posted: 12.01.2004, 22:07
by ajtribick
Could someone please explain what a "geosphere" is, I seem to remember the term from OpenFX but I no longer have that program installed, and I've lost the installer...
I think there was the term "isosphere" as well, but I'm not sure...