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

Tips for creating and manipulating planet textures for Celestia.
Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #41by cartrite » 09.06.2006, 21:02

I think you may have misunderstood me. I'm doing these for personal use only. I'm not planning to upload these to the motherlode. I had enough problems with uploading the smaller files I already uploaded of the Mars area.. I'm not thinking of going thru that again anytime soon.

I was just wondering if anyone found a way of correcting this so I don't have to reinvent the wheel.

I found that if one uses a lighter color for the spec color that the problem is not as noticeable. Like this

Code: Select all

SpecularColor [ 0.180 0.170 0.155 ]


Here is the program that does this. It looks and works a lot like nm16 because I used it as a template. I only built it with linux. It builds on Windows but doesn't work. I also recolored my oceans slightly so you may not get the same affect when combined with a unaltered texture. Build it with

Code: Select all

g++ -O3 bmng-spec5.cpp -o bmng-spec
and then run it with

Code: Select all

bmng-spec5 4096 4096 < testa.rgb > spec-testa.ppm

Again this DOES NOT work with Windows.

Code: Select all

#include <iostream>
#include <cstdio>
#include <stdio.h>

using namespace std;

int start = 2;
int change = 1;

unsigned char readRGB(FILE *in)
{
    unsigned char c[1];
    fread(c, 1, 1, in);
    //fscanf(stdin, %s, &c );

    return c[0];
}


unsigned char* readRowRGB(FILE* in, int width)
{
    unsigned char* row = new unsigned char[width * 3];
    for (int i = 0; i < width * 3; i++)
        row[i] = readRGB(in);

    return row;
}




int main(int argc, char* argv[])
{
    if (argc < 3)
    {
        cerr << "Usage: bmng-fix <width> <height> \n";
        return 1;
    }

    int width = 0;
    int height = 0;

    if (sscanf(argv[1], " %d", &width) != 1 ||
        sscanf(argv[2], " %d", &height) != 1)
    {
        cerr << "Bad image dimensions.\n";
        return 1;
    }

    fprintf(stdout, "P6\n");
    fprintf(stdout, "%d %d\n255\n", width, height);
    unsigned char** samples = new unsigned char*[height];
    unsigned char* rgb = new unsigned char[width * 3];

    for (int i = 0; i < start - 1; i++)
        samples[i] = readRowRGB(stdin, width);

    for (int y = 0; y < height; y++)
    {
   if (y % 100 == 0)
       cerr << '[' << y << ']';

        if (y > change)
            delete[] samples[y - change - 1];

        if (y < height - change)
            samples[y + change] = readRowRGB(stdin, width);
        for (int x = 0; x < width; x++)
        {
            unsigned char r;
            unsigned char g;
            unsigned char b;
            r = samples[y][x * 3 + 0];
            g = samples[y][x * 3 + 1];
            b = samples[y][x * 3 + 2];
            if ( r <= 0x08 )
          r = 0xff,
          g = 0xff,
               b = 0xff;
       else
          r = 0x00,
               g = 0x00,
               b = 0x00;
       rgb[x * 3 + 0] = (unsigned char) (r);
       rgb[x * 3 + 1] = (unsigned char) (g);
       rgb[x * 3 + 2] = (unsigned char) (b);
        }

   fwrite(rgb, width, 3, stdout);
    }

    return 0;
}



I'm also trying some other things because this does not include rivers and a lot of the small lakes.

Good Luck,

cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #42by cartrite » 10.06.2006, 02:24

As far as the code I posted above, I think I'm going to use it for the coasts but I found something else out that will allow me to do the rivers by hand. These 2 thumbs are sections cut from tile B2 ndvi image ( 21600x21600 ) from the bmng site. I may be wrong but these look like the source files for the watermask and why the rivers and coastline are not matching. But I think I may be able to use these files to do some corrections. If I ever complete this major undertaking I will try to make the spec map available to the public.


Image

Image

cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

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

Post #43by t00fri » 11.06.2006, 20:21

Cartrite,

I also looked again into the issue of the non-fitting water-texture in case of BMNG. Unfortunately the situation seems quite complex:

1) Since for my 64k SRTM/BMNG project I started directly from the 84k RAW binary textures, I do not observe any systematic pixel offsets of the spec relative to the RGB base texture (unlike Fightspit's texture assembled of the 20k x 20k PNG tiles!)

2) However, the data for the Water Bodies were not derived from the SRTM precision data! Here is a citation from the respective README:

