Latest mapconv, download here. - Page 2

Latest mapconv, download here.

Tutorials & Resources For Mappers

Moderator: Moderators

User avatar
Beherith
Moderator
Posts: 4925
Joined: 26 Oct 2007, 16:21

Re: Latest mapconv, download here.

Post by Beherith » 05 Jan 2010, 01:26

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

User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: Latest mapconv, download here.

Post by Das Bruce » 05 Jan 2010, 08:15

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?
0 x

User avatar
Cheesecan
Posts: 1571
Joined: 07 Feb 2005, 21:30

Re: Latest mapconv, download here.

Post by Cheesecan » 05 Jan 2010, 08:31

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

User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: Latest mapconv, download here.

Post by Das Bruce » 05 Jan 2010, 10:48

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

User avatar
Beherith
Moderator
Posts: 4925
Joined: 26 Oct 2007, 16:21

Re: Latest mapconv, download here.

Post by Beherith » 05 Jan 2010, 11:01

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)
0 x

User avatar
Beherith
Moderator
Posts: 4925
Joined: 26 Oct 2007, 16:21

Re: Latest mapconv, download here.

Post by Beherith » 05 Jan 2010, 11:22

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?
0 x

User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: Latest mapconv, download here.

Post by Das Bruce » 05 Jan 2010, 11:47

What is tile file? I thought that was generated by the mapconv?
0 x

User avatar
Beherith
Moderator
Posts: 4925
Joined: 26 Oct 2007, 16:21

Re: Latest mapconv, download here.

Post by Beherith » 05 Jan 2010, 11:57

Not sure, havent seen anyone use it, but ill find out.
0 x

User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: Latest mapconv, download here.

Post by Das Bruce » 07 Jan 2010, 09:35

/edit/ on closer inspection it seems to work
0 x

User avatar
Beherith
Moderator
Posts: 4925
Joined: 26 Oct 2007, 16:21

Re: Latest mapconv, download here.

Post by Beherith » 07 Jan 2010, 11:33

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
0 x

User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: Latest mapconv, download here.

Post by Das Bruce » 07 Jan 2010, 12:44

Ah yes, having a map with more than one tile appears to give more interesting results.
Thanks.
0 x

User avatar
Beherith
Moderator
Posts: 4925
Joined: 26 Oct 2007, 16:21

Re: Latest mapconv, download here.

Post by Beherith » 11 Jan 2010, 02:06

added -r option to randomly rotate specified features,
also rotates default spring trees by itself now.
0 x

User avatar
Beherith
Moderator
Posts: 4925
Joined: 26 Oct 2007, 16:21

Re: Latest mapconv, download here.

Post by Beherith » 11 Jan 2010, 13:21

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
0 x

User avatar
Masse
Damned Developer
Posts: 979
Joined: 15 Sep 2004, 18:56

Re: Latest mapconv, download here.

Post by Masse » 12 Jan 2010, 19:10

I can't find download link for the mapconv.
0 x

User avatar
Beherith
Moderator
Posts: 4925
Joined: 26 Oct 2007, 16:21

Re: Latest mapconv, download here.

Post by Beherith » 13 Jan 2010, 04:53

Ah, added the link.
Also, specifying -1 in the fs.txt will also result in the feature getting random rotation.
0 x

User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: Latest mapconv, download here.

Post by Das Bruce » 15 Jan 2010, 09:07

How does this look?
Image
0 x

User avatar
Beherith
Moderator
Posts: 4925
Joined: 26 Oct 2007, 16:21

Re: Latest mapconv, download here.

Post by Beherith » 15 Jan 2010, 11:21

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

User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: Latest mapconv, download here.

Post by Das Bruce » 15 Jan 2010, 11:30

Done, what formats can the various files be in other than .bmp?
0 x

User avatar
Beherith
Moderator
Posts: 4925
Joined: 26 Oct 2007, 16:21

Re: Latest mapconv, download here.

Post by Beherith » 15 Jan 2010, 11:40

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

User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Re: Latest mapconv, download here.

Post by Das Bruce » 15 Jan 2010, 11:58

So much for an early night. 8)
0 x

Post Reply

Return to “Map Tutorials & Resources”