Using the Nmtools package

General discussion about Celestia that doesn't fit into other forums.
tech2000
Posts: 258
Joined: 14.02.2006
Age: 52
With us: 18 years 9 months
Location: Skepplanda, Sweden

Post #121by tech2000 » 21.04.2007, 10:30

danielj wrote:I substitute the .bin file for the bin.gz,but the SAME answer 9009 showed up.
So,I think there are 2 possibilities:I copied the vtgen script in the wrong form or there is something wrong with my Windows XP prompt.If it is the latter case,there is nothing I can do at all...


Did you download this vtgen.bat file. And the file from nasa should be untouched, with the same file name it had when you downloaded it...

Please follow the steps with GREAT CARE.

Anders...
Last edited by tech2000 on 21.04.2007, 16:05, edited 1 time in total.

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

Post #122by danielj » 21.04.2007, 15:35

The site pamdal.se requires logon and I can??t acess it...
It says that is forbidden.
I CREATE a vtgen.bat file copying from the script in this topic.I simply copied,pasted in the wordpad and there ismy vtegen.bat.Is there another site when I can get the ORIGINAL vtgen.bat?


tech2000 wrote:
danielj wrote:I substitute the .bin file for the bin.gz,but the SAME answer 9009 showed up.
So,I think there are 2 possibilities:I copied the vtgen script in the wrong form or there is something wrong with my Windows XP prompt.If it is the latter case,there is nothing I can do at all...

Did you download this vtgen.bat file. And the file from nasa should be untouched, with the same file name it had when you downloaded it...

Please follow the steps with GREAT CARE.

Anders...

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

Post #123by tech2000 » 21.04.2007, 16:13

danielj wrote:The site pamdal.se requires logon and I can??t acess it...
It says that is forbidden.
I CREATE a vtgen.bat file copying from the script in this topic.I simply copied,pasted in the wordpad and there ismy vtegen.bat.Is there another site when I can get the ORIGINAL vtgen.bat?


tech2000 wrote:
danielj wrote:I substitute the .bin file for the bin.gz,but the SAME answer 9009 showed up.
So,I think there are 2 possibilities:I copied the vtgen script in the wrong form or there is something wrong with my Windows XP prompt.If it is the latter case,there is nothing I can do at all...

Did you download this vtgen.bat file. And the file from nasa should be untouched, with the same file name it had when you downloaded it...

Please follow the steps with GREAT CARE.

Anders...


I had missed a directory in the link. That is fixed now. Script has also some new features like a check that controlls that all files are present and it is ready for txtools, with some adjustments due to me not knowing the correct name for txtools yet.. :wink:

Best regards, Anders

It can't be any easier... Please show us some screenshots of your new set of normalmaps Daniel.

Ps. Just copy ALL NEEDED FILES to the same directory and double click vtgen.bat

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

Post #124by danielj » 21.04.2007, 16:43

Double clicking the file DON??T WORK.The black screen appear for just a second and NOTHING happens.
As soon as I download the vtgen.bat,do I have to copy the script to it,or the file already has the script in it?


tech2000 wrote:
danielj wrote:The site pamdal.se requires logon and I can??t acess it...
It says that is forbidden.
I CREATE a vtgen.bat file copying from the script in this topic.I simply copied,pasted in the wordpad and there ismy vtegen.bat.Is there another site when I can get the ORIGINAL vtgen.bat?


tech2000 wrote:
danielj wrote:I substitute the .bin file for the bin.gz,but the SAME answer 9009 showed up.
So,I think there are 2 possibilities:I copied the vtgen script in the wrong form or there is something wrong with my Windows XP prompt.If it is the latter case,there is nothing I can do at all...

Did you download this vtgen.bat file. And the file from nasa should be untouched, with the same file name it had when you downloaded it...

Please follow the steps with GREAT CARE.

Anders...

I had missed a directory in the link. That is fixed now. Script has also some new features like a check that controlls that all files are present and it is ready for txtools, with some adjustments due to me not knowing the correct name for txtools yet.. :wink:

Best regards, Anders

It can't be any easier... Please show us some screenshots of your new set of normalmaps Daniel.

