Tutorial:CompleteMapMaking(Wannes): Difference between revisions

From Spring
Jump to navigationJump to search
Jadrax (talk | contribs)
m Did some grammar clean up.
Line 2: Line 2:


Hello everyone,
Hello everyone,
In this tutorial i'm gonna try to learn you everything you need to know to make your first decent map.
In this tutorial i'm gonna try to teach you everything you need to know to make your first decent map.


First i want to thank Maelstorm and aGorm for their tutorials, they learned me alot.  
First i want to thank Maelstorm and aGorm for their tutorials, they tought me a lot.  




Line 41: Line 41:
As you will soon notice these bitmaps have huge sizes. In order to compress these large bitmaps to a small mapfiles they created somethign named tiles.
As you will soon notice these bitmaps have huge sizes. In order to compress these large bitmaps to a small mapfiles they created somethign named tiles.


A tile is a a small picture of a terrain liek grass or sand or water. when you fill up your whole map with 1 or more tiles, mapconv can see this and make good use of it to compress your map. So its important you use tiles because it makes the map sizes alot smalle but you should pay attention your maps don't get too boring because of the same tile you see everywhere.
A tile is a a small picture of a terrain like grass or sand or water. when you fill up your whole map with 1 or more tiles, mapconv can see this and make good use of it to compress your map. So its important you use tiles because it makes the map sizes alot smalle but you should pay attention your maps don't get too boring because of the same tile you see everywhere.


You can't just use tiles of any size. mapconv will check your map for tiles that are a multiple of 32 pixels. So you can use 32x32 64x64 . . .  bigger tiles will usually be nicer on your map because its harder to spot u repeat the same tile over and over, but this also makes you map bigger.
You can't just use tiles of any size. mapconv will check your map for tiles that are a multiple of 32 pixels. So you can use 32x32 64x64 . . .  bigger tiles will usually be nicer on your map because its harder to spot u repeat the same tile over and over, but this also makes you map bigger.
You can even use tiles like 32x64, as long as its a multiple of 32
You can even use tiles like 32x64, as long as its a multiple of 32


So it important you find a good balance between the number of tiles you use and their size.
So it important that you find a good balance between the number of tiles you use and their size.






If you wnat to use tiles in Photoshop, do this:
If you want to use tiles in Photoshop, do this:
open the tile picture   resize it to a multiple of 32, do edit->define pattern
open the tile picture, resize it to a multiple of 32, do edit->define pattern
then go to the terrain picture and use edit -> fill and select the wanted pattern.   on large bitmaps this may take some time.
then go to the terrain picture and use edit -> fill and select the wanted pattern. On large bitmaps this may take some time.
When u applied a couple of tiles liek this you can make em belnd in to eachother using the eraser on a low opacity.
When you have applied a couple of tiles like this you can make them blend in to each other using the eraser on a low opacity.


You can also use terragen to generate you a texture map, using an imported heightmap or one you made inside terragen. Although I can give you no further info about the use of terragen because I don't know alot about it either.
You can also use terragen to generate you a texture map, using an imported height map or one you made inside terragen. Although I can give you no further info about the use of terragen because I don't know alot about it either.




Line 67: Line 67:
The whiter something is, the higher it will be in spring and black is the lowest your map can be.
The whiter something is, the higher it will be in spring and black is the lowest your map can be.


so basicly what you do is you paint your whole map grey (usually I take 127 127 127) and then add white and black where you want mountains and valleys
so basically what you do is you paint your whole map grey (usually I take 127 127 127) and then add white and black where you want mountains and valleys




