oh damnit, double post, sry...
Well anyway this tutorial is not completed yet, but it does cover the l3dt portion of it. Will be finished in a bit...
Taken directly from the spring forums:
Moderators: Please help me keep the posts in this thread congruent to the current section. This is the type of thread that could go 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: Feature Map
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 / 8 + 1 = Metal map dimentions. Therefore, if your map size is a 16 x 16 your Metal map will be 1025 x 1025.
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.ota style patching (if you care to do so)
6.Compiling
7.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
![Smile :)](./images/smilies/icon_smile.gif)
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
Open up l3dt. Hit file, and go down to import. Import the heightbig.bmp file that you saved eariler. L3dt will ask you what height settings and what horizontal scale to set them at. I suggest that at first you import with the settings you plan to use in the compiler.
Unfortunately I have to branch off into some excess information here before continuing.
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.
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: "My Climate name"
#ClimateRGB: 50, 255, 50
#ClimateGradCoeff: 1
#ClimateCurvCoeff: 1
#ClimateWaterCoeff: 1
#ClimateSalinCoeff: 1
/* sea-floor / lake mud */
#TypeID: 1
#TypeName: "beach sand"
#TexName: "rock\rock3.jpg"
// #HiTexName: "grass\evergreen1I.jpg"
#HiTexBlend: 1
#ColourRGB: 230, 230, 120
#BaseProb: 0.35
#WaterCoeff: 0.3
#SalinCoeff: 2
#TypeID: 2
#TypeName: "mud"
#TexName: "sand\yellowsand1a.jpg"
// #HiTexName: "sand\yellowsand1a.jpg"
#HiTexBlend: 1
#ColourRGB: 200, 170, 100
#BaseProb: 0.58
#GradCoeff: 0
#WaterCoeff: 0.50
#SalinCoeff: 0
/* underwater rock (sea)
copy of sand, with larger grad coeffs
and lower base prob */
#TypeID: 15
#TypeName: "pebbles"
#TexName: "sand\yellowsand1a.jpg"
// #HiTexName: "sand\yellowsand1a.jpg"
#HiTexBlend: 1
#ColourRGB: 160, 160, 120
#BaseProb: 0.33
#GradCoeff: 0.20
#WaterCoeff: 0.3
#SalinCoeff: 2
#TypeID: 3
#TypeName: "rock (u/w)"
#TexName: "sand\yellowsand1a.jpg"
// #HiTexName: "sand\yellowsand1a.jpg"
#HiTexBlend: 1
#ColourRGB: 140, 140, 120
#BaseProb: 0.31
#GradCoeff: 0.25
#WaterCoeff: 0.3
#SalinCoeff: 2
/* underwater rock (lake)
copy of mud, with larger grad coeffs
and lower base prob */
#TypeID: 4
#TypeName: "pebbles"
#TexName: "sand\yellowsand1a.jpg"
// #HiTexName: "sand\yellowsand1a.jpg"
#HiTexBlend: 1
#ColourRGB: 160, 160, 120
#BaseProb: 0.55
#GradCoeff: 0.20
#WaterCoeff: 0.50
#TypeID: 14
#TypeName: "rock (u/w)"
#TexName: "sand\yellowsand1a.jpg"
// #HiTexName: "sand\yellowsand1a.jpg"
#HiTexBlend: 1
#ColourRGB: 140, 140, 120
#BaseProb: 0.54
#GradCoeff: 0.25
#WaterCoeff: 0.50
/* grasses */
#TypeID: 5
#TypeName: "coastal grass"
#TexName: "rock\rock3.jpg"
// #HiTexName: "rock\rock3.jpg"
#HiTexBlend: 1
#ColourRGB: 180, 200, 110
#BaseProb: 0.8
#WaterCoeff: 0.24
#SalinCoeff: .15
#TypeID: 6
#TypeName: "lush grass"
#TexName: "grass\evergreen1a.jpg"
// #HiTexName: "grass\evergreen1a.jpg"
#HiTexBlend: 1
#ColourRGB: 160, 200, 90
#BaseProb: 0.795
#WaterCoeff: 0.28
#SalinCoeff: -0.2
#TypeID: 7
#TypeName: "grass"
#TexName: "grass\evergreen1c.jpg"
// #HiTexName: "grass\evergreen1c.jpg"
#HiTexBlend: 1
#ColourRGB: 175, 200, 90
#BaseProb: 0.80
#WaterCoeff: 0.25
#TypeID: 8
#TypeName: "dry grass"
#TexName: "grass\evergreen1c.jpg"
// #HiTexName: "grass\evergreen1c.jpg"
#HiTexBlend: 1
#ColourRGB: 190, 210, 100
#BaseProb: 0.805
#WaterCoeff: 0
/* steep grass is copy of grass with slightly lower prob + slightly higher grad */
#TypeID: 9
#TypeName: "steep grass"
#TexName: "grass\evergreen1h.jpg"
#HiTexName: "grass\evergreen1c.jpg"
#HiTexBlend: 1
#ColourRGB: 165, 190, 80
#BaseProb: 0.79
#WaterCoeff: 0.24
#GradCoeff: 0.08
/* steep lush grass is copy of lush grass with slightly lower prob + slightly higher grad */
#TypeID: 10
#TypeName: "steep lush grass"
#TexName: "grass\evergreen1a.jpg"
// #HiTexName: "grass\evergreen1a.jpg"
#HiTexBlend: 1
#ColourRGB: 150, 190, 80
#BaseProb: 0.785
#WaterCoeff: 0.27
#SalinCoeff: -0.2
#GradCoeff: 0.08
/* rocky bits */
#TypeID: 11
#TypeName: "rock slope"
#TexName: "rock\rock3.jpg"
// #HiTexName: "rock\rock3.jpg"
#HiTexBlend: 1
#ColourRGB: 120, 120, 120
#BaseProb: 0.55
#GradCoeff: 0.75
#TypeID: 12
#TypeName: "cliff face"
#TexName: "rock\rock3.jpg"
// #HiTexName: "rock\rock3.jpg"
#HiTexBlend: 1
#ColourRGB: 80, 80, 80
#BaseProb: 0.40
#GradCoeff: 1
/* snow */
#TypeID: 13
#TypeName: "snow"
#TexName: "snow\snow.jpg"
#ColourRGB: 255, 255, 255
#BaseProb: 0.90
#MinAlt2: 1300
#MinAlt1: 2000
#EOF
To explain this file... L3dt as you may be able to tell, will apply textures depending on the slope, the height that it is at, etc. These climate files are very hard to understand, however, once you start messing with making your own, you start to see how your changes effect the map. This is also a good place to note that: L3dt was designed to make pretty pictures of maps, not to make spring maps, so the texture map might end up looking a little bland, until you have compiled your map. Alternatively, after you have rendered your map in l3dt, you can save the map and use l3dt's viewer to view what it looks like in 3d. It's not perfect, but it will give you a really good idea on what you need to change to make it better.
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”.
Now, go back to 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, keep in mind that this is AFTER you have imported the huge heightmap into l3dt, so now click on operations – design map. This will pop up the same dialog option that you saw when you were making the heightmap earlier. Don't worry about changing the sliders as they will have no purpose this time around, just change the climate being used, to your new climate. Now hit ok.
Making the design map should only take a minute or two, if that. When the design map comes up you should see your map in a very pixelated view. The more red that an area is, the more likely that there will be rock there. If it looks as though your terrain won't be the way you want it, you can click options – heightfield- change horizontal scale. Changing the horizontal scale is what makes l3dt be picky or not picky about slight changes in height. If you change this you will need to re-render the design map.
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:
![Image](http://img517.imageshack.us/img517/5405/attributesmap5it.th.jpg)
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.zipKeep 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.
![Image](http://img497.imageshack.us/img497/9903/canmini6oi.th.jpg)
![Image](http://img503.imageshack.us/img503/5659/111canyonmini8oq.th.jpg)
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:
![Image](http://img111.imageshack.us/img111/6671/metalpatch49ml.jpg)
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 Section3. 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 ).
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:
![Image](http://img221.imageshack.us/img221/3559/metal2jx.th.jpg)
You are now about 46% done.
Next Section4. 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.
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!?!?
![Smile :)](./images/smilies/icon_smile.gif)
, if not, here is a link to my packaged version.
http://fileuniverse.com/?p=showitem&ID=2589 ) 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 place a feature on the feature map, use 1x1 pixel of red (color of your feature) on the feature map. It map also help you to know that a 1 x 1 pixel on the feature map roughly equals out to a 1x1 footprint in spring.
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;
}
It may take a few trues to get things right, but don't give up. It will become clear to you quite quickly exactly how it works in game.
Save feature.bmp
For referance, here is what my feature map looks like:
You are now about 70(some odd) percent done.