Ps. Just copy ALL NEEDED FILES to the same directory and double click vtgen.bat

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

Post #125by tech2000 » 21.04.2007, 16:58

Daniel: vtgen.bat Make sure you have ALL these files except world.200406.3x86400x43200.bin.gz since that one is for making Surface textures. Image

When you have ALL needed files, just double click vtgen.bat

And please USE the VTGEN.BAT PROVIDED at the begining of this post. Don't make your own vtgen.bat, since that doesn't seems to work for you.

Now I want to see some screenshots.

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

Post #126by danielj » 21.04.2007, 17:26

The cmd says that the file world.200406.3x86400x43200.bin.gz is missing!
The same thing:choice is not recognized

tech2000 wrote:Daniel: vtgen.bat Make sure you have ALL these files except world.200406.3x86400x43200.bin.gz since that one is for making Surface textures. Image

When you have ALL needed files, just double click vtgen.bat

And please USE the VTGEN.BAT PROVIDED at the begining of this post. Don't make your own vtgen.bat, since that doesn't seems to work for you.

Now I want to see some screenshots.

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

Post #127by t00fri » 21.04.2007, 17:35

Boah! ;-)

Hang on Daniel, hang on...

Bye Fridger
Image

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

Post #128by tech2000 » 21.04.2007, 17:57

danielj wrote:The cmd says that the file world.200406.3x86400x43200.bin.gz is missing!
The same thing:choice is not recognized

tech2000 wrote:Daniel: vtgen.bat Make sure you have ALL these files except world.200406.3x86400x43200.bin.gz since that one is for making Surface textures.


I'll give you the script here once again.

Please cut and past only the info found inside the code-block below and save that file as a plain text file named vtgen.bat: And use notepad, that will not add any strange error to the files... It's hard to help with no GOOD information from you. Saying it just doesn't work is helping much.

Code: Select all

prompt $g
:start
cls
@echo off
echo ---------------------------------------------------------------------------------------
echo.
echo     This script will generate an awesome set of textures or normalmaps for Celestia
echo.
echo ---------------------------------------------------------------------------------------
echo.
echo  This script need the following programs installed or present in the same directory as
echo  this batch file for generating all sort of tiles.
echo.
echo  gzip - nmstiles - ?txtiles? - resc2pow2 - resc2pow2_rgb - halfsize - halfsize_rgb
echo  nvdxt - nconvert
echo.
echo ---------------------------------------------------------------------------------------
echo     If you have missing files you can't generate the Surface textures or Normalmaps
if not exist world.200406.3x86400x43200.bin.gz echo world.200406.3x86400x43200.bin.gz RAW file is missing.
if not exist srtm_ramp2.world.86400x43200.bin.gz echo srtm_ramp2.world.86400x43200.bin.gz RAW file is missing.
if not exist gzip.exe echo gzip.exe is missing, can't extract the RAW file.
if not exist nmstiles.exe echo nmstiles.exe is missing, can't generate Normalmap tiles.
if not exist txtiles.exe echo txtiles.exe is missing, can't generate Surface textures.
if not exist resc2pow2.exe echo resc2pow2.exe is missing, RAW file can't be transformed to 2:1 for Normalmaps.
if not exist resc2pow2_rgb.exe echo resc2pow2_rgb.exe is missing, RAW file can't be transformed for Surface textures.
if not exist halfsize.exe echo halfsize.exe is missing, RAW file can't be resized for Normalmaps.
if not exist halfsize_rgb.exe echo halfsize_rgb.exe is missing, RAW file can't be resized for Surface textures.
if not exist nconvert.exe echo nconvert.exe is missing, tiles can't be converted to PNG.
if not exist nvdxt.exe echo nvdxt.exe is missing, tiles can't be converted to dxt5nm.
echo ---------------------------------------------------------------------------------------
echo.
echo Please select what kind of tiles you want to generate. (Surface textures or Normalmaps)
echo.
echo             Surface textures level 0 to 5      Normalmaps level 0 to 5.
echo             -----------------------------      ------------------------
echo             1: future surface tiles            3: dxt5nm tiles
echo             2: future PNG tiles                4: PNG tiles
echo.
echo             5: Exit Script
echo.
echo ---------------------------------------------------------------------------------------
choice /c 12345 /N /m "Your choice:"
goto answer%errorlevel%

