mapconv

mapconv

Discuss maps & map creation - from concept to execution to the ever elusive release.

Moderator: Moderators

Post Reply
user
Posts: 452
Joined: 22 Jan 2008, 16:33

mapconv

Post by user »

This is the mapconv thread

There is absolutely no line issue in this map conv, if you use it correctly.

if you still use the mapconv from file universe, then delete it, it is super old.

on this post i will try to explain what i have on the readme, what has been posted on this topic, common problems and how to use its new features.

contents of this post:

Code: Select all

0. MapConv guide for noobs
1. Simple usage 
2. Common problems
   2. 1. map has weird color distortion, red and blue everywhere
   2. 2. pixelization
   2. 3. error like this(see pages 14)
   2. 4. minimap looks weird, but the map is fine.
   2. 5. -z doesn't works. 
3. Common questions     
   2. 1. how does compression work?
   2. 2. how to use rescaling?
   2. 3. what is smoothing?    
4. Map dimensions
    texture map
    height map
    metal map
    feature map
    type map
5. Map formats and colors
    texture map
    height map
    metal map
    feature map
    type map
6. Change log
    version 1.2
    ...
    version 0.5
7. Todo
[/b]

MapConv guide for noobs:

step by step how to make it work: (Also known as the mapconv guide to noobs)

Before step 1: (you can skip this if you want)

1/10(0.1). Open your mapconv directory;
3/10(0.3). Select your mapconv executable;
5/10(0.5). Press [SHIFT + DEL], then hit [ENTER];
7/10(0.7). if your nvxdt icon has only a weird symbol and two colors, then shift delete it;
9/10(0.9). done.

1. Download;
2. Extract the files;
3. Open the new mapconv directory extracted from the zip file;
4. you will find these files:
[code] changelog.txt
DevIL.dll
example scripts <directory>
geovent.bmp
ILU.dll
line.txt
mapconv.exe
mapid.txt
nvcompress
nvdxt <directory>
old nvdxt <directory>
1options.txt
readme.txt
texcompress <directory>
texconv <directory>
todo.txt [/code]

5. Open the nvdxt directory;
6. Select the nvdxt executable;
7. Hit [CTRL + C];
8. go back to the mapconv directory;
9. Hit [CTRL + V];
10. Select the files "line.txt" and "options.txt";
11. Hit [SHIFT + DEL], and press [ENTER];
12. Open the "example scripts" directory;
13. Open the "example 1" directory;
14. select the .bat file, "compressor.txt", and "special.txt";
15. Hit [CTRL + C];
16. go back to the mapconv directory;
17. Hit [CTRL + V];
18. Done.

For your map you should do:

19. Open the bat file that you copied to the mapconv directory in any text editor;
20. Remove the lines:
[code]@ECHO OFF
ECHO
ECHO.
ECHO Edit this file in notepad.
ECHO.
ECHO Make sure all map bitmaps are present in the same directory as Mapconv.
ECHO.
ECHO Mapconv help will now display.
mapconv -help

ECHO MapConv will now run again with the parameters you have added. If you haven't touched this file yet, something bad will probably happen.
pause

ECHO *SOMETHING TO NOTE* When compiling with features it is best to use a max height of 101 and a min height of 100. This ensures that all of your features (especially GeoVents) will be placed correctly! When working with large heights ALWAYS use the Lowpass option ( -l )!
pause

REM Edit below.[/code]

21. then you will have just two lines, hit [CTRL + S], and close the text editor;
22. go to your your map image files directory (height map, metal map, feature map, texture, type map);
23. select them all;
24. Hit [CTRL + X];
25. Open your mapconv directory;
26. Hit [CTRL + V], now you will have your images on mapconv directory;
27. Open the .bat (batch file) in the text editor again;
28. If you don't know how to use the mapconv features, you will have problems at this point. To learn about them look in the readme, or in the first post;
29. Edit the parameters to fit your needs;
30. Hit [CTRL + S], and close the text editor;
31. Open "compressor.txt" in the text editor;
32. Assuming that you know how to use the nvdxt parameters, edit the line. (look at the nvdxt readme for more information);
33. Hit [CTRL + S], and close the text editor;
34. Open "special.txt" in the text editor;
35. This one is easy just write the options you want, and remove the ones you don't want;
36. Hit [CTRL + S], and close the text editor;
37. Probably everything is OK;
38. Run the batch file (.bat);
39. A black window will open, displaying the batch file content;
40. If the images are 100% OK, then you won't get any errors;
41. Wait;
42. Wait some more;
43. At the end of compilation you will get something like this:
Could Not Find C:\mapconv\temp\Temp*.png.raw
44. That is not an error;
45. You will see a .smf and a .smt in the mapconv directory;
46. Right click, new folder, name it "maps";
47. Copy the .smf and .smt to the new folder;
48. Create a .smd file, and copy it to the "maps" directory that you created on step 46;
49. Compress the "maps" directory using either zip or 7z compression;
50. Done.

