newbie VT question
newbie VT question
i have read the VT for dummies and had a problem doing the set in installing of Netpbm in Cygwin
i have a big old new CPU with nothing for it to do so lets play with images i have a 1.9 GB pic from nasa of mercury-Morphology Mosaic (from space images ) and id like to crunch it into a VT but again the directions from VT dummies isnt working .. im hoping there is an alternative now in 2017 that there wasnt when vt for dummies was wrote
i have a big old new CPU with nothing for it to do so lets play with images i have a 1.9 GB pic from nasa of mercury-Morphology Mosaic (from space images ) and id like to crunch it into a VT but again the directions from VT dummies isnt working .. im hoping there is an alternative now in 2017 that there wasnt when vt for dummies was wrote
These days doing everything in Imagemagick (or a variant) is more appropriate than trying to use netpbm, I think. I'll try to remember to update the intro description of VTs RealSoonNow.
Here's a bash script that I used recently (under Cygwin) to cut a single image into pieces for a level. It was developed by Fridger Schrempp long ago. He's also written more efficient software to do the job, but I was more comfortable using this.
Here's a bash script that I used recently (under Cygwin) to cut a single image into pieces for a level. It was developed by Fridger Schrempp long ago. He's also written more efficient software to do the job, but I was more comfortable using this.
Code: Select all
#! /usr/bin/sh
if [ $# -lt 3 -o "$1" = "--help" ]; then
echo
echo 'Usage: virtualtex [--help | <texture name> <tile size> <tile format>] [e|E|w|W]'
echo
echo
echo The shell script \'virtualtex\' is a tool for Celestia \> 1.3.0
echo that supports \'virtual textures\'.
echo
echo The script generates the required tiles tx_i_j of \
desired \(square\) size,
echo \<tile size\>, in a specified format, \<tile format\> = \
png, tga, jpg,...,
echo from an input texture, \<texture name\>, in any popular graphics format.
echo
echo The optional 4th argument e\|E\|w\|W is for the case of tiling
echo square /e/astern \| /w/estern halfes of the full texture separately!
echo
echo Besides Linux/Unix, the script also runs in a current Cygwin \
installation
echo under Windows, \( http://www.cygwin.com \). If the z-shell \(\'zsh\'\) \
is unavailable,
echo it also may be executed with the \'bash\' shell, by replacing \
\#\! /usr/bin/zsh by
echo \#\! /bin/bash in the first line.
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 utilities \'convert\' and \'identify\' of that package are used.
echo
echo You may increase the pixel cache size \$maxmem from the 80 MB default
echo value to e.g. 80\% of your RAM size within the script with an editor.
echo This will speed up the performance of \'virtualtex\' considerably.
echo
echo On a PIII/512MB RAM the tiling of a 16k x 8k texture into
echo 32 \(2k x 2k\) tiles now only takes 15 minutes with a Linux OS!
echo
echo Author: Dr. Fridger Schrempp, fridger.schrempp@desy.de
echo Version: 1.04, 02/15/05
echo
else
maxmem=8000
texturesize=`identify -format "%wx%h" $1`
texturewidth=`identify -format "%w" $1`
textureheight=`identify -format "%h" $1`
tilesize=$2
tileformat="$3"
echo
echo "Texture size = " $texturewidth "x" $textureheight "tilesize = " $tilesize
echo "Number of tiles =" $(( ((texturewidth/tilesize)) * ((textureheight/tilesize)) ))
echo "Image format of tiles:" $tileformat
echo
echo "Tile: "
echo
convert -cache $maxmem -define dds:compression=dxt1 -crop ${tilesize}x${tilesize} $1 out%d.$tileformat
j=0
while (( j * tilesize + tilesize <= textureheight )); do
((offy = j * tilesize))
if [ $# -eq 4 ]; then
if [ "$4" = "e" -o "$4" = "E" ]; then
ioff=$(( texturewidth/tilesize ))
elif [ "$4" = "w" -o "$4" = "W" ]; then
ioff=0
else
echo
echo "*** Incorrect 4th parameter! ***"
echo
return
fi
fi
i=0
while (( i * tilesize + tilesize <= texturewidth )); do
((offx = i * tilesize))
echo "tx_"$((i + ioff))"_"${j}": x-offset:" $((offx + ioff * tilesize)) "y-offset:" $offy
mv out$((i+ ((texturewidth/tilesize)) * j)).$tileformat tx_$((i + ioff))_${j}.$tileformat
((i++))
done
((j++))
done
fi
Selden
15 years later and we are still using Linux software in windows? i would have thought there would have been a windows alt i have never been able to run anything linux in windows besides Celestia itself i have DLed the nmtools and f-tex tool and they dont even work at all .. they open and then close right away and imahemagick wont even open the picture im trying to open
i open imagemagick and the try to open the pic i downloaded and it stops responding so it wont even open the image
(MDIS_Monochrome_20170512_PDS16_256ppd_equirectangular.png - 2GB file)
isnt there a program that isnt text/dos liked based you open the pic click VT put in the level settings weater it be 1 2 3 4 ect and then put in the base number for level 0 2 tiles 4 tiles ect ??
(MDIS_Monochrome_20170512_PDS16_256ppd_equirectangular.png - 2GB file)
isnt there a program that isnt text/dos liked based you open the pic click VT put in the level settings weater it be 1 2 3 4 ect and then put in the base number for level 0 2 tiles 4 tiles ect ??
Is that image available for downloading somewhere so I can test it?
PNG images are highly compressed, so the size of the file doesn't say anything about the amount of memory needed to process the image. I suspect your computer seems to hang because you don't have enough main memory, so ImageMagick will either page to disk or try to process the image using multiple disk files. That kind of processing is going to be *very* slow.
You do need to be running both a 64 bit version of Windows with at least 16GB of main memory.and a 64 bit version of ImageMagick. From the name of the file, I'm guessing you might also need to be using a version of ImageMagick which includes support for 16bit color channels.
Many GUI image processing software products can cut up images, but they don't give the pieces the names needed by Celestia. Photoshop can be used to cut images, for example. see http://srufaculty.sru.edu/david.dailey/graphics/photoslice.htm
ImageSplitter is an online service that can do it.
PNG images are highly compressed, so the size of the file doesn't say anything about the amount of memory needed to process the image. I suspect your computer seems to hang because you don't have enough main memory, so ImageMagick will either page to disk or try to process the image using multiple disk files. That kind of processing is going to be *very* slow.
You do need to be running both a 64 bit version of Windows with at least 16GB of main memory.and a 64 bit version of ImageMagick. From the name of the file, I'm guessing you might also need to be using a version of ImageMagick which includes support for 16bit color channels.
Many GUI image processing software products can cut up images, but they don't give the pieces the names needed by Celestia. Photoshop can be used to cut images, for example. see http://srufaculty.sru.edu/david.dailey/graphics/photoslice.htm
ImageSplitter is an online service that can do it.
Selden
http://messenger.jhuapl.edu/Explore/Images.html#global-mosaics
click
Global Mosaics
i only have 8 GB of ram but also have lots of V ram on HDD so im not worried about memory (i fig if i could make a mosaic in Photoshop that ends up to be a 8 GB file and i did it one a quadcore with 4 gb of ram im good being i have double the ram and a hex core now)
yes 64 bit everything is being used
click
Global Mosaics
i only have 8 GB of ram but also have lots of V ram on HDD so im not worried about memory (i fig if i could make a mosaic in Photoshop that ends up to be a 8 GB file and i did it one a quadcore with 4 gb of ram im good being i have double the ram and a hex core now)
yes 64 bit everything is being used
I couldn't find the image that you listed, so I downloaded
MDIS_LowIncidence_20170512_PDS16_256ppd_equirectangular.png
It's 1.98 GB so it should be close.
The image is 92,160 x 46,080 pixels, which causes two problems:
1. it needs to be scaled down or up so that it's a power of two on a side in order to be made into a VT: Either scale it down to 65536x32768 or up to 131072x65536. (i.e. down to 64Kx32K or up to 128Kx64K.)
2. The initial image is gigantic: 92160x46080 pixels x 4 bytes/pixel = 16,986,931,200 bytes. (i.e. ~16GB) If you don't have at least 3x that amount of RAM (i.e. ~48GB) , processing it is going to take an absurd amount of time with ImageMagick, because it needs to load the entire input and output images into RAM. Paging to disk will cause a dramatic slowdown, perhaps even as much as 1000x slower, taking milliseconds for operations to disk instead of microseconds for operations to memory.
In other words, this is a case where you must use Fridger's utilities. They process an image a single scan-lne at a time without needing to load the entire image into RAM for processing.
Sorry.
p.s. edited to fix the arithmetic: worse than I'd originally written.
MDIS_LowIncidence_20170512_PDS16_256ppd_equirectangular.png
It's 1.98 GB so it should be close.
The image is 92,160 x 46,080 pixels, which causes two problems:
1. it needs to be scaled down or up so that it's a power of two on a side in order to be made into a VT: Either scale it down to 65536x32768 or up to 131072x65536. (i.e. down to 64Kx32K or up to 128Kx64K.)
2. The initial image is gigantic: 92160x46080 pixels x 4 bytes/pixel = 16,986,931,200 bytes. (i.e. ~16GB) If you don't have at least 3x that amount of RAM (i.e. ~48GB) , processing it is going to take an absurd amount of time with ImageMagick, because it needs to load the entire input and output images into RAM. Paging to disk will cause a dramatic slowdown, perhaps even as much as 1000x slower, taking milliseconds for operations to disk instead of microseconds for operations to memory.
In other words, this is a case where you must use Fridger's utilities. They process an image a single scan-lne at a time without needing to load the entire image into RAM for processing.
Sorry.
p.s. edited to fix the arithmetic: worse than I'd originally written.
Last edited by selden on 29.03.2018, 10:33, edited 1 time in total.
Selden
- FarGetaNik
- Posts: 484
- Joined: 05.06.2012
- With us: 12 years 5 months
- Location: Germany
I also found myself stunned at the VT for dummies guide some years ago and could not get cygwin to work properly. I eventually got t00fri's texture tools to work and have been using them ever since, with the combination of other image prcessing tools like Nip2. I can only recomend to read and try to follow the instructions and forum discussions on virtual texture and nmtools. If there is a more convenient way to create them with Windows software let me know.
Anyways, my efforts included a Mercury 16k VT in truecolor and a 64k VT in greyscale. Let me know if you are interested, as I am hesitant to use my personal cloud storage to much on these texture monsters.
Anyways, my efforts included a Mercury 16k VT in truecolor and a 64k VT in greyscale. Let me know if you are interested, as I am hesitant to use my personal cloud storage to much on these texture monsters.
- FarGetaNik
- Posts: 484
- Joined: 05.06.2012
- With us: 12 years 5 months
- Location: Germany
CM1215 wrote:I'd been wondering if there was an available Mercury VT larger than 32k...and apparently there is. Could you put the grayscale 64k VT up for download? Because I may be able to use the BIMP plugin for GIMP to colorize it.
Ooh that'll be nice! Sorry for the late response, I was not home over the weekend. In that case, do you need the whole textures or just the VT tiles? I would imagine it'll be easier to work with the whole texture.
FarGetaNik wrote:In that case, do you need the whole textures or just the VT tiles? I would imagine it'll be easier to work with the whole texture.
I can use a template of the whole texture to figure out what colorization edits I will need (this template should be lower resolution than the original), then I can use the BIMP plugin (AKA the Batch Image Manipulation Plugin) to apply the same edits to all the tiles, one complete folder of tiles at a time.
So to answer your question, I will need a template of the whole texture at around 4k resolution, as well as all the VT tiles in their respective folders. Also, I will need an image of Mercury to use as a basis, so that I know what I should colorize the textures to look like. I used a similar method to apply colors to John Van Vliet's 128k Venus texture (that is, back when I still thought it was grayscale) as can be seen in this screenshot:
CM1215: Celestial master in learning.
- FarGetaNik
- Posts: 484
- Joined: 05.06.2012
- With us: 12 years 5 months
- Location: Germany
Oh so you plan on just tinting the texture in a monochrome color? That's a bit of a disappointment as I wanted to process the b&w texture in a way I did my 16k color texture and apply the coloring of that texture onto the larger one. I simply failed at the size of the texture as I can't possibly process that huge texture with the means I have. To get a realistic color you might just leave the texture monochrome and call it good as the endresult of carefull processing leaved me with this truecolor texture of mercury:
Although the brightness and contrast of the monochrome texture still deviate a lot from this one. I used this site as a color reference and I think I also considered a sprectrum but I'm not entirely sure anymore... But I will still upload the files in the meantime.
Although the brightness and contrast of the monochrome texture still deviate a lot from this one. I used this site as a color reference and I think I also considered a sprectrum but I'm not entirely sure anymore... But I will still upload the files in the meantime.
Actually, I may be able to process the 64k texture as a whole and apply the colors of that there reference image to the 64k texture using the same method you explained to me concerning the false-color Charon map. My computer is quite powerful, so it should be able to handle it. If that's what you're looking for, I may be able to do that.
CM1215: Celestial master in learning.
- FarGetaNik
- Posts: 484
- Joined: 05.06.2012
- With us: 12 years 5 months
- Location: Germany
Hm in that case, here is the whole 16k mercury truecolor texture.
I had a 8k copy of the greyscale map on my computer: https://drive.google.com/open?id=12PuL_s92Bfgg1bPeHfqNo2YlzRp3_PfI
And here the 64k VT: https://drive.google.com/open?id=1nPMO5N8In95V2eC_ULG63pSMfF9hbXKS
(It's a 1.29 GB zip monster! I want to clear that drive space as soon as you're done actually...)
I had a 8k copy of the greyscale map on my computer: https://drive.google.com/open?id=12PuL_s92Bfgg1bPeHfqNo2YlzRp3_PfI
And here the 64k VT: https://drive.google.com/open?id=1nPMO5N8In95V2eC_ULG63pSMfF9hbXKS
(It's a 1.29 GB zip monster! I want to clear that drive space as soon as you're done actually...)
I'm afraid that to use the method I mentioned above, I will need the entire texture as one file, so that I can apply the colorization to the entire texture at once. I have downloaded the grayscale VT that you put up for download, so you should be able to delete it off your drive now.
I will need the whole 64k texture as one file to use the method.
I will need the whole 64k texture as one file to use the method.
CM1215: Celestial master in learning.
- FarGetaNik
- Posts: 484
- Joined: 05.06.2012
- With us: 12 years 5 months
- Location: Germany
Ok thanks for letting me know. In that case, can you handle the original 92k texture?
If not I will upload my resized 64k texture.
If not I will upload my resized 64k texture.
After a long time and a ton of computer lag, I managed to colorize the 92k texture with the colors of your colorized texture. It honestly doesn't look very different from the original, but it DOES have the color.
Here is the download link: https://drive.google.com/open?id=1N6HhZu2ResYyd9QlGjY7vMYuiOHuOSKl
Also, would you be able to take the 92k and directly make it into a VT without shrinking it to 64k? If so, I would like to have a copy of this VT.
Here is the download link: https://drive.google.com/open?id=1N6HhZu2ResYyd9QlGjY7vMYuiOHuOSKl
Also, would you be able to take the 92k and directly make it into a VT without shrinking it to 64k? If so, I would like to have a copy of this VT.
CM1215: Celestial master in learning.
- FarGetaNik
- Posts: 484
- Joined: 05.06.2012
- With us: 12 years 5 months
- Location: Germany
Thank you! Currently downloading it.
I have to look into it. It's been a while since I made a VT so I'm not actually sure if there is a step involved that requires the textures to be a power of 2 in size. But reducing the file size by a a factor of 2 is usually a no-brainer for me... if we are talking about such huge textures.
CM1215 wrote:Also, would you be able to take the 92k and directly make it into a VT without shrinking it to 64k? If so, I would like to have a copy of this VT.
I have to look into it. It's been a while since I made a VT so I'm not actually sure if there is a step involved that requires the textures to be a power of 2 in size. But reducing the file size by a a factor of 2 is usually a no-brainer for me... if we are talking about such huge textures.