A Landcover water layer and medium-scale maps and charts were used as supplemental data sources, generally as supporting evidence for water identified in the image mosaics. Since the Landcover water layer was derived mostly from Landsat 5 data collected a decade earlier than the Shuttle mission and the map sources had similar currency problems, there were significant seasonal and temporal differences between the depiction of water in the ancillary sources and the actual extent of water bodies in February 2000
in many instances.


Unlike what you speculated above, the NDVI data did not represent "source" files of the water body texture!

In fact, the NDVI data are differences of data from 2 characteristic spectral filters that may be used to describe vegation patterns! If you read the respective descriptions carefully, you'll learn that the much less accurate WATER BODY data were added there afterwards with certain characteristic numbers.

+++++++++++++++++++++
In summary, the mismatch between the SRTM precision data and the VERY old Landsat 5 Water Body data is the real problem. Here is an illustration from my 64 RGBA texture. The purple arrows indicate the mismatch areas which clearly are NOT due to a misalignment!
+++++++++++++++++++++

Image

I have played today quite a bit with the MUCH more accurate SRTM II data for the water-bodies. Unfortunatley they are stored as VECTOR graphics (*.shp = shapefiles) in tiny 1deg x 1deg tiles...

There is some free software (ArcExplorer) for Windows and Linux that allows to inspect and assemble the shape files. But it's very tedious, given that there are thousands of them!

It's not obvious whether it appears worthwhile to go through this tremendous conversion hassle.

Bye Fridger
Image

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #44by cartrite » 12.06.2006, 08:43

Fridger wrote
Unlike what you speculated above, the NDVI data did not represent "source" files of the water body texture!

I agree that I am in error here. The black pixels in the image seems to be the same as the watermask though. Anyhow what I was going to try is select the black pixels by color, then use the free hand tool to subtract the areas that are outside river boundries and then add the missing river boundries to the selection.

I would probally be better off using the base texture ( graysacle ) for this and manually select the rivers and lakes with the path selection tool. Anyhow I haven't started yet and am still looking for a better way. Currently I'm trying to use the SRTM map to produce an ocean mask with another program that I wrote / modified, not the one above. This will use 16 bit integers instead of characters and use 0 to find the oceans. This will probally produce a more accurate map of coastlines.

Globe Maker posted
Inland lakes can
also be identified because they are flat. A computer algorithm can
find all of the flat lakes and give them a specular texture value. Rivers
are almost flat, so they can also be identified by a more complicated computer
algorithm.


This was from:
http://www.celestiaproject.net/forum/viewtopic.php?t=8945

Is this actually possible?

cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
selden
Developer
Posts: 10190
Joined: 04.09.2002
With us: 22 years
Location: NY, USA

Post #45by selden » 12.06.2006, 11:43

Is this actually possible?


In principle.

If you can obtain extensive enough and precise enough DEM files and can align them properly with the texture maps.

However, my impression is that most DEM files are positioned relative to the local datum and won't necessarily align properly with more distant DEM files.

And it'll take a lot of processing. And storage.

DEM files for the U.S. are available from USGS servers.

I'd suggest consulting with GlobeMaker. He may be able to help.
Selden

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

Post #46by t00fri » 12.06.2006, 11:47

cartrite wrote:
Globe Maker posted
Inland lakes can
also be identified because they are flat. A computer algorithm can
find all of the flat lakes and give them a specular texture value. Rivers
are almost flat, so they can also be identified by a more complicated computer
algorithm.

This was from:
http://www.celestiaproject.net/forum/viewtopic.php?t=8945

Is this actually possible?

cartrite


Oceans is OK, Lakes may be to some extent, rivers I don't think so. In general there are plenty of other places on Earth that are flat but have nothing to do with water!

Altogether the correct identification of water bodies is highly non-trivial and that's why they used very old data for BMNG/SRTM

Bye Fridger
Image

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #47by cartrite » 12.06.2006, 12:32

Fridger wrote:
Altogether the correct identification of water bodies is highly non-trivial and that's why they used very old data for BMNG/SRTM
Amen to that. I also went on google and did a search on SRTM and found the pages that you were reffering to. Until now I was not aware of them.
http://edc.usgs.gov/products/elevation/swbd.html
http://edc.usgs.gov/products/elevation.html

cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

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

Post #48by Fightspit » 12.06.2006, 15:11

