Chris wrote:I still maintain that cube maps could be useful in Celestia . . .
Using cyber_space_doc's most recent code above, I did some further investigations of hires quality of cubemaps.
First I used a hires 8k x 4k lossless TIFF image of the BlueMarble Earth
http://earthobservatory.nasa.gov/Newsro ... _2002.html
and converted it into PPM.
Next I wrote a small script to convert earth8k.png into the 6 required 2k x 2k cubemap patches with correct orientations as required by the code. The 6 cubemap reprojections were performed with mmps(project) by Matthew Arcus
http://www.users.globalnet.co.uk/~arcus/mmps/mmps.html
as usual. The format conversions and rotations were done with ImageMagick's convert/mogrify utilities.
Code: Select all
#! /bin/sh
convert ../../earth8k.png ../../earth8k.ppm
project gnomonic -scale 2 -lat 0 -long 90 -w 2048 -h 2048 -grid -gridcolor 255:0:0 -f ../../earth8k.ppm > real_earth03.ppm
project gnomonic -scale 2 -lat 0 -long 270 -w 2048 -h 2048 -grid -gridcolor 255:0:0 -f ../../earth8k.ppm >real_earth02.ppm
project gnomonic -scale 2 -lat 90 -long 0 -w 2048 -h 2048 -grid -gridcolor 255:0:0 -f ../../earth8k.ppm >real_earth04.ppm
project gnomonic -scale 2 -lat -90 -long 0 -w 2048 -h 2048 -grid -gridcolor 255:0:0 -f ../../earth8k.ppm >real_earth05.ppm
project gnomonic -scale 2 -lat 0 -long 0 -w 2048 -h 2048 -grid -gridcolor 255:0:0 -f ../../earth8k.ppm >real_earth00.ppm
project gnomonic -scale 2 -lat 0 -long 180 -w 2048 -h 2048 -grid -gridcolor 255:0:0 -f ../../earth8k.ppm >real_earth01.ppm
mogrify -rotate 180 -format bmp real_earth00.ppm
mogrify -format bmp real_earth01.ppm
mogrify -rotate 90 -format bmp real_earth02.ppm
mogrify -rotate -90 -format bmp real_earth03.ppm
mogrify -format bmp real_earth04.ppm
mogrify -rotate 180 -format bmp real_earth05.ppm
Now, let's do a careful comparison:
Seen from a distance the resulting cubemap rendering from cyber_space_doc's code looks quite nice:
Note the purple square! It indicates one of the critical regions that I was pointing out all along. The point, where 3 cubemap faces are meeting!
Let's zoom into the purple square:
In the following, magnified image of cyber_space_doc's cubemap rendering of my 8k hires texture you can see the three lines with a discontinuouls rendering where three cubemap faces are meeting! It's where the red grid-line ends, towards the center of the image. What is most disturbing is that the surface patterns change direction abruptly across the discontinuity lines!
++++++++++++++++++++
No doubt, this is NOT nice and illustrates the kind of cubemap discontinuities I expected to appear all along. Definitely a serious loss of image quality/detail along extended regions of the texture rendering!
++++++++++++++++++++
For comparison, here is the analogous rendering of the original 8k simple cylindrical texture via Celestia in the same region. Everything perfect, of course.
In summary: I conclude that at the hires level, the price for getting rid of the two polar pinches with cubemaps is HIGH.
Bye Fridger