Off Topic very quickly, and I would like to keep it from heading that direction, so I would greatly appreciate it if you could help me. Thanks!
I have decided to do this tutorial in sections, so that the community can give me feedback on certain parts that were not clear to them. This is my method for making maps and it is a good one. Developing your own style is always a good idea, however, this guideline will help you.
ONLY COMMENT ON THE CURRENT SECTION PLEASE! THIS IS TO KEEP THE TUTORIAL FLOWING NICELY. IF YOU HAVE SOME ISSUES IN THE FUTURE THAT NEED TO BE ADDRESSED IN A PREVIOUS SECTION, PLEASE PM ME.
Current Section: Done... For Now
Legend:
Size scale:
1024 x 1024 texture map (or terrain map, whatever you prefer to call it) is equal to a 2x2 map in spring. Use 1024 as your basis. If you try to do odd numbers, mapconv will generally crash.
Texture map: Is the actual size of your map. Therefore 16 x 16 will be equal to 8192 x 8192
Heightfield Size: To get your heightfield size do this simple equation. Texture / 8 + 1 = heightfield dimentions. Therefore, if your map size is a 16 x 16 your heightfield will be 1025 x 1025.
Metal map Size: To get your Metal map size do this simple equation. Texture / 16 = Metal map dimentions. Therefore, if your map size is a 16 x 16 your Metal map will be 512 x 512.
Feature map Size: To get your Feature map size do this simple equation. Texture / 8 = Feature map dimentions. Therefore, if your map size is a 16 x 16 your Feature map will be 1024 x 1024.
End of Legend
Outline of Sections
1.Heightmap
2.Terrain
3.Metal
4.Feature
5.Compiling
6.SMD settings
Addendum: Map layouts and techniques for making your map truly unique
End of Outline
Ok lets get started.
1.Heightmap == Heightfield
Reccommended program for drawing heightmaps is Photoshop or The Gimp.
Ok for you nubs out there :p... A heightmap is a greyscale image that tells spring how your map is elevated, meaning, if the color on a particular heightmap is white that is at the Maximum height, whereas if the color is black, that is the lowest point.
Now to explain that further. My method for creating heightmaps is to use my penmouse (hand mousing is fine as well :) to create the outline for my heightmap. With this tool you need to decide how you want your map to look. If your map is to have absolutely no water on it you want the lowest point in your map to be black. Therefore you will start with a black image. On the black image decide how high you want each hill to be and use varying colors from white to greyish to achieve the desired effect. You won't get it right the first time so just keep and open mind and experiment with it. After you have gone through several trial maps you will get a feel for how this works.
For canyons I came out with this:
After you have drawn the outline, use the paint bucket tool to fill in your outlines. There you have hills valleys etc. Now from this point there are several options on what to do with your heightmap. You can either try to smooth it out by using guassian blurs, or you can run it through an effects filter (which is my preferred method).
If you do not have L3DT, now is a good time to get it. The program is free. To get the pro version simply send an email to the creator telling him what you want to use it for and what country you live in. He will send you a link to download and an access code.
Ok, use the import heightfield option in l3dt. Once your heightmap is imported, click on operations at the top and select design map. Move the sliders around to how you think you would like your map to look, then hit ok. After that click operations again, and go down to heightfield and choose ├óÔé¼┼ôgenerate map├óÔé¼┬Ø. It will ask you if you want to overwrite, choose yes.
This process will take a little while so just sit back and relax. Once it is done, go to file, export, heightfield, and save the file as ├óÔé¼┼ôHeight.bmp├óÔé¼┬Ø.
Pull the heightfield into photoshop or gimp, and smooth out the flatland a bit, save.
For canyons the result was this:
Once you are done smoothing, pull the heightfield into The Gimp (NOT PHOTOSHOP, PHOTOSHOP'S IMAGE SIZE ROUTINE WILL RUIN THE HEIGHTFIELD), and use the scale option on CUBIC to blow your heightmap up to the same size as your texture map will be (Texture map defines the total size of your map. For a 16 x 16 the texture map size is 8192 x 8192) and save it has a new file. Heightbig.bmp is my preferred filename.
You are done with the heightfield portion. Pat yourself on the back, you have finished about 16.6% of your map.
Next section
2.Terrain == Texture map
Ok, this is where it gets hard (but not so bad). Open up notepad and copy paste this code exactly word for word as it is written.
Code: Select all
L3DT Climate File
#VersionNo: 1.0
#ClimateName: "Green Test"
#ClimateRGB: 50, 255, 50
#ClimateGradCoeff: 1
#ClimateCurvCoeff: 1
#ClimateWaterCoeff: 1
#ClimateSalinCoeff: 1
#TypeID: 1
#TypeName: "grass"
#TexName: "grass/evergreen1c.jpg"
// #HiTexName: "grass/evergreen1c.jpg"
// #HiTexBlend: 0.2
#ColourRGB: 175, 200, 90
#BaseProb: 0.80
#WaterCoeff: 0.25
/* steep lush grass is copy of lush grass with slightly lower prob + slightly higher grad */
#TypeID: 2
#TypeName: "steep lush grass"
#TexName: "grass\evergreen1h.jpg"
// #HiTexName: "grass\evergreen1h.jpg"
// #HiTexBlend: 0.2
#ColourRGB: 150, 190, 80
#BaseProb: 0.785
#WaterCoeff: 0.27
#SalinCoeff: -0.2
#GradCoeff: 0.08
/* rocky bits */
#TypeID: 3
#TypeName: "rock slope"
#TexName: "rock\cliff1a.jpg"
// #HiTexName: "rock\cliff1a.jpg"
// #HiTexBlend: 0.2
#ColourRGB: 120, 120, 120
#BaseProb: 0.55
#GradCoeff: 0.75
#TypeID: 4
#TypeName: "cliff face"
#TexName: "rock\cliff1.jpg"
// #HiTexName: "rock\cliff1.jpg"
// #HiTexBlend: 0.2
#ColourRGB: 80, 80, 80
#BaseProb: 0.50
#GradCoeff: 1
/* snow */
#TypeID: 5
#TypeName: "snow"
#TexName: "snow\snow1.jpg"
#ColourRGB: 255, 255, 255
#BaseProb: 0.90
#MinAlt2: 1300
#MinAlt1: 2000
#EOF
In the above file, the folders referanced are the folders inside: program files ├óÔé¼ÔÇ£ l3dt ├óÔé¼ÔÇ£ resources ├óÔé¼ÔÇ£ textures. SO what you need to do is put your individual textures in the corrosponding folders. Your grass texture in the grass folder and etc. Then change the file names in the above code and name your climate at the top. Once you are done editing the climate, save the file into the l3dt resource\climates folder, and name it ├óÔé¼┼ômyclimatename.cli├óÔé¼┬Ø.
Generally maps with maximum altitude higher than 300 ├óÔé¼ÔÇ£ 600 play quite badly. The reason for this is because even kbots have some serious issues with climbing hills that are highter than 300 meters. So keep this in mind while making your map. Yes, huge height scales look way cool, but as I said, they play quite badly.
I suggest that (if your map has no water on it) you use a height scale of 100 ├óÔé¼ÔÇ£ 400, and a horizontal scale of 4. If your map has water on it, I would suggest a scale of -100 ├óÔé¼ÔÇ£ 200, horizontal scale of 4. Keep in mind that this is just the terrain render so if you need to you can massivly cheat on this step to achieve the desired result. Also, a good thing to note is that the horizontal scale is what causes l3dt to be more or less picky. Lower = more picky, higher = less picky.
*Note* Horizontal scale is also defined as "Heightfield Resolution"
Open up l3dt, click on options ├óÔé¼ÔÇ£ climates ├óÔé¼ÔÇ£ register new climate. It will take you to l3dt's climate folder and you should see your climate file there, select your file and hit ok.
Now... Hit file, and go down to import. Import the heightbig.bmp file that you saved eariler as a "Design Map". L3dt will pop up a dialog asking you what settings you want to use.
Here are the settings that I use (as a general rule, feel free to try others):
After you have gone through importing the design map, click Operations > Heightfield > Generate map. What this does is it converts the design map into a 32 bit heightfield, which is much better for rendering. This will prevent you from getting contour lines etc.
Next, click on the operations menu at the top, and this time generate the attributes map. This is the most time consuming process when rendering a map. The attributes map does all the terrain calculations in advance, so that generating the actual terrain takes only a few minutes. Calculating the attributes map will take about 10 ├óÔé¼ÔÇ£ 20 minutes, maybe less depending on your machines power and how much ram you have. After it is done, you can see very intimately where l3dt places the specific textures. Sometimes you will realize as you get more experienced, that you have set the horizontal scale too low and l3dt is being way too picky, which means you will have to recalculate the attributes map again after changing the scale. Sometimes it can be a real pain to get it right so be patient, rome wasn't made in a day. =D
A rough idea of what my attributes map looked like:
Now you get to do the fun part, making the texture. Click on operations and generate the texture map. When the box comes up, uncheck ├óÔé¼┼ôUse light map├óÔé¼┬Ø and check the box that says ├óÔé¼┼ôMake high resolution texture├óÔé¼┬Ø then hit ok. The texture should only take 5 mins give or take. After it is done, keep in mind that the texture might look a little bland in 2d and without shadows on it, but that's fine. It doesn't matter how it looks in 2d, only 3d.
Ok, if you're real impatient at this point, you may save the map and use the l3dt 3d viewer to view it. You can download the viewer from here: http://www.bundysoft.com/L3DT/downloads ... 3DTVi2.zip
Keep in mind that the 3d viewer is kinda sucky, but, if you just need a preview it will work great.
Click file, export ├óÔé¼ÔÇ£ current map and save the texture map as terrain.bmp. Open it up in photoshop. Now, in a seperate image editor (I use irfanview for this, you can get it from http://www.irfanview.com ) Load up your heightbig.bmp. If you're using irfanview then click image ├óÔé¼ÔÇ£ negative. This will basically flip the colors on your heightmap. Save it as heightbig-negative.bmp Now, switch over to photoshop, open up the negative heightmap, use your selection marquee to select the entire thing. Hit ctrl-c then flip over to your texture map image, and press crtl-v. Your negative heightmap image will be on top of your terrain map image. Now, use the blending tools in photoshop and change the opacity of the heightfiled layer to whatever looks good, 11% usually works quite nicely for me. This is an optional step, but it will make your map look much nicer in the long run, so I suggest doing it.
Here is before I did the heightfield overlay, and then after on Canyons.
Now in photoshop, click the layer option at the top, and flatten the image. Now you get to do metal placement. Keep in mind that this is only visual (At the moment), but the exact placement that you use for the metal patches will be THE EXACT SIZE AND SHAPE OF THE METAL PATCH IN GAME. You can use the metal patch textures that I suggest below, or you can make your own, or you can use others that other people have provided as well.
Metal patch textures I suggest:
Place the textures where you want your metal to be, and then save your map in photoshop as terrain.psd AND as terrain.bmp. The reason for saving both files is because if you realize later that you totally screwed the pooch when placing metal you can always go back and do it again without too much trouble.
Ok, your done with the texture map. You are now close to 30% done with your map.
Next Section
3. Metal map = Can be one of the deciding factors of whether your map is "teh pwnz0rz" or "teh sux0rz"
There are 2 methods that I use for making the metal map. One is very easy but offers little control over metal amounts, the other is more time consuming but extremely easy to control.
I will start with my favorite method which is a little more time consuming.
In photoshop use the image size/scale function to scale your map (complete with the patch textures you added) to the same size as your heightmap will be. In my case on canyons, this is 1025 x 1025 ( 16 x 16 map size ). (note Correct metal map dimensions are 512*512 for this map, but 1025 will work as well but be rescaled by mapconv)
Method #1 - Time consuming but easier to control overall.
Now, flatten the texture image so that it is on one layer. Create a new image with the size constraints of 1025 x 1025, make sure the background is flat black. Now switch back to the resized texture image. Use the selection marquee to select and copy the entire image. Now switch back to your new image. Press ctrl + v to paste the texture on top of black image. Now, move the black layer up so that it is on top of the texture layer. Now use the blending options and set the black layer to around 30% opacity so that you can see the metal textures on your map. Now click on the brush tool and change it to the pencil tool. Make sure that the pencil tool is set to 6 pixels, not anti-aliased, 100% opacity and red 255 color. Now just click everywhere that there is a metal texture. Change the opacity of the black layer back to 100% and save the file as metal.bmp. Close both of the images. DO NOT SAVE THE TEXTURE IMAGE! Unless you're a glutton for punishment that is...
Method #2 - Easy and quick, a little hard to control metal amounts though.
In the psd texture file, click the little eye beside the texture layer so that only the metal textures show. Now, merge all of the metal texture layers so that it becomes one layer. Use the blending options to put a color overlay of red 255. All the metal textures will be plain red now. Add a new fill layer that is solid black and make sure that it is behind the metal texture layer. Use the image size function to resize the image to the size that your metal map should be (in my case, 1025 x 1025). Save the file as metal.bmp.
Here is what my metal map looks like:
You are now about 46% done.
Next Section
4. Feature Map == A serious pain in the ass, but once it's done... Wow!
Open photoshop/gimp, make an image that is your texture map size / 8 which in my case is 1024 x 1024.
Time for technical details. To put grass on your feature map you use the blue colors, ranging from 0 to 255. The higher the amount, the more grass you have on that particular area. Simple enough.
Trees use the green color. To place a tree, use green colors from 200 - 215.
I won't even bother posting pictures of the tree types, cause there are only 2.
To place a tree, put a 1 pixel x 1 pixel dot on the feature map to place the tree. It comes in handy sometimes to open and resize your heightmap in photoshop, for the purpose of being able to see where your tree is being placed exactly.
To place geovents, use 1x1 pixel of green 255. Make sure it is on a flat area and no trees or other features are near it.
Features use decending order from red 255 to red 0. To put a feature on your map, you must have the object (in s30 or 3d0 format, I reccommend s30 format because the collision detection is much better). You need the texture for the feature. For my map I used Smoth's palm trees.
This is where it gets extremely hard to explain. In your copy of mothers map converter (YOU DO HAVE IT DON'T YOU!?!? :), if not, here is a link to my packaged version. http://spring.unknown-files.net/file/17 ... _Tools_V3/ ) one of the files you have should be fs.txt
fs.txt is simply a listing of the features that you have. The first one listed corresponds to red 255. Here is my fs.txt for canyons:
Code: Select all
pdrock1
pdrock1a
pdrock2
pdrock2a
pdrock3
pdrock3a
pdrock4
pdrock4a
pdrock4a
palmetto_1
cluster0_dead
cluster1
cluster1_dead
cluster2
cluster2_dead
palmetto_2
palmetto_3
cluster0
To add the features, you need to make a folder called "objects3d", another folder called "features" with the sub directory "All Worlds", and yet another called "unittextures"
Your directory structure should look like this:
c:\Mymapname
features - All Worlds
maps
objects3d
unittextures
Put the s30/3do in the objects3d folder.
Put the tga/dds/png in the unittexture folder.
Put the tdf file in the All Worlds folder.
A bit of side information here... The tdf is what defines the properties of the feature in question, for example, here is a copy of my tdf for palmetto_1:
Code: Select all
[palmetto_1]
{
world=allworld;
description=Palmetto;
category=arm_corpses;
object=palmetto_1.s3o;
footprintx=2;
footprintz=2;
height=20;
blocking=0;
hitdensity=5;
energy=50;
damage=1000;
flammable=0;
reclaimable=1;
autoreclaimable=1;
featurereclamate=smudge01;
seqnamereclamate=tree1reclamate;
}
Save feature.bmp
For referance, here is what my feature map looks like:
You are now about 70(some odd) percent done.
*A few notes...*
I have decided to nix a few sections because they have already been done in different tutorials, and honestly they explain the process every bit as good as I can.
5. Compiling == Eating a tough steak...
Follow this link to an excellent guide on compiling your map:
http://taspring.clan-sy.com/wiki/Maps:Compiling
6. SMD creation == The fun part
Follow this link for an excellent guide on the specifics of SMD creating:
http://taspring.clan-sy.com/wiki/Maps:SMD
Sample Desert Climate-Created by Forboding Angel
Sample Texture map: http://spring.unknown-files.net/file/25 ... esert.sd7/
This climate is ONLY for use with l3dt 2.5+. To import, extract to your resources/climates directory, then open l3dt, go to the climate manager, Load New.
It is fully functional, and looks kick ass right out of the box. Use this as a template for your own climates. If you look around in the climate manager, it's pretty easy to understand. I suggest you not change the bump map settings (weights/totals) until you are completely comfortable with making your own climates.