Page 2 of 5

Re: Latest mapconv, download here.

Posted: 05 Jan 2010, 01:26
by Beherith
To get good compression, set 7zip to ultra.

But to get big lossy compression, set c to a value higher than 1. its not limited to 0-1. Can go way higher, will look bad though.

Also, use the -l switch (lowpass filter enable) if your using a bmp heightmap and a heightdiff of >256.

Re: Latest mapconv, download here.

Posted: 05 Jan 2010, 08:15
by Das Bruce
Ok, so max height int, min height int, output/texture/heightmap/metalmap/featuremap strings, quality radio buttons, lowpass filter tickbox
What is the range of values for compression? What are the other options?

Re: Latest mapconv, download here.

Posted: 05 Jan 2010, 08:31
by Cheesecan
Beherith: What does your lowpass filtering do exactly? Gaussian blur?

DasBruce: I take it you are coding a GUI frontend for it? Good man! Just don't forget the tooltips..

Re: Latest mapconv, download here.

Posted: 05 Jan 2010, 10:48
by Das Bruce
Cheesecan wrote:DasBruce: I take it you are coding a GUI frontend for it? Good man! Just don't forget the tooltips..
Well I made one years ago while learning the win32 API but never released it, since then I've pretty much forgotten everything I learned so this seemed like a good chance to refresh.

Re: Latest mapconv, download here.

Posted: 05 Jan 2010, 11:01
by Beherith
Lowpass is gaussian blur, C shouldnt be above 2, so max it at 4.

USAGE:

mapconv [-j <feature list file>] [-f <featuremap image>] [-r] [-s] [-l]
[-q] [-i] [-z <texcompress program>] [-c <compression>] -x <max
height> -n <min height> [-o <output .smf>] [-e <tile file>] [-g
<Geovent image>] [-y <typemap image>] -m <metalmap image> -a
<heightmap file> -t <texturemap file> [--] [-v] [-h]


Where:

-j <feature list file>, --featurelist <feature list file>
(value required) A file with the name of one feature on each line.
(Default: fs.txt). See README.txt for details.

-f <featuremap image>, --featuremap <featuremap image>
(value required) Feature placement file, must be xsize by ysize. See
README.txt for details.

-l, --lowpass
Lowpass filters the heightmap. Uses a 5x5 gaussian kernel.

-q, --use_nvcompress
Use NVCOMPRESS.EXE tool for ultra fast CUDA compression. Needs Geforce
8 or higher nvidia card.

-i, --invert
Flip the height map image upside-down on reading.

-z <texcompress program>, --texcompress <texcompress program>
(value required) Name of companion program texcompress from current
working directory.

-c <compression>, --compress <compression>
(value required) How much we should try to compress the texture map.
Default 0.8, lower -> higher quality, larger files.

-x <max height>, --maxheight <max height>
(required) (value required) What altitude in spring the max(0xff or
0xffff) level of the height map represents.

-n <min height>, --minheight <min height>
(required) (value required) What altitude in spring the min(0) level
of the height map represents.

-o <output .smf>, --outfile <output .smf>
(value required) The name of the created map file. Should end in
.smf. A tilefile (extension .smt) is also created.

-e <tile file>, --externaltilefile <tile file>
(value required) External tile file that will be used for finding
tiles. Tiles not found in this will be saved in a new tile file.

-g <Geovent image>, --geoventfile <Geovent image>
(value required) The decal for geothermal vents; appears on the
compiled map at each vent. (Default: geovent.bmp).

-y <typemap image>, --typemap <typemap image>
(value required) Type map to use, uses the red channel to decide
type. types are defined in the .smd, if this argument is skipped the
map will be all type 0. Size should be xsize/2 ysize/2

-m <metalmap image>, --metalmap <metalmap image>
(required) (value required) Metal map to use, red channel is amount
of metal. Resized to xsize / 2 by ysize / 2.

-a <heightmap file>, --heightmap <heightmap file>
(required) (value required) Input heightmap to use for the map, this
should be in 16 bit raw format (.raw extension, 16 bit, intel byte order, 1 channel.) or an image file. Must
be xsize+1 by ysize+1.

-t <texturemap file>, --intex <texturemap file>
(required) (value required) Input bitmap to use for the map. Sides
must be multiple of 1024 long. xsize, ysize determined from this file:
xsize = intex width / 8, ysize = height / 8.

--, --ignore_rest
Ignores the rest of the labeled arguments following this flag.

-v, --version
Displays version information and exits.

-h, --help
Displays usage information and exits.

Experimental options: (not in main yet)
-r <0-255>
Randomly rotate features that are red above this number. (extremely useful for non default trees)

-s
Just the smf file, reuse old smt. (You only need to compile texture once, makes tweaking faster)

Re: Latest mapconv, download here.

Posted: 05 Jan 2010, 11:22
by Beherith
Cheesecan wrote:Your posts in this thread say:
Slow, great quality:
MapConv -i -c 0 -x 250 -n 25 -o Zion_v1.smf -t t.bmp -a h.raw -m m.bmp -f f.bmp
I tried the 1st one and it gave PARSE error. So maybe you should correct that. I'm still having problems getting compression with any setting using your mapconv..
I tested this, and there was no error for me. What was the parse error it threw for you?

Re: Latest mapconv, download here.

