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.
I am also a enduser, so this can be done... And it is really easy too..