64K/128K Specular Map Blue Marble Next Generation VT PNG !

Tips for creating and manipulating planet textures for Celestia.
Topic author
Fightspit
Posts: 510
Joined: 15.05.2005
With us: 19 years 6 months

64K/128K Specular Map Blue Marble Next Generation VT PNG !

Post #1by Fightspit » 20.03.2006, 17:01

Hi all !

I made two addons which are Specular Texture for the 64K/128K BMNG Earth Surface Map.

You can download one of them here:

http://www.celestiamotherlode.net/catal ... don_id=948

N.B.: The 128K Specular Map don't need the 64K Specular Map because the 128K contain all levels (level0 to level5).

Original Texture (84K) from NASA (Blue Marble Next Generation).

If you have any problem with these addons or if you find bugs, please post on this topic.

Enjoy :!:

Here the difference of the basic and OpenGl 2.0 render:
You can notice the difference between the oceans and the rivers !

Image

Image

8) 8) 8)
Last edited by Fightspit on 23.03.2006, 12:21, edited 1 time in total.
Motherboard: Intel D975XBX2
Processor: Intel Core2 E6700 @ 3Ghz
Ram: Corsair 2 x 1GB DDR2 PC6400
Video Card: Nvidia GeForce 8800 GTX 768MB GDDR3 384 bits PCI-Express 16x
HDD: Western Digital Raptor 150GB 10000 rpm
OS: Windows Vista Business 32 bits

danielj
Posts: 1477
Joined: 15.08.2003
With us: 21 years 3 months

Re: 64K/128K Specular Map Blue Marble Next Generation VT PNG

Post #2by danielj » 21.03.2006, 12:58

What configuration do I need to run the BMNG 64K+Specular Texture 128K,at decent frame rates?I think BOTH of these are heavy to handle...
Besides this,how can I post in ImageShack?There are several submenus that I don??t understand.


Fightspit wrote:Hi all !

I made two addons which are Specular Texture for the 64K/128K BMNG Earth Surface Map.

You can download one of them here:

http://www.celestiamotherlode.net/catal ... don_id=948

N.B.: The 128K Specular Map don't need the 64K Specular Map because the 128K contain all levels (level0 to level5).

Original Texture from NASA (Blue Marble Next Generation).

If you have any problem with these addons or if you find bugs, please post on this topic.

Enjoy :!:

Here the difference of the basic and OpenGl 2.0 render:
You can notice the difference between the oceans and the rivers !

Image

Image

8) 8) 8)

Topic author
Fightspit
Posts: 510
Joined: 15.05.2005
With us: 19 years 6 months

Post #3by Fightspit » 21.03.2006, 19:23

Go to ImageShack first:
http://www.imageshack.us

Then, upload images under 1024 kb and copy the link to past in your post that all !

Image
Motherboard: Intel D975XBX2
Processor: Intel Core2 E6700 @ 3Ghz
Ram: Corsair 2 x 1GB DDR2 PC6400
Video Card: Nvidia GeForce 8800 GTX 768MB GDDR3 384 bits PCI-Express 16x
HDD: Western Digital Raptor 150GB 10000 rpm
OS: Windows Vista Business 32 bits

danielj
Posts: 1477
Joined: 15.08.2003
With us: 21 years 3 months

Post #4by danielj » 21.03.2006, 22:14

OK,I understand.I was going to imageshack.com.But what configuration do I need to run both BMNG 64K and specular texture 128K?

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #5by t00fri » 21.03.2006, 23:16

I have quickly optimized Fightspit's 128k spec map for polar latitudes and converted the whole stuff into DXT1, all with a very simple script.

In my view the spec map quality is "fair...good", meaning that on average it's fine, but there are a number of rivers that don't fit precisely to the spec map (notably the Amazon) . Also various rivers have excessively many disjunct pieces of reflectivity. But still the views are amazing together with my normal map and nightlight tiles (>=32k)!

With the dds format for the 128k tiles, I get VERY fast performance with my card, always >65 fps in fullscreen and VERY little delays between loading different levels. For fast computers, 2k tiles are just the best.

Here is my script that does the whole job of reducing tile resolution in polar latitudes and converting the resulting tiles to DXT1. Note however, it uses my ultrafast texconvert application for DXT conversion. You may substitute your own (slow?) converter easily. There is a help output as usual. The script should run also under Windows/CYGWIN. provided the zsh is installed. This time the zsh is really needed because of it's math module!