Posted: 05 Jan 2010, 11:47
by Das Bruce
What is tile file? I thought that was generated by the mapconv?

Re: Latest mapconv, download here.

Posted: 05 Jan 2010, 11:57
by Beherith
Not sure, havent seen anyone use it, but ill find out.

Re: Latest mapconv, download here.

Posted: 07 Jan 2010, 09:35
by Das Bruce
/edit/ on closer inspection it seems to work

Re: Latest mapconv, download here.

Posted: 07 Jan 2010, 11:33
by Beherith

Code: Select all

S:\finally>MapConv  -i -c -1 -x 1000 -n -100 -o "Quoth_v2.smf" -m qm.bmp -t qt4.
bmp -a qh.raw -f qf.bmp -y qtype.bmp -r -e Quoth_v2.smt
Loading texture
Creating height map
Creating features

Feature Type6 at:497:227
Does nothing: red f1 at X 665 Y 227 (put more lines in fs.txt?)
Feature Type12 at:264:228
Does nothing: red f1 at X 273 Y 228 (put more lines in fs.txt?)
Feature Type11 at:1064:228
Geo at:651:338 Ôÿ║
...
Feature Type6 at:207:1138
Feature Type10 at:327:1145
Grass Placement:
Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗
Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗
Ôÿ╗Ôÿ╗
...
Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗Ôÿ╗



Options are: -q: 0 compressstring: nvdxt.exe -nmips 5 -dxt1a -Sinc -file
A subdirectory or file temp already exists.
Loading 82944 tiles from Quoth_v2.smt
Writing tga files 1%
...
Writing tga files 100%
Creating dds files
nvdxt.exe -nmips 5 -dxt1a -Sinc -file temp/Temp*.tga
Version 8.30
    Reading temp\Temp000.tga  [Processing] Writing .\Temp000.dds
    Reading temp\Temp001.tga  [Processing] Writing .\Temp001.dds
 ...
    Reading temp\Temp079.tga  [Processing] Writing .\Temp079.dds
    Reading temp\Temp080.tga  [Processing] Writing .\Temp080.dds
creating minimap
Version 8.30
    Reading mini.bmp  [Processing] Writing .\mini.dds
Creating tiles 1024/1024 1%
Creating tiles 2048/2048 2%
Creating tiles 3072/3072 3%
...
Creating tiles 80896/80896 97%
Creating tiles 81920/81920 98%
Creating tiles 82944/82944 100%
Saving metal map
Writing 493 features

S:\finally>pause
Press any key to continue . . .
is normal

Re: Latest mapconv, download here.

Posted: 07 Jan 2010, 12:44
by Das Bruce
Ah yes, having a map with more than one tile appears to give more interesting results.
Thanks.

Re: Latest mapconv, download here.

Posted: 11 Jan 2010, 02:06
by Beherith
added -r option to randomly rotate specified features,
also rotates default spring trees by itself now.

Re: Latest mapconv, download here.

Posted: 11 Jan 2010, 13:21
by Beherith
Added feature rotation support:

-r [number 0 to 255] randomly rotate the first "number" features in featurelist (fs.txt by default).

Since first feature in fs.txt is number 255 red on feature bitmap.

In fs.txt:
You can specify a number between -32768 to 32767 to specify the rotation amount of that feature.

Multiple definitions allowed. 16384 is 90 deg counterclockwise rotatio, 8192 is 45 deg counterclockwise, -16384 is 90 deg clockwise.
Example fs.txt:

btreeclo-3
btreeclo-3 0
btreeclo-3 8000
btreeclo-3 16000
btreeclo-3 24000
btreeclo-3 32000
btreeclo-3 -8000
btreeclo-3 -16000
btreeclo-3 -24000
btreeclo-3 -32000
btreeclo-3

Re: Latest mapconv, download here.

Posted: 12 Jan 2010, 19:10
by Masse
I can't find download link for the mapconv.

Re: Latest mapconv, download here.

Posted: 13 Jan 2010, 04:53
by Beherith
Ah, added the link.
Also, specifying -1 in the fs.txt will also result in the feature getting random rotation.

Re: Latest mapconv, download here.

Posted: 15 Jan 2010, 09:07
by Das Bruce
How does this look?
Image

Re: Latest mapconv, download here.

Posted: 15 Jan 2010, 11:21
by Beherith
Looks absolutely awesome! Thank you.

Could you check invert and lowpass by default? With invert checked, black is the lowest part of the terrain, and thats the norm, and lowpass is needed since alot of people still use .bmp heightmaps.

Re: Latest mapconv, download here.

Posted: 15 Jan 2010, 11:30
by Das Bruce
Done, what formats can the various files be in other than .bmp?

Re: Latest mapconv, download here.

Posted: 15 Jan 2010, 11:40
by Beherith
Good question, only heightmap has 16 bit support for sure, all the others are .bmp recommended, strictly 8 bit 3-4 channel.
The texture map supports alpha channels, when used in combination with the viodwater smd tag it will result in transparent terrain.
Basically every 3 channel 8bit image format is accepted by mapconv (it uses DevIL) but practically it could be limited to bmp. png, tga, jpg and the occasional .raw.

Re: Latest mapconv, download here.

Posted: 15 Jan 2010, 11:58
by Das Bruce
So much for an early night. 8)