:answer1
echo Option not yet available.
goto exit
cls
echo.
echo.
echo This will generate a set of XXX Surface textures from level 5 to level 0.
echo (x.xxx.xxx.xxx bytes)
echo.
echo.
echo Preparing 64k RAW image from Nasa - world.200406.3x86400x43200.bin.gz.
echo.
echo --------------------------------------------------------------------------------------
gzip -dc < world.200406.3x86400x43200.bin.gz | resc2pow2_rgb 86400 1 > world64k.bin
halfsize_rgb 65536 < world64k.bin > world32k.bin
txtiles 5 6378.140 65536 2.5 < world64k.bin
nvdxt -quality_highest -file *.ppm -nomipmap -dxt5nm
ren *.dds *.dxt5nm
del /q world64k.bin
del /q *.ppm
mkdir "Earth Surface"
mkdir level5
move *.dxt5nm level5
move level5 "Earth Surface"

halfsize_rgb 32768 < world32k.bin > world16k.bin
txtiles 4 6378.140 32768 2.5 < world32k.bin
nvdxt -quality_highest -file *.ppm -nomipmap -dxt5nm
ren *.dds *.dxt5nm
del /q world32k.bin
del /q *.ppm
mkdir level4
move *.dxt5nm level4
move level4 "Earth Surface"

halfsize_rgb 16384 < world16k.bin > world8k.bin
txtiles 3 6378.140 16384 2.5 < world16k.bin
nvdxt -quality_highest -file *.ppm -nomipmap -dxt5nm
ren *.dds *.dxt5nm
del /q world16k.bin
del /q *.ppm
mkdir level3
move *.dxt5nm level3
move level3 "Earth Surface"

halfsize_rgb 8192 < world8k.bin > world4k.bin
txtiles 2 6378.140 8192 2.5 < world8k.bin
nvdxt -quality_highest -file *.ppm -nomipmap -dxt5nm
ren *.dds *.dxt5nm
del /q world8k.bin
del /q *.ppm
mkdir level2
move *.dxt5nm level2
move level2 "Earth Surface"

halfsize_rgb 4096 < world4k.bin > world2k.bin
txtiles 1 6378.140 4096 2.5 < world4k.bin
nvdxt -quality_highest -file *.ppm -nomipmap -dxt5nm
ren *.dds *.dxt5nm
del /q world4k.bin
del /q *.ppm
mkdir level1
move *.dxt5nm level1
move level1 "Earth Surface"

txtiles 0 6378.140 2048 2.5 < world2k.bin
nvdxt -quality_highest -file *.ppm -nomipmap -dxt5nm
ren *.dds *.dxt5nm
del /q world2k.bin
del /q *.ppm
mkdir level0
move *.dxt5nm level0
move level0 "Earth Surface"
move "Earth Surface" hires

rem Generating the ctx file for dxt5nm tiles.
echo VirtualTexture {> ctx.1
echo    ImageDirectory "Earth Surface"> ctx.2
echo    BaseSplit 0> ctx.3
echo    TileSize 1024> ctx.4
echo    TileType "png"> ctx.5
echo }> ctx.6

type ctx.1 > type ctx.2 > type ctx.3 > type ctx.4 > type ctx.5 > ctx.6 > "Earth Surface.ctx"
del ctx.*
rem Done generating ctx file.
goto end

:answer2
echo Option not yet available.
goto exit
cls
echo.
echo.
echo This will generate a set of PNG Surface textures from level 5 to level 0.
echo (x.xxx.xxx.xxx bytes)
echo.
echo.
echo Preparing 64k RAW image from Nasa - world.200406.3x86400x43200.bin.gz.
echo.
echo --------------------------------------------------------------------------------------
gzip -dc < world.200406.3x86400x43200.bin.gz | resc2pow2_rgb 86400 1 > world64k.bin
halfsize_rgb 65536 < world64k.bin > world32k.bin
txtiles 5 6378.140 65536 2.5 < world64k.bin
nconvert -out png *.ppm
del /q world64k.bin
del /q *.ppm
mkdir "Earth Surface"
mkdir level5
move *.png level5
move level5 "Earth Surface"

