Using the Nmtools package

General discussion about Celestia that doesn't fit into other forums.
Avatar
Topic author
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 8 months
Location: Hamburg, Germany

Post #141by t00fri » 24.04.2007, 07:48

danielj wrote:It??s done.


I don't believe it!!! Concrats, Daniel! Anders you'll get the golden 'Celelstia medal' ...

Bye Fridger
Image

steffens
Posts: 162
Joined: 06.11.2003
With us: 21 years
Location: RP Germany

Post #142by steffens » 24.04.2007, 08:12

tech2000 wrote:Cool to see that someone can do tiles with it.. :wink: any more suggestions of how to improve it?
In the vtgen.bat you offer for downloading, I found the line

Code: Select all

halfsize 32768 < world64k.bin > world32k.bin

Shouldn't this be

Code: Select all

halfsize 65536 < world64k.bin > world32k.bin
:?:

tech2000 wrote:I have noticed something strange too.

This line doesnt work, this line gets excluded from the "Earth Normal.ctx" file.

Code: Select all

echo    BaseSplit 0> ctx.3"

But this do.

Code: Select all

echo    BaseSplit 0 > ctx.3"

While this work, but adds a space after the 0 in the "Earth Normal.ctx", which is NOT the correct way to do it.. :cry:
Is Celestial really that picky about an extra space in an ctx file? It shouldn't be!
I don't know a workaround for this, as "0>" means not to redirect standard output to the file but some other channel (no idea which, I'm using Linux). You can try

Code: Select all

echo    BaseSplit 00> ctx.3
which will not produce an extra space but a double zero. Celestia should be able to interpret this as 0 anyway, but I haven't checked.

steffens

ANDREA
Posts: 1543
Joined: 01.06.2002
With us: 22 years 5 months
Location: Rome, ITALY

Post #143by ANDREA » 24.04.2007, 09:36

danielj wrote:It??s done. But how can I name the normal map?I need,too,a .ctx file;but I don??t know to do one.The only thing I know is that the normal map is 64k,levels 0-5,in DDS format and in tiles of 1024 pixels. I not only produced DDS files,but also PPM format files...

Danielj, now that you have the dds images in 5 levels, add the ctx file to the "hires" directory, where must be the "XXXXX" directory containing the level0-level1 directories and so on, using the following one as example, changing the only different thing, i.e. the image directory name:

Code: Select all

VirtualTexture
{
        ImageDirectory "XXXXX"
        BaseSplit 0
        TileSize 1024
        TileType "dds"
}


Obviously "XXXXX" will be the name of YOUR directory containing the image level0-4.
That's all. :wink:
Enjoy!.
Bye

Andrea :D
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO

guest jo
Posts: 126
Joined: 01.04.2004
With us: 20 years 7 months

Post #144by guest jo » 24.04.2007, 10:47

What about the mipmaps ? Fridger didn`t include them in his tutorial.
Are they really useful ?
_______________________________________
Celestia 1.6.0 @1600x1200x32; GF8800Ultra; Q6600@3,2GHz;WinXPx64;

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

Post #145by t00fri » 24.04.2007, 11:00

guest jo wrote:What about the mipmaps ? Fridger didn`t include them in his tutorial.
Are they really useful ?


Mipmaps are a must for non-tiled DXT textures, since they improve the performance substantially in this case. Mipmaps are nothing but a set of reduced textures, each smaller by a factor of 2 than the preceeding one.

In case of VT tiles we have the various VT levels which precisely take over the function of the mipmaps. One exception is level0. There one might request the building of mipmaps, which might improve the rendering speed a bit at larger distances from the body.

Bye Fridger
Image

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

Post #146by danielj » 24.04.2007, 11:30

Thanks,but nmtools don??t separate in levels 0 to 5.He did the normal maps as a whole.So now I will have to know wich files goes to level 0,which to level 1 and so on.It produced the normalmap in the vtgen folder...


ANDREA wrote:
danielj wrote:It??s done. But how can I name the normal map?I need,too,a .ctx file;but I don??t know to do one.The only thing I know is that the normal map is 64k,levels 0-5,in DDS format and in tiles of 1024 pixels. I not only produced DDS files,but also PPM format files...
Danielj, now that you have the dds images in 5 levels, add the ctx file to the "hires" directory, where must be the "XXXXX" directory containing the level0-level1 directories and so on, using the following one as example, changing the only different thing, i.e. the image directory name:

Code: Select all

VirtualTexture
{
        ImageDirectory "XXXXX"
        BaseSplit 0
        TileSize 1024
        TileType "dds"
}


Obviously "XXXXX" will be the name of YOUR directory containing the image level0-4.
That's all. :wink:
Enjoy!.
Bye

Andrea :D

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

Post #147by danielj » 24.04.2007, 12:06

And I have another question:what I do with the .ppm files.I search in Google and found there is an intermediary format.So I don??t need to place it in levels 0-5?
I know that files 0_1 and 1_0 are level 0.So I need to manually search the BMNG and found which tiles goes in each level or is there an automatic way to do that?


[quote="danielj"]Thanks,but nmtools don??t separate in levels 0 to 5.He did the normal maps as a whole.So now I will have to know wich files goes to level 0,which to level 1 and so on.It produced the normalmap in the vtgen folder...

tech2000
Posts: 258
Joined: 14.02.2006
Age: 52
With us: 18 years 9 months
Location: Skepplanda, Sweden

Post #148by tech2000 » 24.04.2007, 12:54

In the vtgen.bat you offer for downloading, I found the line
Code:
halfsize 32768 < world64k.bin > world32k.bin

Shouldn't this be
Code:
halfsize 65536 < world64k.bin > world32k.bin

Hi Steffens, thanks. Ofcourse it should read 65536 since it is the world64k.bin we are shrinking.

It??s done.
But how can I name the normal map?I need,too,a .ctx file;but I don??t know to do one.The only thing I know is that the normal map is 64k,levels 0-5,in DDS format and in tiles of 1024 pixels.
I not only produced DDS files,but also PPM format files...


Download and run the script again since something is wrong there. The script should generate the ctx file for you too.

cheers, Anders

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

Post #149by danielj » 24.04.2007, 20:11

No!Besides the ppm and DDS tiles,the script generate 2 other files: world32k.bin(with 262144 KB) and world64k.bin(4194304 KB).
Did I do something wrong?The script take hours to generate the normal map...at least more than 1 hour.


tech2000 wrote:
In the vtgen.bat you offer for downloading, I found the line
Code:
halfsize 32768 < world64k.bin > world32k.bin

Shouldn't this be
Code:
halfsize 65536 < world64k.bin > world32k.bin

Hi Steffens, thanks. Ofcourse it should read 65536 since it is the world64k.bin we are shrinking.

It??s done.
But how can I name the normal map?I need,too,a .ctx file;but I don??t know to do one.The only thing I know is that the normal map is 64k,levels 0-5,in DDS format and in tiles of 1024 pixels.
I not only produced DDS files,but also PPM format files...

Download and run the script again since something is wrong there. The script should generate the ctx file for you too.

cheers, Anders

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

Post #150by t00fri » 24.04.2007, 20:15

danielj wrote:The script take hours to generate the normal map...at least more than 1 hour.


My 64k normalmap tiles are generated in 15-20 minutes altogether...

Bye Fridger
Image

tech2000
Posts: 258
Joined: 14.02.2006
Age: 52
With us: 18 years 9 months
Location: Skepplanda, Sweden

Post #151by tech2000 » 24.04.2007, 23:33

t00fri wrote:
danielj wrote:It??s done.

I don't believe it!!! Concrats, Daniel! Anders you'll get the golden 'Celelstia medal' ...

Bye Fridger


Thanks for the 'Celestia medal' Fridger. 8)

Daniel, let us see some screenshots now..

Bye, Anders

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

Post #152by danielj » 25.04.2007, 00:59

I would like to,but it??s impossible.I saw,earlier,that there is 2 tx0_1 and tx1_0.One located in level 0 of BMNG and another located in level 1 of BMNG.So it??s IMPOSSIBLE to do it manually.And worse than that,the script generates only one of these files,so I don??t know which tile go to each level.
Maybe I should chosen option 4-generate PNG tiles and not 3-generate dxt5 tiles.Is that right?
And the script generate yet ANOTHER file that I hadn??t seen before:nvdxt_scratch.tmp.
The PPM files goes until 63_31 and the DDS files goes only until 33_1
I suppose that ppm files are levels 0-5(64k) and the dds files are levels 0-4(32k).Is that right?
Now I will wait until I get an answer.My partition have too little memory to get another try until I am sure in what I am doing.