t00fri wrote: (unlike Fightspit's texture assembled of the 20k x 20k PNG tiles!)

8O 8O 8O

It is 2Kx2k tiles :lol:
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

GlobeMaker
Posts: 216
Joined: 30.10.2005
With us: 18 years 10 months

Post #49by GlobeMaker » 12.06.2006, 15:11

Hi Cartrite,

I looked at the two links you found and they look great. For $60 you can buy
a DVD with what you need. It seems to cover most continents. You need
software to read ESRI shapefiles. The documentation says :

"This document provides a description of the content, format and accuracy specifications of the Shuttle Radar Topography Mission Water Body Data (SWBD).

2. Applicable Documents

2.1. Data Format. SWBD will conform to ESRI Shapefile format. Reference ESRI Shapefile Technical Description, An ESRI White Paper ?€“ July 1998 for specific file format information (http://www.esri.com/library/whitepapers ... pefile.pdf).

3.2. Tiling. SWBD tile size will be equal to 1 degree x 1 degree. The southwest corner coordinates of each 1 degree x 1 degree cell shall coincide with whole latitude and longitude values.

3.6.2. Lake Area Feature

3.6.2.1. Lakes greater than a 600-meter minimum length and 183-meter minimum width requirement shall be depicted. Lake inlets (arms) shall be depicted until the inlet/arm reaches a width of 90m.
3.6.2.2. Lakes will be sized by calculating the length of the medial axis; width will be calculated perpendicular to the medial axis.
3.6.2.3. Lakes are portrayed at a single elevation value.
3.6.2.4. Lake shoreline will be maintained such that it is at least one (1) meter higher than the lake elevation; containment will include maintaining this relationship with DTED posts diagonally adjacent to lakes. See figure 1.

3.6.3. Double Line Drain (River) Area Feature

3.6.3.1. Sustained-length, beginning and ending length/width requirements are defined such that double line drain edits are not required unless the sustained length/width requirements stated below are met.
3.6.3.2. Double line drain depiction begins as the river width exceeds 183 m for a length of 600 m or more. Double line drain depiction ends when the width of the river becomes 90 m or less and does not widen back to > 90 m within 1 km downstream.
3.6.3.3. Double line drain elevation will be portrayed as a series of ?€?stepped down?€
Your wish is my command line.

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

Post #50by t00fri » 12.06.2006, 16:17

GlobeMaker wrote:Hi Cartrite,

I looked at the two links you found and they look great. For $60 you can buy
a DVD with what you need. It seems to cover most continents. You need
software to read ESRI shapefiles. The documentation says :

"This document provides a description of the content, format and accuracy specifications of the Shuttle Radar Topography Mission Water Body Data (SWBD).



Globemaker,

but didn't you read what I was writing above? I spent quite some time on the weekend to precisely read and download the new SRTM II data on the waterways that are encoded in "shapefiles"...The software required to read and display shapefiles is e.g ArcExplorer (ESRI) that exists as a Win32 native application (version 2) and as a Java application (version 9.1) working for Windows and Linux.

You don't need a 60$ CD for getting hold of these data.

Yet there are many problems with the new SRTM II approach in case of huge textures! How to assemble these thousands of tiny 1deg x 1deg shapefile tiles into a 84k water body texture, for example? There are even much harder conversion problems that I studied extensively. The conversion of the shapefile vector format into SVG vector format and then into bitmapped files is not easy. There are various converters .shp => svg. But the conversion of svg => png, jpg is non-trivial since the latter are bitmap formats...

Bye Fridger
Last edited by t00fri on 12.06.2006, 17:26, edited 3 times in total.
Image

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

Post #51by t00fri » 12.06.2006, 16:20

Fightspit wrote:
t00fri wrote: (unlike Fightspit's texture assembled of the 20k x 20k PNG tiles!)
8O 8O 8O

It is 2Kx2k tiles :lol:


Of course I meant the BIG PNG tiles that you find on the SRTM arctic server, for example. As far as I know you NEVER worked with the binary 84k RAW format files, but rather with the 20k x 20k PNG tiles on the SRTM server.

Bye Fridger
Image

GlobeMaker
Posts: 216
Joined: 30.10.2005
With us: 18 years 10 months

Post #52by GlobeMaker » 12.06.2006, 17:47

Hello t00fri,

I was glad to see that you did not find any problems with accuracy in
the SRTM files. If I worked on this big
specular map, I would write custom software using the Perl language.
This program would open hundreds of input files in .shp format and
write into one big output file in a bitmapped format like .bmp. This
custom converter software can be written by any computer programmer,
using the written specifications for the two file formats. Once the big file
is in a bitmapped .bmp format, it is easy to convert to .png or .jpg.

If people limit themselves to using off-the-shelf converter software,
then they may be prevented from succeeding. That is why I write custom
Perl programs to convert geographical files into any format that is needed.
All it takes is the ability to read the file format specs and then to write
logical and mathematical algorithms to automate the conversion.

Maybe Cartrite can find a person who knows how to program a computer
to make the specular map for him using the very flexible method
outlined above.
Your wish is my command line.

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

Post #53by t00fri » 12.06.2006, 18:41

GlobeMaker wrote:Hello t00fri,

I was glad to see that you did not find any problems with accuracy in
the SRTM files. If I worked on this big
specular map, I would write custom software using the Perl language.
This program would open hundreds of input files in .shp format and
write into one big output file in a bitmapped format like .bmp. This
custom converter software can be written by any computer programmer,
using the written specifications for the two file formats. Once the big file
is in a bitmapped .bmp format, it is easy to convert to .png or .jpg.

If people limit themselves to using off-the-shelf converter software,
then they may be prevented from succeeding. That is why I write custom
Perl programs to convert geographical files into any format that is needed.
All it takes is the ability to read the file format specs and then to write
logical and mathematical algorithms to automate the conversion.

Maybe Cartrite can find a person who knows how to program a computer
to make the specular map for him using the very flexible method
outlined above.

Globemaker,

I can't help it, but I still have the feeling sometimes that your mails have been written (again) by a text generator rather than a human being ;-) It's hard to believe that you are unaware that I have extracted practically all Celestia data files (except the stars) of the official distribution from scientific catalogs via PERL scripts in the past ;-) . Still you give me this "introduction" about the benefits of "using the PERL language"...

Also I have just completed with Robert Skuridin from Russia a set of 4 CUSTOM tools in C++ that handle monster textures in an optimal manner as to quality and speed. Notably they provide the FIRST correct normalmaps ;-) . I have reported about this project here repeatedly.

[ These tools will not be for download here or at the Motherlode. After being introduced elsewhere, they will be part of the official Celestia distribution.]

So, I certainly am aware of what you suggested and coding such tools is straightforwart and natural for me. But before embarking onto custom coding adventures, it was very important to first contemplate about possible inherent problems.

For >=64k textures, PERL is getting too slow and C++ is a must.

Globemaker wrote:This program would open hundreds of input files in .shp format and write into one big output file in a bitmapped format like .bmp.


You did not even seem to notice that the real problems are right here: It's the conversion of the shapefile VECTOR format into high-quality PNG's or .bmp's , say, that is far from trivial.

The difficulties have NOTHING to do with reading the shapefile format, via some custom code, about which I wouldn't even loose a word.

+++++++++++++++++
It's the proper conversion of the "shapefile" vector format into PIXEL graphics!
+++++++++++++++++

Among programmers this problem is well known and requires pretty fancy algorithms to lead to acceptable results....

Bye Fridger

PS: In case you are interested, here is the technical shapefile specification. It should be obvious that this is a pretty complicated format, since it has to be quite flexible.

http://www.celestiaproject.net/~t00fri/images/ ... format.pdf

The conversion of that vector format into PIXEL graphics is certainly more than a weekend's work ;-)
Image

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #54by cartrite » 12.06.2006, 21:14

I'm still trying to isolate the oceans.!!!!

Is there a file around somewhere that describes the data for the raw 84k bin file. When the program checks for value = 0 the image comes out mostly black. When it checks for values <= 0 the image looks good with one major problem. Antartica. From approximently 90 west to 90 east and 90 south to about 60 or 70 south the pixels come out all black.

All the descriptions that I've read so far are of the "finished" product. Which seems to be different then the raw bin file.

cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #55by cartrite » 12.06.2006, 23:20

Sorry for any confusion my last post may have caused. There seems to be a gcc 4.x.x issue because when I built the program with gcc 3.3.4 the oceans can be isolated with the value 0. I should have known. I recently had a problem with that compiler and cmod conversions.

cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #56by cartrite » 13.06.2006, 10:57

Although the compilers need a different comparison if statement, ie gcc 4.0.2 needs if a <= 0 and gcc 3.3.4 if a == 0 the outcome is still the same. There is this problem around Antartica which would seem to suggest that the values for the ocean in that region are not zero. This is the ocean mask created from the 84k SRTM_ramp2.bin file. Anyone know where I might find out what this value is ( range of values are?

Image

cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
fsgregs
Posts: 1307
Joined: 07.10.2002
With us: 21 years 11 months
Location: Manassas, VA

Post #57by fsgregs » 15.10.2006, 02:54

OK :x :x :x :x

What gives? I finally downloaded fightspit's entire 64K Blue Marble VT Earth set from the Motherlode.

I have a fast system (Anthon 64 3800+ CPU with 1 GB RAM, a 200 GB hard Drive, a Nvidia GeForce 6600 GT video card and a Creative Audigy II sound card.

When I loaded fightspit's 64K VT Earth set, my damn computer froze for over 30 seconds. I got a white screen and frame rates dropped to under 1 fps. Finally they came back, I moved the scene a bit and again, everything froze while a new set of textures was loading. 20 - 30 seconds later, I could move again but only until it loaded a new set. Then ... freeze!

When I tried loading both the VT surface textures and fightspit's spec VT set, my computer froze up so badly that I had to reboot.

Now I know these textures need a "fast" computer ... but this is ridiculous! My system IS as fast as anyone could expect :? Yet ... these VT textures did it in.

How is anyone able to run these textures? Is there some trick to using them?

HELP!

Frank

LoneHiker
Posts: 53
Joined: 10.10.2005
With us: 18 years 11 months

Post #58by LoneHiker » 15.10.2006, 07:22

fsgregs wrote:I have a fast system (Anthon 64 3800+ CPU with 1 GB RAM, a 200 GB hard Drive, a Nvidia GeForce 6600 GT video card and a Creative Audigy II sound card.

When I loaded fightspit's 64K VT Earth set, my damn computer froze for over 30 seconds.

When I tried loading both the VT surface textures and fightspit's spec VT set, my computer froze up so badly that I had to reboot.

How is anyone able to run these textures? Is there some trick to using them?


There are a few issues here. First the file format (PNG) is not optimized for your Nvidia card. Second, at 2048 x 2048 the tiles are rather large and will become cumbersome especially as you near the poles. Finally, the use of a separate specular map (also in PNG format) is ineffecient. Ideally you would have the specular map in the alpha channel of the main texture.

I would highly recommend you download and run a file conversion program called nvDXT to batch convert PNG to Nvidia-friendly DDS format. This will make a huge difference! You can download the DDS Utilities Installer here:

http://developer.nvidia.com/object/dds_utilities.html


1. Assuming you have Celestia installed on c:\Program Files\Celestia make the following folder:

c:\temp

(If you have Celestia installed on a different drive make the temp folder in the root of whatever drive Celestia is installed on.)


2. Navigate to:

c:\Program Files\Celestia\extras\BMNG_64K\textures\hires\BMNG

(Or whatever path you put the VT files in.)


3. Move the level0 - level4 folders (5 total) to the temp folder you created.


4. Run nvDXT from the Start Menu. It will open up in the Command Prompt.


5. Type the following:

nvdxt -all -deep c:\temp -outsamedir -dxt1 -nmips 4 -sharpenMethod SharpenMedium -quality_normal

(If your temp folder is on a different drive be sure to type the correct path.)


6. After the conversion is complete move the level0 - level4 folders back to their original location.


7. Locate the BMNG.ctx file in the hires folder, open it in Notepad or Wordpad and edit the TileType line to this:

TileType "dds"

Save.


8. Repeat the DDS conversion steps for the specular textures, placing them in the proper folder.


9. Locate BMNG_spec.ctx file in the hires folder, open it and edit the TileType line to:

TileType "dds"

----------

Normal maps can also be converted to DDS. The main drawback to DDS is you lose some quality, especially with normal maps. With PNG you don't. For regular textures the quality loss is really only noticeable in the flat ocean color where I can see some ordered dithering, at least with my video card.

Lone
Last edited by LoneHiker on 15.10.2006, 13:24, edited 1 time in total.

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #59by cartrite » 15.10.2006, 10:56

LoneHiker wrote:
nvdxt -all -deep c:\temp -outsamedir -dxt1 -nmips 4 -sharpenMethod SharpenMedium -quality_normal

It's been a while since I did this and the computer I did it on only had 512 mb ram but I could't run the ommand "nvdxt -all -deep" if the folder I ran it on had a total size being too large. I was also converting smaller 512x512 tiles. The nvdxt would fail in the middle of the run.. Memory issue I think. I had to divide my larger folders into parts. Like a level3a, level3b, etc. Nvdxt could't release any memory during a single run til it was finnished. When it ran out of memory, it stopped writing out the dds files and started writing error msgs..

If your using cvs code, currently this wouldn't help anyhow.See http://www.celestiaproject.net/forum/viewtopic ... 9123#79123

cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

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

Post #60by Fightspit » 15.10.2006, 11:58

I know the BMNG VT tiles are in PNG which provide the best quality of the tiles but decrease a lot of fps probably.
I hesitate to do a BMNG in DDS version but I don't know if DXT5 (with specific compresion ?) get the same result than PNG.
What do you think ?
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


Return to “Textures”