halfsize_rgb 32768 < world32k.bin > world16k.bin
txtiles 4 6378.140 32768 2.5 < world32k.bin
nconvert -out png *.ppm
del /q world32k.bin
del /q *.ppm
mkdir level4
move *.png level4
move level4 "Earth Surface"

halfsize_rgb 16384 < world16k.bin > world8k.bin
txtiles 3 6378.140 16384 2.5 < world16k.bin
nconvert -out png *.ppm
del /q world16k.bin
del /q *.ppm
mkdir level3
move *.png level3
move level3 "Earth Surface"

halfsize_rgb 8192 < world8k.bin > world4k.bin
txtiles 2 6378.140 8192 2.5 < world8k.bin
nconvert -out png *.ppm
del /q world8k.bin
del /q *.ppm
move *.png level2
move level2 "Earth Surface"

halfsize_rgb 4096 < world4k.bin > world2k.bin
txtiles 1 6378.140 4096 2.5 < world4k.bin
nconvert -out png *.ppm
del /q world4k.bin
del /q *.ppm
mkdir level1
move *.png level1
move level1 "Earth Surface"

txtiles 0 6378.140 2048 2.5 < world2k.bin
nconvert -out png *.ppm
del /q world2k.bin
del /q *.ppm
mkdir level0
move *.png level0
move level0 "Earth Surface"
move "Earth Surface" hires

rem Generating the ctx file for tiles.
echo VirtualTexture {> ctx.1
echo    ImageDirectory "Earth Surface"> ctx.2
echo    BaseSplit 0> ctx.3
echo    TileSize 1024> ctx.4
echo    TileType "png"> ctx.5
echo }> ctx.6

type ctx.1 > type ctx.2 > type ctx.3 > type ctx.4 > type ctx.5 > ctx.6 > "Earth Surface.ctx"
del ctx.*
rem Done generating ctx file.
goto end

:answer3
cls
echo.
echo.
echo This will generate a set of dxt5nm Normalmaps from level 5 to level 0.
echo (1.480.691.760 bytes)
echo.
echo.
echo Preparing 64k RAW image from Nasa - srtm_ramp2.world.86400x43200.bin.gz.
echo.
echo --------------------------------------------------------------------------------------
gzip -dc < srtm_ramp2.world.86400x43200.bin.gz | resc2pow2 86400 1 > world64k.bin
nmstiles 5 6378.140 65536 2.5 < world64k.bin
nvdxt -quality_highest -file *.ppm -nomipmap -dxt5nm
ren *.dds *.dxt5nm
del /q world64k.bin
del /q *.ppm
mkdir "Earth Normal"
mkdir level5
move *.dxt5nm level5
move level5 "Earth Normal"

halfsize 32768 < world32k.bin > world16k.bin
nmstiles 4 6378.140 32768 2.5 < world32k.bin
nvdxt -quality_highest -file *.ppm -nomipmap -dxt5nm
ren *.dds *.dxt5nm
del /q world32k.bin
del /q *.ppm
mkdir level4
move *.dxt5nm level4
move level4 "Earth Normal"

halfsize 16384 < world16k.bin > world8k.bin
nmstiles 3 6378.140 16384 2.5 < world16k.bin
nvdxt -quality_highest -file *.ppm -nomipmap -dxt5nm
ren *.dds *.dxt5nm
del /q world16k.bin
del /q *.ppm
mkdir level3
move *.dxt5nm level3
move level3 "Earth Normal"

halfsize 8192 < world8k.bin > world4k.bin
nmstiles 2 6378.140 8192 2.5 < world8k.bin
nvdxt -quality_highest -file *.ppm -nomipmap -dxt5nm
ren *.dds *.dxt5nm
del /q world8k.bin
del /q *.ppm
mkdir level2
move *.dxt5nm level2
move level2 "Earth Normal"

halfsize 4096 < world4k.bin > world2k.bin
nmstiles 1 6378.140 4096 2.5 < world4k.bin
nvdxt -quality_highest -file *.ppm -nomipmap -dxt5nm
ren *.dds *.dxt5nm
del /q world4k.bin
del /q *.ppm
mkdir level1
move *.dxt5nm level1
move level1 "Earth Normal"