I'm not very good at making heightmaps myself so maybe someone else can write some things here
I'm not very good at making heightmaps myself so maybe someone else can write some things here.
the way I do it: I only use photoshop , take a white brush on very low opacity and start drawling a mountain on my map. It takes alot of time and patience making it very smoot. the blur tools helps alot and the surface blur filter helps alot too (or any otehr blur filter).  If you want to make your terrain you are going to build a little interesting you shouldn't leave it all perfectly flat. There are many ways of doing this, you can use the filter->render-> clouds or some things in the filer->noise menu(remember not to use colors!)
The way I do it: I only use photoshop , take a white brush on very low opacity and start drawling a mountain on my map. It takes alot of time and patience making it very smooth. The blur tools helps alot and the surface blur filter helps alot too (or any other blur filter).  If you want to make your terrain more interesting you shouldn't leave it all perfectly flat. There are many ways of doing this, you can use the filter->render-> clouds or some things in the filer->noise menu (remember not to use colors!)
after applying these filers you can try to put opacity of that layer low or merge it with the other layers (don't use this, but might be better)
After applying these filers you can try to put opacity of that layer low or merge it with the other layers (don't use this, but might be better)


===The Metal Map===
===The Metal Map===


Aah this is an easy one : )
Aah this is an easy one : )
it uses teh same dimensions as the heightmap.
it uses the same dimensions as the heightmap.
The normal mapconv uses this map to place the metal and geovents on, but mothers mapconv has a special feature layer for the geo's (see later) so the metal map just keeps track of all the metal on your map.
The normal mapconv uses this map to place the metal and geovents on, but mothers mapconv has a special feature layer for the geo's (see later) so the metal map just keeps track of all the metal on your map.


