Hi all,
I am pleased to announce the
fourth update of the
F-TexTools, for making the greatest monster textures for
Celestia, directly from the scientific imaging data:
For download at
CelestialMatters
along with a binary
installer version for Windows users
which --as usual-- can be just installed by double-clicking the archive.
The main archive contains besides the sources, Makefiles and VS-2003.net project files, all the
binaries for Windows, MAC-OSX-Universal (PPC and Intel) and Linux!
The one-and-only change in this pre4 version is a new routine,
png2bin that may be very useful!
With it?€™s help, any .png textures can be converted to bpp x 8 bit integer binary format bpp=1,3,4), that is
supported by all other F-TexTools.
Here is a little motivating example:
Some of you may still own
Mario's@Space-Graphics.com great 32k Mars texture in lossless PNG format:
m46_color_32k.png. With the help of my new
png2bin routine you can generate in a bit more than only
3 minutes 512 highest quality 1k x 1k, polar optimized VT tiles of level 4 from that texture with this simple commandline:
Code: Select all
> png2bin < m46_color_32k.png|txtiles 3 32768 4
So here is the practical test output, including timing info:
Code: Select all
> time bash -c 'png2bin < m46_color_32k.png|txtiles 3 32768 4'
[png2bin]: Converting PNG format to binary output
bpp: 3 size: 32768 x 16384
[txtiles]: Input file is a 3x8 bit RGB color map: 32768 x 16384
Generating 512 optimized VT tiles for level 4
in PNG format,of size from 256 x 1024 to 1024 x 1024
PNG_compression level = 1 (range: 0..9)
bin [ 1024 rows of 16384 -> 1.38 s]
tile[ 32 VT's of 512 -> 2.31 s]
bin [ 2048 rows of 16384 -> 3.88 s]
tile[ 64 VT's of 512 -> 7.32 s]
bin [ 3072 rows of 16384 -> 6.55 s]
tile[ 96 VT's of 512 -> 16.82 s]
bin [ 4096 rows of 16384 -> 9.27 s]
tile[ 128 VT's of 512 -> 26.51 s]
bin [ 5120 rows of 16384 -> 12.05 s]
tile[ 160 VT's of 512 -> 36.48 s]
bin [ 6144 rows of 16384 -> 14.83 s]
tile[ 192 VT's of 512 -> 46.56 s]
bin [ 7168 rows of 16384 -> 17.63 s]
tile[ 224 VT's of 512 -> 56.67 s]
bin [ 8192 rows of 16384 -> 20.40 s]
tile[ 256 VT's of 512 -> 66.86 s]
bin [ 9216 rows of 16384 -> 23.23 s]
tile[ 288 VT's of 512 -> 77.15 s]
bin [ 10240 rows of 16384 -> 26.04 s]
tile[ 320 VT's of 512 -> 87.35 s]
bin [ 11264 rows of 16384 -> 28.86 s]
tile[ 352 VT's of 512 -> 97.20 s]
bin [ 12288 rows of 16384 -> 31.63 s]
tile[ 384 VT's of 512 -> 106.95 s]
bin [ 13312 rows of 16384 -> 34.37 s]
tile[ 416 VT's of 512 -> 116.57 s]
bin [ 14336 rows of 16384 -> 37.09 s]
tile[ 448 VT's of 512 -> 125.81 s]
bin [ 15360 rows of 16384 -> 39.65 s]
tile[ 480 VT's of 512 -> 130.84 s]
bin [ 16384 rows of 16384 -> 41.10 s]
tile[ 512 VT's of 512 -> 133.05 s]
bash -c 'png2bin < ../m46_color_32k.png|txtiles 3 32768 4' 168.69s user 5.49s system 88% cpu 3:17.02 total
Here are two nice tiles of the 512:
Click for a larger image (1024x1024):
![Image](http://celestialmatters.org/users/t00fri/images2/tx_25_8_small.jpg)
Click for a larger image (1024x1024):
![Image](http://celestialmatters.org/users/t00fri/images2/tx_15_9_small.jpg)
My new commandline tool
png2bin is strictly the
inverse of
bin2png. Here I check with my recent 16k Enceladus texture
http://forum.celestialmatters.org/viewtopic.php?t=100by first converting
PNG -> bin and back
bin -> PNG Code: Select all
> png2bin < enceladus16k.png|bin2png 3 16384 > out16k.png
[png2bin]: Converting PNG format to binary output
bpp: 3 size: 16384 x 8192
[bin2png]: Converting binary to PNG format output
bpp: 3 size: 16384 x 8192
bin [ 1024 rows of 8192 -> 0.77 s]
png [ 1024 rows of 8192 -> 12.37 s]
bin [ 2048 rows of 8192 -> 1.54 s]
png [ 2048 rows of 8192 -> 25.11 s]
bin [ 3072 rows of 8192 -> 2.40 s]
png [ 3072 rows of 8192 -> 37.45 s]
bin [ 4096 rows of 8192 -> 3.29 s]
png [ 4096 rows of 8192 -> 49.49 s]
bin [ 5120 rows of 8192 -> 4.12 s]
png [ 5120 rows of 8192 -> 61.61 s]
bin [ 6144 rows of 8192 -> 4.98 s]
png [ 6144 rows of 8192 -> 73.87 s]
bin [ 7168 rows of 8192 -> 5.87 s]
png [ 7168 rows of 8192 -> 84.72 s]
bin [ 8192 rows of 8192 -> 6.72 s]
png [ 8192 rows of 8192 -> 94.18 s]
The crucial check on the identity of the two PNG images is then done with the VERY useful tool from the new NVIDIA texture tools package:
> nvimgdiff enceladus16k.png out16k.png
Image size compared: 16384x8192
Total pixels: 134217728
Color:
Mean absolute error:
0.000000 <====
Great
Max absolute error: 0.000000
Root mean squared error: 0.000000
Peak signal to noise ratio in dB: 999.000000
Let me know how it goes...
Throughout, I want to cordially acknowledge active help by
Da Woon Jung <dirkpitt2050@users.sf.net> aka
dirkpitt aka
DW
Enjoy,
Fridger