nmstiles 0 6378.140 2048 2.5 < world2k.bin
nvdxt -quality_highest -file *.ppm -nomipmap -dxt5nm
ren *.dds *.dxt5nm
del /q world2k.bin
del /q *.ppm
mkdir level0
move *.dxt5nm level0
move level0 "Earth Normal"

echo.
echo Generating directory structure.
echo.
move "Earth Normal" hires

rem Generating the ctx file for dxt5nm tiles.
echo VirtualTexture {> ctx.1
echo    ImageDirectory "Earth Normal"> ctx.2
echo    BaseSplit 0> ctx.3
echo    TileSize 1024> ctx.4
echo    TileType "dxt5nm"> ctx.5
echo }> ctx.6

type ctx.1 > type ctx.2 > type ctx.3 > type ctx.4 > type ctx.5 > ctx.6 > "Earth Normal.ctx"
del ctx.*
rem Done generating ctx file.
goto end

:answer4
cls
echo.
echo.
echo This will generate a set of PNG Normalmaps from level 5 to level 0.
echo (904.969.477 bytes)
echo.
echo.
echo Preparing 64k RAW image from Nasa - srtm_ramp2.world.86400x43200.bin.gz.
echo.
echo --------------------------------------------------------------------------------------
gzip -dc < srtm_ramp2.world.86400x43200.bin.gz | resc2pow2 86400 1 > world64k.bin
halfsize 65536 < world64k.bin > world32k.bin
nmstiles 5 6378.140 65536 2.5 < world64k.bin
nconvert -out png *.ppm
del /q world64k.bin
del /q *.ppm
mkdir "Earth Normal"
mkdir level5
move *.png level5
move level5 "Earth Normal"

halfsize 32768 < world32k.bin > world16k.bin
nmstiles 4 6378.140 32768 2.5 < world32k.bin
nconvert -out png *.ppm
del /q world32k.bin
del /q *.ppm
mkdir level4
move *.png level4
move level4 "Earth Normal"

halfsize 16384 < world16k.bin > world8k.bin
nmstiles 3 6378.140 16384 2.5 < world16k.bin
nconvert -out png *.ppm
del /q world16k.bin
del /q *.ppm
mkdir level3
move *.png level3
move level3 "Earth Normal"

halfsize 8192 < world8k.bin > world4k.bin
nmstiles 2 6378.140 8192 2.5 < world8k.bin
nconvert -out png *.ppm
del /q world8k.bin
del /q *.ppm
mkdir level2
move *.png level2
move level2 "Earth Normal"

halfsize 4096 < world4k.bin > world2k.bin
nmstiles 1 6378.140 4096 2.5 < world4k.bin
nconvert -out png *.ppm
del /q world4k.bin
del /q *.ppm
mkdir level1
move *.png level1
move level1 "Earth Normal"

nmstiles 0 6378.140 2048 2.5 < world2k.bin
nconvert -out png *.ppm
del /q world2k.bin
del /q *.ppm
mkdir level0
move *.png level0
move level0 "Earth Normal"
move "Earth Normal" hires

rem Generating the ctx file for PNG tiles.
echo VirtualTexture {> ctx.1
echo    ImageDirectory "Earth Normal"> ctx.2
echo    BaseSplit 0> ctx.3
echo    TileSize 1024> ctx.4
echo    TileType "png"> ctx.5
echo }> ctx.6

type ctx.1 > type ctx.2 > type ctx.3 > type ctx.4 > type ctx.5 > ctx.6 > "Earth Normal.ctx"
del ctx.*
rem Done generating ctx file.
goto end

:answer5
echo.
echo Script terminated without generating any tiles.
goto exit

:end
mkdir hires
move "Earth Normal.ctx" hires
mkdir textures
move hires textures
mkdir Earth
move textures Earth

rem Generating the ssc file.
echo AltSurface "Earth" "Sol/Earth" {> ssc.1
echo    Texture "Earth Surface.ctx"> ssc.2
echo   NightTexture "Earth Night.ctx"
echo    NormalMap "Earth Normal.ctx"> ssc.3
echo }> ssc.4