Notes:

1. No .bmp files;
2. No .tga with origin at bottom left;

I hope it helps.

edit: i still think this guide is not detailed enough, really it isn't, i will make a better guide later.


simple usage:

1. download 1.2
2. place the new files on your mapconv folder.
3. move nvdxt to the same folder as mapconv.
4. get the examples.
5. place them on the same folder as mapconv.
6. edit the examples to make them refer to your map.
7. use it.

common problems:


1. map has weird color distortion, red and blue everywhere:

convert the texture to a png, don't use bmp, or tga with origin at bottom left( you still can use RLE compression).

2. pixelization:

don't use texcompress.

3. error like this(see pages 14)
Could Not Find M:\temp\spring\mymaps\shalesofmordor\mapconv\temp\Temp*.png.raw


not an error

4. minimap looks weird, but the map is fine.

delete your minimap dds and png files, then try again.

5. -z doesn't works:

check if the executables are on the right place, and if you have the -file parameter, don't use dxt3 or dxt5.

some common questions:


1. how does compression work?

the -c value is a multiplier for a border threshold for tile differences, which defaults to 80000.
an example:

Code: Select all

   tile A      tile B
   0011       0110
   0000       1000
   1001       0110
   0100       0100

comparing them, the total number of differences will be 7, so using a -c 0 value, would add both tiles to the file, while a value of 0.1 would consider them the same, and would add just A to the file.

2. how to use rescaling?

-b will be the rescaling filter, choose one between 3:

nearest filter, fastest, bad quality.
triangle filter, fast, average quality. (might be changed on next versions)
mitchell filter, slow, very good quality.


i recommend using always filter 3,

-r (x size),-u (y size) are the map size that you want in spring, so to get a 8192x8192, the values would be: -r 16, -u 16.

3. what is smoothing?

smoothing is a filter for making the height map look less sharp, lowering the degrees for the slopes, like using a 7x7 filter on a very sharp map, will make it look awesome.

this uses a box filter to do the work, currently only sizes 3x3,5x5,7x7 are supported.

-k is the number of iterations, or how many times it will execute the filter.

map dimensions:

using the rescaling parameters, this doesn't matters, you will never get a image dimension error, without them, you may get, to avoid them, here are the image dimensions:

texture map: should be the map size you want in spring times 512,
examples:

Code: Select all

map size is 16x16.
texture map size will be 8192x8192.   

map size is 10x20.
texture map size will be 5120x10240.     

map size is 6x18.
texture map size will be 3072x9216.   
height map: the map size in spring * 64 +1 , or the texture map size / 8 +1, examples:

Code: Select all

map size is 16x16.
texture map size is 8192x8192.
height map size will be 1025x1025    

map size is 10x20.
texture map size will be 5120x10240.   
height map size will be 641x1281    
metal map: same as the height map.

feature map: the map size in spring * 64 , or the texture map size / 8, examples:

Code: Select all

map size is 16x16.
texture map size is 8192x8192.
feature map size will be 1024x1024.    

map size is 10x20.
texture map size will be 5120x10240.   
feature map size will be 640x1280.    

type map
: the map size in spring * 32 , or the texture map size / 16, examples:

Code: Select all

map size is 16x16.
texture map size is 8192x8192.
type map size will be 512x512.    

map size is 10x20.
texture map size will be 5120x10240.   
type map size will be 320x640.  


map formats and colors:


texture: recommended formats: png, jpg, tga( without origin at bottom left), dds, tiff, raw.