It uses red to represent Metal , so you can use red goign from 0 -255 to defien your metal.
It uses red to represent Metal , so you can use red going from 0 -255 to define your metal.
Remember that white = all colors so when you make a white map with red dots your whoel map will be covered with metal. on the normal mapconv this will be even worse because white allso contaisn green (which it uses for geo's) so the enire map wille b full of geo's, and because each green pixel represents a geo this will cause a big error when you start your map.
Remember that white = all colors so when you make a white map with red dots your whole map will be covered with metal. On the normal mapconv this will be even worse because white also contains green (which it uses for geo's) so the entire map wille be full of geo's. Because each green pixel represents a geo this will cause a big error when you start your map.


so allways paint your map black (love that song) first and then add red dots (unless you are makign a metalmap)
So always paint your map black (love that song) first and then add red dots (unless you are making a metal map)




Line 89: Line 89:


This is for Mothers mapconv only
This is for Mothers mapconv only
it uses same dimensions as teh height and metalmap.
It uses same dimensions as the height and metalmap.


GEO's:
GEO's:
it uses green 255 to represent a geo  add 1 pixel to add one geo on your map  don't place alot of green pixels next to eachotehr because this will make spring crash.
It uses green 255 to represent a geo  add 1 pixel to add one geo on your map  don't place alot of green pixels next to eachother because this will make spring crash.


TREE's
TREE's
it uses green color 200-215 to represent trees of 16 differant types
It uses green color 200-215 to represent trees of 16 differant types


GRASS:
GRASS:


it uses blue color 0-255 0 = no grass 255 = full grass
It uses blue color 0-255 0 = no grass 255 = full grass


FEATURES:
FEATURES:
***taken from motehrs mapconv readme***
***taken from mothers mapconv readme***
Red Channel:
Red Channel:
255 - feature of type on first line of text file specified with
255 - feature of type on first line of text file specified with
Line 111: Line 111:
Format is one feature type per line.  
Format is one feature type per line.  
These features currently must be found in the .tdf files in the mods/<modname.sd7>/features filesystem.
These features currently must be found in the .tdf files in the mods/<modname.sd7>/features filesystem.
*** taken from motehrs mapconv readme ***
*** taken from mothers mapconv readme ***




Line 125: Line 125:
Then you need to type "mapconv" follwoed by a list of parameters
Then you need to type "mapconv" follwoed by a list of parameters


this is a list taken from mothers mapconv help:
This is a list taken from mothers mapconv help:


USAGE:
USAGE:
Line 199: Line 199:




if you run this you will see 2 new files in the mapconv folder  yourmapname.smf and yourmapname.smt   
If you run this you will see 2 new files in the mapconv folder  yourmapname.smf and yourmapname.smt   
but you still need an extra file   yourmapname.smd
You still need an extra file; yourmapname.smd
a smd file contains all things like wind speeds max metal sun direction map description, starting positions etc.
A smd file contains all things like wind speeds max metal sun direction map description, starting positions etc.
you can take a smd file from another map and edit or use Maelstorms SMD creator:  
You can take a smd file from another map and edit or use Maelstorms SMD creator:  
http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2420
http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2420






Now put these 3 files in a folder called "maps", download 7-zip [http://www.7-zip.org here],  
Now put these 3 files in a folder called "maps", download 7-zip [http://www.7-zip.org here], open it and navigate to the maps folder then right-click on it and do add to archive. Just let it make a zip file, and later rename it to yourmapname.sd7 (you have to edit the extension)
open it and navigate to the maps folder
right-click on it and do add to archive. Just let it make a zip file, and later rename it to yourmapname.sd7 (you have to edit the extension)


Put this file in your spring maps folder and you're ready to test it!
Put this file in your spring maps folder and you're ready to test it!

Revision as of 20:04, 27 November 2006

== Complete Map Making tutorial == by Wannes

Hello everyone, In this tutorial i'm gonna try to teach you everything you need to know to make your first decent map.

First i want to thank Maelstorm and aGorm for their tutorials, they tought me a lot.


Things You need:

An image editing program like Photoshop (which I will use in the rest of this tutorial), Paintshop Pro, . . . Or 'the Gimp': [ ftp://ftp.gimp.org/pub/gimp/v2.2/ ]


Mapconv: This is the program that converts the Bitmap files you will be making into something that Spring can use (meaning a .smf and .smt file) This program comes in 2 versions, Mothers mapconv and the "normal" one In the rest of this tutorial I will be using mothers Mapconv [ http://www.fileuniverse.com/uploads/60b1MapConv.zip ]

Map creation tools (optional): These programs help you making heightmaps, generate heightmaps, and apply textures to them. Examples are:

  • Terragen (Mars was made with the random terrain function in terragen by SJ)
  • L3DT
  • World Machine.

-*add links later*-


If you are planning to make big maps 16x16 and more you really need a good cpu and alot of memory and HD space. Especially when you are going to make everything in Photoshop.

The Parts of the Map

Each map contains 4 parts (3 parts on the normal mapconv)


The texture Map:

This defines how the terrain for your map will look. It needs to be a 24 bit bitmap, with dimensions that are a multiple of 1024. A 16x16 map (you see this at spring lobby) equals a 8192x8192 pixels bitmap. As you will soon notice these bitmaps have huge sizes. In order to compress these large bitmaps to a small mapfiles they created somethign named tiles.

A tile is a a small picture of a terrain like grass or sand or water. when you fill up your whole map with 1 or more tiles, mapconv can see this and make good use of it to compress your map. So its important you use tiles because it makes the map sizes alot smalle but you should pay attention your maps don't get too boring because of the same tile you see everywhere.

You can't just use tiles of any size. mapconv will check your map for tiles that are a multiple of 32 pixels. So you can use 32x32 64x64 . . . bigger tiles will usually be nicer on your map because its harder to spot u repeat the same tile over and over, but this also makes you map bigger. You can even use tiles like 32x64, as long as its a multiple of 32

So it important that you find a good balance between the number of tiles you use and their size.


If you want to use tiles in Photoshop, do this: open the tile picture, resize it to a multiple of 32, do edit->define pattern then go to the terrain picture and use edit -> fill and select the wanted pattern. On large bitmaps this may take some time. When you have applied a couple of tiles like this you can make them blend in to each other using the eraser on a low opacity.

You can also use terragen to generate you a texture map, using an imported height map or one you made inside terragen. Although I can give you no further info about the use of terragen because I don't know alot about it either.


The Heightmap

This is the key part of your map. It defines everything about the heights of your map (including water).


These are the basics: your heightmap must only contain black and white colors, and must be textmapsizeX/8 +1 x textmapsizeY/8+1 so if you have a 8192 x 8192 texture map you got to have a 1025 x 1025 heightmap. The whiter something is, the higher it will be in spring and black is the lowest your map can be.

so basically what you do is you paint your whole map grey (usually I take 127 127 127) and then add white and black where you want mountains and valleys


I'm not very good at making heightmaps myself so maybe someone else can write some things here. The way I do it: I only use photoshop , take a white brush on very low opacity and start drawling a mountain on my map. It takes alot of time and patience making it very smooth. The blur tools helps alot and the surface blur filter helps alot too (or any other blur filter). If you want to make your terrain more interesting you shouldn't leave it all perfectly flat. There are many ways of doing this, you can use the filter->render-> clouds or some things in the filer->noise menu (remember not to use colors!) After applying these filers you can try to put opacity of that layer low or merge it with the other layers (don't use this, but might be better)

The Metal Map

Aah this is an easy one : ) it uses the same dimensions as the heightmap. The normal mapconv uses this map to place the metal and geovents on, but mothers mapconv has a special feature layer for the geo's (see later) so the metal map just keeps track of all the metal on your map.

It uses red to represent Metal , so you can use red going from 0 -255 to define your metal. Remember that white = all colors so when you make a white map with red dots your whole map will be covered with metal. On the normal mapconv this will be even worse because white also contains green (which it uses for geo's) so the entire map wille be full of geo's. Because each green pixel represents a geo this will cause a big error when you start your map.

So always paint your map black (love that song) first and then add red dots (unless you are making a metal map)


The Feature Map

This is for Mothers mapconv only It uses same dimensions as the height and metalmap.

GEO's: It uses green 255 to represent a geo add 1 pixel to add one geo on your map don't place alot of green pixels next to eachother because this will make spring crash.

TREE's It uses green color 200-215 to represent trees of 16 differant types

GRASS:

It uses blue color 0-255 0 = no grass 255 = full grass

FEATURES:

      • taken from mothers mapconv readme***

Red Channel: 255 - feature of type on first line of text file specified with 254 - " " second " " "

ie. fs.txt has armjeth_dead on the first line, so a pixel of 255 Blue places an armjeth_dead !

Format is one feature type per line. These features currently must be found in the .tdf files in the mods/<modname.sd7>/features filesystem.

      • taken from mothers mapconv readme ***


Using Mapconv

ok now you have your 4 maps, copy them into mothersmapconv folder

now you have to get mapconv to work. You can edit the .bat file or do this: goto start-> run and type "cmd" this will open a dospromt for those that don't knwo dos, use cd.. to go up one level cd "mapname" to change folder and "d:" to go to your D drive navigate to the mapconv folder.

Then you need to type "mapconv" follwoed by a list of parameters

This is a list taken from mothers mapconv help:

USAGE:

 mapconv  [-l] [-i] [-c <compression>] -x <max height> -n <min height> [-o 
 <Output file>] [-e <tile file>] [-y <Typemap file>] -m <Metalmap file> -a 
 <Heightmap file> -t <Texture file> [--] [-v] [-h]


Where:

 -l,  --lowpass
   Lowpass filters the heightmap
 -i,  --invert
   Inverts the height map vertically (not the height values but the height map 
   (uhm someone rewrite this))
 -c <compression>,  --compress <compression>
   (value required)  How much we should try to compress the texture file. 
   Default value 0.8 . (lower=higher quality, larger file)
 -x <max height>,  --maxheight <max height>
   (required)  (value required)  What altitude in spring the max(0xffff) level 
   of the height map should represent
 -n <min height>,  --minheight <min height>
   (required)  (value required)  What altitude in spring the min(0) level of 
   the height map should represent
 -o <Output file>,  --outfile <Output file>
   (value required)  The name of the created map
 -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 added in a new tile file
 -y <Typemap file>,  --typemap <Typemap file>
   (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
 -m <Metalmap file>,  --metalmap <Metalmap file>
   (required)  (value required)  Metal map to use, red channel is amount of 
   metal, green=255 is where to place geos (one pixel=one geo). Is resized to 
   fit the mapsize
 -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) or an image file. Must be 
   xsize*128+1 x ysize*128+1 in size.
 -t <Texture file>,  --intex <Texture file>
   (required)  (value required)  Input bitmap to use for the map. Must be 
   xsize*1024 x ysize*1024 in size. (xsize,ysize integers determined from this 
   file)
 --,  --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.


This is an example of a command to convert your map (mame is crossroads) I allways use the -i parameter else the texture map gets applied wrong

mapconv.exe -i -f w_crossroadsf.bmp -x 300 -n 50 -m w_crossroadsm.bmp -a w_crossroadsh.bmp -t w_crossroads.bmp -o w_crossroads.smf


If you run this you will see 2 new files in the mapconv folder yourmapname.smf and yourmapname.smt You still need an extra file; yourmapname.smd A smd file contains all things like wind speeds max metal sun direction map description, starting positions etc. You can take a smd file from another map and edit or use Maelstorms SMD creator: http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2420


Now put these 3 files in a folder called "maps", download 7-zip here, open it and navigate to the maps folder then right-click on it and do add to archive. Just let it make a zip file, and later rename it to yourmapname.sd7 (you have to edit the extension)

Put this file in your spring maps folder and you're ready to test it!


I'm gonna cleanup this tutorial alter and add alot more stuff but if you aren't bothered too much because of all the typo's this should teach you how to make your first map


cheers!