Bye Fridger

Code: Select all

-------------------------texoptdds---------------------------------
#! /usr/bin/zsh
if [ $# -lt 3 -o "$1" = "--help" ]; then
   echo
     echo 'Usage: texoptdds [--help | <level> <tile size> <tile format>]'
     echo
     echo
     echo The shell script \'texopt\' is a tool for Celestia \> 1.3.0
     echo that optimizes virtual texture tile resolution as function of latitude.
     echo
     echo The script requires the standard square tiles tx_i_j
    echo with size \<tile size\> \[px\] equal to a power of two, 
     echo in a specified format, \<tile format\> = png, tga, jpg,....
     echo
     echo Besides Linux/Unix, the script also runs in a current Cygwin \
       installation
     echo under Windows, \( http://www.cygwin.com \). The zsh is needed!
     echo
     echo The script assumes that a recent version \(\>= 6.1.8\) of the ImageMagick package
     echo \( http://www.ImageMagick.org \) is installed \
        \(either under Unix/Linux or Windows\).
     echo The utility \'convert\' of that package is used.
     echo
     echo Author: Dr. Fridger Schrempp, fridger.schrempp@desy.de
     echo Version: 1.00, 06/03/06
     echo 
else
   zmodload zsh/mathfunc
   level=$1
   tilesize=$2
   tileformat="$3"
   (( p2 = 2**level ))
   echo
   echo "Level = " $level
   echo "Tilesize = " $tilesize
   echo "Number of tiles =" $(( 2 * p2 * p2 ))
   echo "Image format of tiles:" $tileformat
   echo
    echo "Latitude " " Exact multiple  "  "2^n rounding"
    echo " [degs]  " "   of 128 pix    "
    echo "----------------------------------------"   

   mkdir opt
   cd opt

   j=0
   pi=3.1415927

   (( latband = pi/p2 ))
   while (( j  <=  p2/2 - 1 )); do
       i=0
       # calculate the latitude reduction in the /middle/ of the tile
       (( redsize =  cos(0.5 * pi - (j + 0.5) * latband) * tilesize/128.0 ))
       #
       # Returns the next power of 2 if redsize isn't 2^n
       # or returns redsize if redsize is 2^n
        #
        power2=1
       while (( power2 < redsize )); do
          (( power2 <<= 1 ))
       done
       #
       # if redsize exceeds the smaller power of two by less than 20%
       # the latter is used.
       #
       if [ "$(( (redsize - power2 / 2) / redsize ))" -lt 0.2 ]; then
          (( power2 = power2 / 2 ))
       fi
       
       echo "+-"$(( 180*( 0.5  - (j + 0.5) * latband/pi ) )) "    "$redsize "      " $power2
        
       (( redsize = 128 * power2 ))
       (( jm = p2 - 1 - j ))
       if [ "$redsize" -lt "$tilesize" ]; then
          while (( i  <= 2 * p2 - 1 )); do
             texconvert -x "$redsize" ../tx_"$i"_"$j".$tileformat   tx_"$i"_"$j".dds
              texconvert -x "$redsize" ../tx_"$i"_"$jm".$tileformat   tx_"$i"_"$jm".dds
              (( i++ ))
          done
       else
          while (( i <= 2 * p2 - 1 )); do
             texconvert ../tx_"$i"_"$j".$tileformat tx_"$i"_"$j".dds
             texconvert ../tx_"$i"_"$jm".$tileformat tx_"$i"_"$jm".dds
              (( i++ ))
          done
       fi
       (( j++ ))
    done
fi

danielj
Posts: 1477
Joined: 15.08.2003
With us: 21 years 3 months

Post #6by danielj » 22.03.2006, 15:02

OK,Fridger.But the fact is your card,altough slower than(a 5900 XT,I think),has 256 MB and my video card has only 128 MB.And I think you have 1.5 GB RAM or more,and I only have 1 GB.Could please post your specs again?
If you don??t remember,look to mine:
ATHLON 64 3000,1 GB RAM DDR 400 DUAL,VGA Geforce 6600 GT PCI-E 128 MB.


[quote="t00fri"]I have quickly optimized Fightspit's 128k spec map for polar latitudes and converted the whole stuff into DXT1, all with a very simple script.

In my view the spec map quality is "fair...good", meaning that on average it's fine, but there are a number of rivers that don't fit precisely to the spec map (notably the Amazon) . Also various rivers have excessively many disjunct pieces of reflectivity. But still the views are amazing together with my normal map and nightlight tiles (>=32k)!

With the dds format for the 128k tiles, I get VERY fast performance with my card, always >65 fps in fullscreen and VERY little delays between loading different levels. For fast computers, 2k tiles are just the best.

Here is my script that does the whole job of reducing tile resolution in polar latitudes and converting the resulting tiles to DXT1. Note however, it uses my ultrafast texconvert application for DXT conversion. You may substitute your own (slow?) converter easily. There is a help output as usual. The script should run also under Windows/CYGWIN. provided the zsh is installed. This time the zsh is really needed because of it's math module!

Bye Fridger

[

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #7by t00fri » 22.03.2006, 15:13

danielj wrote:OK,Fridger.But the fact is your card,altough slower than(a 5900 XT,I think),has 256 MB and my video card has only 128 MB.And I think you have 1.5 GB RAM or more,and I only have 1 GB.Could please post your specs again?
If you don??t remember,look to mine:
ATHLON 64 3000,1 GB RAM DDR 400 DUAL,VGA Geforce 6600 GT PCI-E 128 MB.


Intel 3.2 GHz/3.0GB Ram(CL2), card FX5900Ultra/256MB

Is the FX5900 Ultra slower than the FX5900 XT?? You simply should have bought a card with 256MB given your interest in large textures for Celestia. Also the smooth operation with tiles is largely a matter of using a /fast/ harddisk...

Bye Fridger

danielj
Posts: 1477
Joined: 15.08.2003
With us: 21 years 3 months

Post #8by danielj » 22.03.2006, 16:13

3 GB of RAM is much bigger than 1 GB.And the Geforce FX 5900 Ultra is much better than the Geforce 5900 XT,but is is inferior to the 6600 GT.I mistaken you for Don Edwards,who has or had a 5900 XT.
I think you said you had a 10000 rpm HD,and I have a 7200 rpm.
Anyway,do you think I have to give up textures larger than 32k?
What resolution do you get 65 fps?Is it with AA and AF?
Anyway,is unlikely that I can buy a 256 MB video card right now...

Topic author
Fightspit
Posts: 510
Joined: 15.05.2005
With us: 19 years 6 months

Post #9by Fightspit » 22.03.2006, 17:36

You can try the 64K (or 128K)Specular Map and if you notice the performance in Celestia will be slow, remove it and replace by the 32K, that's all . :wink:
Motherboard: Intel D975XBX2
Processor: Intel Core2 E6700 @ 3Ghz
Ram: Corsair 2 x 1GB DDR2 PC6400
Video Card: Nvidia GeForce 8800 GTX 768MB GDDR3 384 bits PCI-Express 16x
HDD: Western Digital Raptor 150GB 10000 rpm
OS: Windows Vista Business 32 bits

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #10by t00fri » 22.03.2006, 19:44

Fightspit wrote:You can try the 64K (or 128K)Specular Map and if you notice the performance in Celestia will be slow, remove it and replace by the 32K, that's all . :wink:


Fightspit,

I have examined now more carefully your 128k Earth-spec tiles that I have also optimized for polar latitudes and converted to DXT1 format. There is unfortunately a problem with the level5 Earth-spec tiles (128k):

While the optimized 128k Earth base texture now works beautifully together with my older 32k normal map tiles, my 32k nightlights tiles and the earth-spec tiles up to 64k, the level5 (2k x 2k) spec tiles corresponding to 128k produce a problem: As soon as I load the level5 (128k) tiles, they get displaced by a certain amount relative to the base tiles. The base texture continues to cooperate perfectly with my old normal map. This displacement does NOT occur for the levels <=4 of the spec-map that were also generated with my script.

Since my zsh script was also used for the base earth texture which works perfectly, the reason for the problem must be somewhere else. I made sure that for all levels the number of tiles is OK and the (dds) tiles look fine.

Any ideas?

I have also written an email to Chris about it, asking whether he might see some reason why the GL code might have broken at such large resolutions...

Bye Fridger

Topic author
Fightspit
Posts: 510
Joined: 15.05.2005
With us: 19 years 6 months

Post #11by Fightspit » 22.03.2006, 21:03

As you,
I find problem with the "tiles sequence" ,I am remaking the level5 and I will inform you that you can download again.
Bye!

Thanks to report this "little" bug :?
Motherboard: Intel D975XBX2
Processor: Intel Core2 E6700 @ 3Ghz
Ram: Corsair 2 x 1GB DDR2 PC6400
Video Card: Nvidia GeForce 8800 GTX 768MB GDDR3 384 bits PCI-Express 16x
HDD: Western Digital Raptor 150GB 10000 rpm
OS: Windows Vista Business 32 bits

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #12by t00fri » 23.03.2006, 09:19

Fightspit wrote:As you,
I find problem with the "tiles sequence" ,I am remaking the level5 and I will inform you that you can download again.
Bye!

Thanks to report this "little" bug :?


Fightspit,

is it correct that your 128k textures are NOT true 128k but blown up from the 86400x43200 raw textures?? So then your 128k would be largely "empty" magnification...
Reducing such data to the nearest power of two (64k) is a much more sensible procedure than blowing them up!

BMNG data have never been in a power of two size!
What scaling method did you use for blowing the data up to 128k?? I hope a good one, like cubic or spline or better?

++++++++++++++
The biggest really sensible power of two size for Celestia is 64k. It would be good to add the size of the original textures to your download info in ML.
++++++++++++++

Bye Fridger

danielj
Posts: 1477
Joined: 15.08.2003
With us: 21 years 3 months

Post #13by danielj » 23.03.2006, 12:15

Without AA or AF and in 800x600,the 64K specmap is fine.I think I will have more problem when we will have the 64K NormalMap and 64K NightTexture.But it??s running OK while the texture and specmap is 64K and the normalmap and nighttexture are 32K.

Fightspit wrote:You can try the 64K (or 128K)Specular Map and if you notice the performance in Celestia will be slow, remove it and replace by the 32K, that's all . :wink:

Topic author
Fightspit
Posts: 510
Joined: 15.05.2005
With us: 19 years 6 months

Post #14by Fightspit » 23.03.2006, 12:18

t00fri wrote:Fightspit,

is it correct that your 128k textures are NOT true 128k but blown up from the 86400x43200 raw textures?? So then your 128k would be largely "empty" magnification...
Reducing such data to the nearest power of two (64k) is a much more sensible procedure than blowing them up!

Bye Fridger

Yes, the texture come from here:
http://snowy.arsc.alaska.edu/nasa/landmask/

and the 128K is not true (as the 128K earth surface map).

t00fri wrote:BMNG data have never been in a power of two size!
What scaling method did you use for blowing the data up to 128k?? I hope a good one, like cubic or spline or better?

++++++++++++++
The biggest really sensible power of two size for Celestia is 64k. It would be good to add the size of the original textures to your download info in ML.
++++++++++++++


In fact, the original texture is in PNG, I use Photofiltre to cut and to resize the textures in 2048x2048 using the "optimise" scaling method, that is all.
edit: I also use XnView to cut the big textures and rename all tiles.
Motherboard: Intel D975XBX2
Processor: Intel Core2 E6700 @ 3Ghz
Ram: Corsair 2 x 1GB DDR2 PC6400
Video Card: Nvidia GeForce 8800 GTX 768MB GDDR3 384 bits PCI-Express 16x
HDD: Western Digital Raptor 150GB 10000 rpm
OS: Windows Vista Business 32 bits

Topic author
Fightspit
Posts: 510
Joined: 15.05.2005
With us: 19 years 6 months

Post #15by Fightspit » 23.03.2006, 12:29

Photofiltre is free and you can download here:

http://www.photofiltre.com/
Motherboard: Intel D975XBX2
Processor: Intel Core2 E6700 @ 3Ghz
Ram: Corsair 2 x 1GB DDR2 PC6400
Video Card: Nvidia GeForce 8800 GTX 768MB GDDR3 384 bits PCI-Express 16x
HDD: Western Digital Raptor 150GB 10000 rpm
OS: Windows Vista Business 32 bits

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #16by t00fri » 23.03.2006, 13:11

Fightspit wrote:Photofiltre is free and you can download here:

http://www.photofiltre.com/


Thanks, but I wrote a much more clever VT chopping utility: virtualtex that many people have used meanwhile...Also there is the GIMP that is also free for all OS and can do such things much better.

In fact, after more careful examination, your spec-map is really not good, I am afraid. There is a mismatch of 1-3 pixels with the main texture that gives very nasty black seams along lakes and seashore. Also one should always apply some smoothing of the digital zig-zag borders after blowing things up, etc.

I am surprised why you wrote that the original textures were in PNG format, since in the archives they are always in RAW bin format. This format is almost like PNG, but has NO header. If you read this format as PNG, you will get a misalignment by some pixels that could be the reason for the apparent problems...

I think I will redo the whole stuff, notably including
the very recent matched 3 arc-second SRTM topographic dataset (Shuttle Radar Topography Mission, [JPL, 2005]) using directly Chris 16bit normal-map generator nm16. This will give a most crisp and perfectly matching elevation map exactly at 64k size.

A properly done 64k matched set of base texture, normal-map and spec-texture will give a much more crisp display for sure than your present blown-up "128k".

Anyway, many thanks for your pioneering efforts...

Bye Fridger

Topic author
Fightspit
Posts: 510
Joined: 15.05.2005
With us: 19 years 6 months

Post #17by Fightspit » 23.03.2006, 13:34

t00fri wrote:I am surprised why you wrote that the original textures were in PNG format, since in the archives they are always in RAW bin format. This format is almost like PNG, but has NO header. If you read this format as PNG, you will get a misalignment by some pixels that could be the reason for the apparent problems...

Bye Fridger


I remember that I haven't download the raw bin format but several area of earth in PNG (world.watermask.21600x21600.(A1 to D2).png) and I download also the world.watermask.5400x2700.png to make the level 0.
Motherboard: Intel D975XBX2
Processor: Intel Core2 E6700 @ 3Ghz
Ram: Corsair 2 x 1GB DDR2 PC6400
Video Card: Nvidia GeForce 8800 GTX 768MB GDDR3 384 bits PCI-Express 16x
HDD: Western Digital Raptor 150GB 10000 rpm
OS: Windows Vista Business 32 bits

Topic author
Fightspit
Posts: 510
Joined: 15.05.2005
With us: 19 years 6 months

Post #18by Fightspit » 23.03.2006, 13:44

t00fri wrote:In fact, after more careful examination, your spec-map is really not good, I am afraid. There is a mismatch of 1-3 pixels with the main texture that gives very nasty black seams along lakes and seashore. Also one should always apply some smoothing of the digital zig-zag borders after blowing things up, etc.


Can you tell me where in the earth there is this problem ?
Motherboard: Intel D975XBX2
Processor: Intel Core2 E6700 @ 3Ghz
Ram: Corsair 2 x 1GB DDR2 PC6400
Video Card: Nvidia GeForce 8800 GTX 768MB GDDR3 384 bits PCI-Express 16x
HDD: Western Digital Raptor 150GB 10000 rpm
OS: Windows Vista Business 32 bits

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #19by t00fri » 23.03.2006, 13:48

Fightspit wrote:
t00fri wrote:I am surprised why you wrote that the original textures were in PNG format, since in the archives they are always in RAW bin format. This format is almost like PNG, but has NO header. If you read this format as PNG, you will get a misalignment by some pixels that could be the reason for the apparent problems...

Bye Fridger

I remember that I haven't download the raw bin format but several area of earth in PNG (world.watermask.21600x21600.(A1 to D2).png) and I download also the world.watermask.5400x2700.png to make the level 0.


Oh you are right. The chopped files are all converted to PNG also for the main texture.

Thanks,

Bye Fridger

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #20by t00fri » 23.03.2006, 14:11

Fightspit wrote:
t00fri wrote:In fact, after more careful examination, your spec-map is really not good, I am afraid. There is a mismatch of 1-3 pixels with the main texture that gives very nasty black seams along lakes and seashore. Also one should always apply some smoothing of the digital zig-zag borders after blowing things up, etc.

Can you tell me where in the earth there is this problem ?


Yes, it's everywhere at the lefthand sea borders and lake borders. Here is an example from Egypt, look at the left hand borders: there is a black 2-3 pixel border and you can also see the nasty digital zig-zag...Blow the image up to see it better.

The image has ONLY the base texture and your spec map. Nothing else to clearly expose the origin of the faults!

Bye Fridger

Image


Return to “Textures”