height map: recommended formats: png, jpg, tga( without origin at bottom left), dds, tiff, raw(it will only allow 16 bit raw) .
colors: should be redscale or grayscale, map conv only reads the red channel for the height map.

metal map: recommended formats: png, jpg, tga( without origin at bottom left), dds, tiff, raw.
colors: same as the heightmap

feature map: recommended formats: png, jpg, tga( without origin at bottom left), dds, tiff, raw.
colors: blue is grass, only values 0 and 255 are used, so for a 254 blue pixel, nothing will happen( this was changed on a recent version).
green 200 to 215 are trees, there are 16 different trees.
red 0 to 255 are features defined in your fs.txt file, starting from 255 to 0.
placing too much features using a feature map will slow down loading times by alot.
type map: recommended formats: png, jpg, tga( without origin at bottom left), dds, tiff, raw.
colors: same as the heightmap.

change log:


version 1.2

-a 7x7 matrix for smoothing.
-a new option for fast creation of the minimap.
-support for the old nvdxt.

version 1.1

-added some example scripts by argh, that can be directly used to make maps, without having to edit.
-created a new very cool and usefull smoothing function, it is really fun to play with it, it has 2 parameters to start with, more added on next versions.
-added a new option: featuretolerance.

version 1.0

-added a bunch of ids, see how they never are the same.
-created a new -w option, it is documented in the readme.
-a few bugfixes.

version 0.9

-made a new -z option, it takes a text file containing the texture compressor
and its parameters, this means that mappers now can have full control on how the
texture gets compressed,for more info look at the readme.
-bugfixes.

version 0.8


-bugfixes.
- -b -u -r no more required.
-and some other things.

version 0.7b

-bugfixes, a few of them.
-now geothermal vents are working again.

version 0.7

-bugfixes,lots.
-alot of code modifications,now mapconv runs faster.
-fixed typemap saving problems.
-fixed a few rescaling issues.
-made the rescaling function easier to understand.
-a new icon for texcompress(just a placeholder, i still need a really cool icon)
-now mapconv wont crash with erronous heightmap size,it will use the new rescaling function.
-created new rescale function for rescaling minimap,or heightmap when it has problems, that uses ILU for scaling.
-fixed some grass problems.
-now the max tree colours depends on the number of tree types.
-now the id depends on heightmap.
-fixed some other small issues i dont remember.

version 0.6c

-bugfixes,lots of them.
-changed map size limit to 50, and tile limit to 640000.
-made pixelization harder to see.
-fixed feature placement.
-added a few more output messages.
-added cool icons.
-added bluring for texcompress mipmaps.
-fixed small smoothing and invert y problems,but it is still not working, fixing it later
because rescaling is more important.

version 0.6b

-bugfixes.
-fixed small rescaling problems.
-fixed line issue.

version 0.6

-bugfixes.
-rescaling,smoothing,invert y.
-now it uses dxt1a for compressing tiles.

version 0.5

-now it suports every image format DevIL can handle,such as png,tga,jpg.
-it now comes with a newer version of nvdxt(version 8.30).
-new experimental features such as quality.


todo:

-make a credits section on the post.
-finish this post.
-find out if people like how this post is.

-make smoothing matrices size easily customizable, by using parameters.
-maybe split vegetation map from feature map, in my opinion, it would allow much more new stuff.
-make support for splat maps, using the red channel, 0 to 255 splat varieties, defined on a text file, just like the features file. they could be used for auto placing metal patches, writing something on the map, adding more detail.
-allow using multiple splat maps.
-maybe a sharpen height map filter.
Last edited by user on 09 Jul 2008, 23:23, edited 9 times in total.
User avatar
RogerN
Posts: 238
Joined: 24 Jul 2006, 23:29

Re: mapconv

Post by RogerN »

If mapconv uses nvdxt then the line issue is probably still there. The lines are very difficult to see on certain maps because of how the tiles are arranged. It depends on the colors you use, and a bit of luck.

For example, my most recent map (A Valley) appears to be completely line-free; but that's because of luck, not because mapconv suddely fixed itself. I compiled another map the very next day and it had horrible lines.
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: mapconv

Post by user »

i think the old didnt used nvdxt , the new one uses and i am using the newest nvdxt.

edit:just dowloaded a very old mapconv it does have texconv.exe and nvdxt.exe