tech2000 wrote:
t00fri wrote:
danielj wrote:It??s done.

I don't believe it!!! Concrats, Daniel! Anders you'll get the golden 'Celelstia medal' ...

Bye Fridger

Thanks for the 'Celestia medal' Fridger. 8)

Daniel, let us see some screenshots now..

Bye, Anders

steffens
Posts: 162
Joined: 06.11.2003
With us: 21 years
Location: RP Germany

Post #153by steffens » 25.04.2007, 06:57

danielj wrote:I would like to,but it??s impossible.I saw,earlier,that there is 2 tx0_1 and tx1_0.One located in level 0 of BMNG and another located in level 1 of BMNG.So it??s IMPOSSIBLE to do it manually.And worse than that,the script generates only one of these files,so I don??t know which tile go to each level.
Maybe I should chosen option 4-generate PNG tiles and not 3-generate dxt5 tiles.Is that right?
And the script generate yet ANOTHER file that I hadn??t seen before:nvdxt_scratch.tmp.
The PPM files goes until 63_31 and the DDS files goes only until 33_1
I suppose that ppm files are levels 0-5(64k) and the dds files are levels 0-4(32k).Is that right?
Now I will wait until I get an answer.My partition have too little memory to get another try until I am sure in what I am doing.

This really sounds like the script stopped in the middle of the action, either because of a bug (the last script posted on the forum has a bug that would cause it to break after level 5) or because you are running out of disk space.
You should:
1. Download the vtgen.bat again, as it contains the latest fixes
2. Delete all generated files of the last run: all *.ppm and *.dxt5nm files, world*bin ... The directory should look like the screenshots earlier in this thread
3. Make sure you have got enough free disk space. I have not checked, how much is needed during processing, but 20 GB should be fine (anyone with hard numbers?)

steffens

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

Post #154by danielj » 25.04.2007, 12:08

But 20 GB in the HD or in the partition?My HD has 160 GB,and is partitioned in partition C and D.
Yes,the program have the tendency to lock down.I think you will have to stay the computer alone,doing nothing during the computation...Is that right?

steffens
Posts: 162
Joined: 06.11.2003
With us: 21 years
Location: RP Germany

Post #155by steffens » 25.04.2007, 12:47

danielj wrote:But 20 GB in the HD or in the partition?My HD has 160 GB,and is partitioned in partition C and D.
You need enough free space in the output directory, i.e. that partition.

danielj wrote:Yes,the program have the tendency to lock down.I think you will have to stay the computer alone,doing nothing during the computation...Is that right?

Although working with the computer should not make the script crash, your texture might be ready to use much faster, if you leave the computer alone while splitting this monster file. There's a lot of hard disk activity...

Did you download the script again and try to start it once more?

steffens

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

Post #156by danielj » 25.04.2007, 13:57

I will do as soon as I can,but I??m not at home now.

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

Post #157by danielj » 25.04.2007, 20:05

Ok,now I??m at home.Is it to choose dxt5 or png tiles?Or doesn??t matter?

danielj wrote:I will do as soon as I can,but I??m not at home now.

tech2000
Posts: 258
Joined: 14.02.2006
Age: 52
With us: 18 years 9 months
Location: Skepplanda, Sweden

Post #158by tech2000 » 25.04.2007, 20:16

danielj wrote:Ok,now I??m at home.Is it to choose dxt5 or png tiles?Or doesn??t matter?

danielj wrote:I will do as soon as I can,but I??m not at home now.


That is exactly what you have to do, choose dtx5nm OR png format.

Regards, Anders

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

Post #159by danielj » 25.04.2007, 20:49

I download the vtgen.bat again from page 9 and the CHOICE problem reappeared.When can I download the newest version?


tech2000 wrote:
danielj wrote:Ok,now I??m at home.Is it to choose dxt5 or png tiles?Or doesn??t matter?

danielj wrote:I will do as soon as I can,but I??m not at home now.

That is exactly what you have to do, choose dtx5nm OR png format.

Regards, Anders

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

Post #160by danielj » 25.04.2007, 22:12

IT WASN??T TO REDOWLOAD vtgen.bat.
Now it??s not working anymore...


Return to “Celestia Users”