type ssc.1 > type ssc.2 > type ssc.3 > type ssc.4 > Earth.ssc
del ssc.*
rem Done generating ssc file.
move Earth.ssc Earth

echo.
echo VT's successfully generated.
echo.
echo ---------------------------------------------------------------------------------------
echo.
echo             1: Generate another Surface texture or Normalmap
echo             2: Exit Script
echo.
echo ---------------------------------------------------------------------------------------
choice /c 12 /N /m "Your choice:"
if not errorlevel=2 goto start
echo done!
:exit
prompt $p$g


If you can't generate the tiles now I'm afraid that your are on your own...
I feel like I'm trapped in the twilightzone or have tunned in to what looks like the never ending story 3. 8O

I am also a enduser, so this can be done... And it is really easy too..
8)

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

Post #129by danielj » 21.04.2007, 22:53

I??m doing my best.
The problem is with my prompt-c.
Things gets worse:
"If you have missing files you can??t generate the Surface Textures or Normal Maps
world.200406.3x86400x43200.bin.gz RAW file is missing.
txtiles.exe is missing,can??t generate Surface Textures.
resc2pow2_rgb.exe is missing,RAW file can??t be transformed to surface textures.
halfsize_rgb.exe is missing,RAW file can??t be resized for surface textures

Please select what kind of tiles you want to generate
Surface Textures Level 0 to 5 NormalMap Level 0 to 5
1:future surface tiles 3:dxt5nm tiles
2:future PNG tiles 4:PNG tiles
5:Exit Script

Choice is not recognizable as an internal or external command,an operational programm or a file in specified batches-answer 9009

I have all the files in C:\Program Files\vtgen plus halfsize,nmstiles,nms and resc2pow2 in PDB format.
The texture file is in a Winzip file...

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

Post #130by danielj » 22.04.2007, 15:54

I am ashamed to admit this,but could the problem be that my Windows is not original and so the prompt-c don??t work very well?


danielj wrote:I??m doing my best.
The problem is with my prompt-c.
Things gets worse:
"If you have missing files you can??t generate the Surface Textures or Normal Maps
world.200406.3x86400x43200.bin.gz RAW file is missing.
txtiles.exe is missing,can??t generate Surface Textures.
resc2pow2_rgb.exe is missing,RAW file can??t be transformed to surface textures.
halfsize_rgb.exe is missing,RAW file can??t be resized for surface textures

Please select what kind of tiles you want to generate
Surface Textures Level 0 to 5 NormalMap Level 0 to 5
1:future surface tiles 3:dxt5nm tiles
2:future PNG tiles 4:PNG tiles
5:Exit Script

Choice is not recognizable as an internal or external command,an operational programm or a file in specified batches-answer 9009

I have all the files in C:\Program Files\vtgen plus halfsize,nmstiles,nms and resc2pow2 in PDB format.
The texture file is in a Winzip file...

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

Post #131by tech2000 » 22.04.2007, 16:37

danielj wrote:I am ashamed to admit this,but could the problem be that my Windows is not original and so the prompt-c don??t work very well?


No that has nothing to do with it, redownload vtgen.bat since it has been updated and try again.

But the error 9009 you see, well, maybe you do need to reinstall your system.

Best of luck. :roll:

TERRIER
Posts: 717
Joined: 29.04.2003
With us: 21 years 6 months
Location: West Yorkshire, England

Post #132by TERRIER » 23.04.2007, 07:09

Hello tech2000 and DanielJ

I am wondering if Daniel's problem is with the "CHOICE" command in the script.

ie

Code: Select all

choice /c 12345 /N /m "Your choice:"
goto answer%errorlevel%

I'm not sure all versions of Windows XP has the CHOICE command available.

The alternative could be as follows;

Code: Select all

set /p userinp=choose a number(1-5):
set userinp=%userinp:~0,1%
if "%userinp%"=="1" goto answer1
if "%userinp%"=="2" goto answer2
if "%userinp%"=="3" goto answer3
if "%userinp%"=="4" goto answer4
if "%userinp%"=="5" goto answer5


Hope this helps :?:

regards,
TERRIER
1.6.0:AMDAth1.2GHz 1GbDDR266:Ge6200 256mbDDR250:WinXP-SP3:1280x1024x32FS:v196.21@AA4x:AF16x:IS=HQ:T.Buff=ON Earth16Kdds@15KkmArctic2000AD:FOV1:SPEC L5dds:NORM L5dxt5:CLOUD L5dds:
NIGHT L5dds:MOON L4dds:GALXY ON:MAG 15.2-SAP:TIME 1000x:RP=OGL2:10.3FPS

bh
Posts: 1547
Joined: 17.12.2002
With us: 21 years 11 months
Location: Oxford, England

Post #133by bh » 23.04.2007, 07:23

TERRIERs back... hello!
regards...bh.

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

Post #134by danielj » 23.04.2007, 12:06

Yes,my Windows XP recognizes the command "set",but the problem is another.
The system is not "reading" the nmstiles.exe,nms.exe and the others .exe and insists that I need the file world.200406.3x86400x43200.bin.gz.I will try to keep the files in the original places and disasemble the folder vtgen,to see if it works.
Other thing:exactly how to use the set program?I write the "script",the prompt-c recognized it,but did nothing with it...



TERRIER wrote:Hello tech2000 and DanielJ

I am wondering if Daniel's problem is with the "CHOICE" command in the script.

ie

Code: Select all

choice /c 12345 /N /m "Your choice:"
goto answer%errorlevel%

I'm not sure all versions of Windows XP has the CHOICE command available.

The alternative could be as follows;

Code: Select all

set /p userinp=choose a number(1-5):
set userinp=%userinp:~0,1%
if "%userinp%"=="1" goto answer1
if "%userinp%"=="2" goto answer2
if "%userinp%"=="3" goto answer3
if "%userinp%"=="4" goto answer4
if "%userinp%"=="5" goto answer5


Hope this helps :?:

regards,
TERRIER

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

Post #135by tech2000 » 23.04.2007, 12:55

I have removed the "if not exist world.200406.3x86400x43200.bin.gz echo world.200406.3x86400x43200.bin.gz is missing, no RAW file for Surface textures." since that was to confusing for Daniel. Download the vtgen.bat again and give it a new try...

Anders

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

Post #136by steffens » 23.04.2007, 14:45

danielj wrote:NO,I mean .bin.
Oh,no.Maybe the problem is that I shouldn??t unzipped and because of this,the script went crazy?

tech2000 wrote:
danielj wrote:"srtm_ramp2.world.86400x43200.bin"

I really hope you mean: srtm_ramp2.world.86400x43200.bin.gz

Bye.

Internet Explorer is known to mess up file name extensions on download, so maybe the file is the right one, but was renamed while downloading.

Check the size of the file, it should be 1.237.539 KB
If that's correct, just rename it and append the ".gz"

steffens

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

Post #137by steffens » 23.04.2007, 15:11

One more remark about this fine script:
You are using the following code to convert the tiles to dxt5nm format

Code: Select all

nvdxt -quality_highest -file *.ppm -nomipmap -dxt5nm

Maybe it would be a good idea to skip the -nomipmap parameter for level0, as this would improve performance when watching the planet from far away.

Code: Select all

nvdxt -quality_highest -file *.ppm -dxt5nm


steffens

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

Post #138by tech2000 » 23.04.2007, 17:21

steffens wrote:One more remark about this fine script:
You are using the following code to convert the tiles to dxt5nm format

Code: Select all

nvdxt -quality_highest -file *.ppm -nomipmap -dxt5nm

Maybe it would be a good idea to skip the -nomipmap parameter for level0, as this would improve performance when watching the planet from far away.

Code: Select all

nvdxt -quality_highest -file *.ppm -dxt5nm


steffens

Hi Steffens.

Cool to see that someone can do tiles with it.. :wink: any more suggestions of how to improve it?

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:

Regards, Anders

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

Post #139by danielj » 24.04.2007, 01:39

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...

bh
Posts: 1547
Joined: 17.12.2002
With us: 21 years 11 months
Location: Oxford, England

Post #140by bh » 24.04.2007, 06:46

Crikey! Well done. :D
regards...bh.


Return to “Celestia Users”