i made 3 maps with the new one , neither of them had lines ,the first was a green map 6 x 6, the second was 8 x 8 using mostly yellow and orange colours.

the last one i used the source images for the castle gods map(16 x 16,64 tile files) , i am making one that uses white colours now.

edit:which colors are common to have the lines?
the nvdxt version on the mapconv packages is very old
Last edited by user on 22 Jan 2008, 20:49, edited 2 times in total.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: mapconv

Post by zwzsg »

Wait what where link plz omg thx.
User avatar
aGorm
Posts: 2928
Joined: 12 Jan 2005, 10:25

Re: mapconv

Post by aGorm »

If you have a compiled version that works in windows, post a link and I can check it on a map I know for a fact produces horrible lines.

aGorm
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: mapconv

Post by user »

yes it was compiled on windows,but this converter is slower than the other one because i had to make the temporary tiles be created as png,and nvdxt is slow to convert pngs.

i will upload it to uf now

edit:http://www.unknown-files.net/spring/4003/mapconv/

edit:forgot to say i added a few new options for it one is -q (quality)
so if it is not working add -q 100, i have not tested it alot so it maybe
useless
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: mapconv

Post by zwzsg »

Thanks alot!

What's quality supposed to do? We have -c (compression) already.
User avatar
aGorm
Posts: 2928
Joined: 12 Jan 2005, 10:25

Re: mapconv

Post by aGorm »

Running it now... will let you know if all is well in 5 mins or so.

aGorm
User avatar
aGorm
Posts: 2928
Joined: 12 Jan 2005, 10:25

Re: mapconv

Post by aGorm »

Bah... it didn't work for me... :(
mini.jpg
(177.81 KiB) Downloaded 87 times
Did this weird stuff.

aGorm
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: mapconv

Post by Kloot »

That looks (depressingly) familiar, it's exactly
what my win32 mapconv build does as well:

viewtopic.php?p=251356#p251356
User avatar
genblood
Posts: 862
Joined: 19 Jan 2005, 03:37

Re: mapconv

Post by genblood »

It didn't work for me .. not sure if its me or not here is whats
in the bat file I did :

mapconv -f test-fm4.png -l -i -z 70 -x 130 -n 15 -o test-V3.smf -e test-v3.smt -g geovent.bmp -m test-mm2.png -a test-hm2.png -t mh4-map-1.png -q 100

Am I missing something ?
User avatar
ralphie
Posts: 426
Joined: 08 Jan 2007, 08:39

Re: mapconv

Post by ralphie »

"-z textcompress"
User avatar
ralphie
Posts: 426
Joined: 08 Jan 2007, 08:39

Re: mapconv

Post by ralphie »

Well I got agorm's odd colour/distortion, and scanlines. Not quite a miracle fix yet :P

Image
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: mapconv

Post by KDR_11k »

I had the odd color/wrong tile issue until I replaced my texture TGA with a PNG
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: mapconv

Post by user »

i have used only png with it havent tested tga yet

and z texcompress is not required

edit:this is probably a nvdxt problem, there are other ways to make dds files

edit:not a nvdxt problem, its a DevIL problem,
put no origin at bottom left when saving the image, you can still use rle
compression

edit: and what compression you where using for tga?
edit:tga works without any compression just tested it on a map
User avatar
aGorm
Posts: 2928
Joined: 12 Jan 2005, 10:25

Re: mapconv

Post by aGorm »

Ahh,, so saving the texture as a PNG and then running might solve the problem?? Will give it a go.

aGorm
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: mapconv

Post by user »

you can still use tga if you want but save it without origin at bottom left
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: mapconv

Post by Forboding Angel »

user wrote:i think the old didnt used nvdxt

yes it did
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: mapconv

Post by user »

yes i know dowloaded a very old version it includes a very old nvdxt

a newer one(version 8.31) is on this one

edit:and if the lines are still there i will try to fix it

and the no maps with odd sizes limitation, is it a mapconv problem or spring problem?
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: mapconv

Post by user »

i am adding an option for rescaling the map,that works like this:
if you have a texture that is 3072 x 3072 (6x6 map) and put the parameters for x scale 10 and y scale 10 the final map will have the size of a 5120 x 5120 texture
Post Reply

Return to “Map Creation”