map creation question

map creation question

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

Moderator: Moderators

Linez
Posts: 1
Joined: 17 Dec 2008, 11:05

map creation question

Post by Linez »

I am using spring engine to make a game and i was flipping through your tutorials and most of the links were dead i am also wondering how to use the mother mapconv.exe most of this stuff isnt explained and i would like an up-to-date tutorial or atleast someone to post a quick and simple way of how to do this. :|
User avatar
SirArtturi
Posts: 1164
Joined: 23 Jan 2008, 18:29

Re: map creation question

Post by SirArtturi »

marcel.lowrie
Posts: 13
Joined: 17 Dec 2008, 11:02

Re: map creation question

Post by marcel.lowrie »

We've already been looking over those pages. But are having issues finding the software mentioned as it is a little outdated.

And the material on sm3 is a little confusing, and with no real-world examples of working maps to look at, it's difficult to grasp how it works.

Thanks for the reply though, up next is some more trial and error testing i suppose.
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Re: map creation question

Post by Pressure Line »

it's difficult to grasp how it works.
sm3 doesn't work.
marcel.lowrie
Posts: 13
Joined: 17 Dec 2008, 11:02

Re: map creation question

Post by marcel.lowrie »

Thats interesting....

Well, i was able to get the smf format working, however the map i made is almost entirely water......Is there a way to control where the water level is? Or will i have to change the height map to be....higher up or something?

Any tips would be helpful, thanks for the reply.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: map creation question

Post by lurker »

Sea level is 0. You set the min and max height to get what you want.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: map creation question

Post by Argh »

1. Mother's MapConv is entirely outdated.

Download and use this, instead.

It's already preset- all you have to do, really, is just change the name of the SMF in the batch file from "YourMapNameHere" to whatever, and make the files specified- height.raw, terrain.tif, metal.tif, feature.tif.

2. Making a map is really pretty easy. The tutorials make it sound a lot more difficult than they should.

Basically, a map is made with 4 bitmaps. I always use 3 TIFs and 1 RAW, for maximum fidelity (and it compresses a LOT FASTER), although you're welcome to try other formats.

A. Your heightmap must be power-of-two + 1. So 513 X 513 == an "8X8" - a standard for size used by players, referring back to when maps were really X numbers of screens wide in OTA (yes, it's very confusing, if you never played OTA).

B. You must include a metalmap, whether or not your game uses metal. It must match the dimensions of the heightmap.

C. You must include a featuremap, which must be the size of the heightmap -1 (iow, a true power-of-two).

D. Finally, you must make a terrainmap (your diffuse texture), which must be the power-of-two * 8 (so, a 512 square map == 4096).

E. While you can set up the relative heights when compressing the map, this is not the ideal way to do so at this time.

Spring now supports entering the heights in the SMD, like this:

Code: Select all

[MAP]
{
	Description=MyMapName;
	TidalStrength=25;
	Gravity=130;
	MaxMetal=0.1;
	ExtractorRadius=512;
	MapHardness=999999999999999999;
	DetailTex=myDetailTex.bmp;
	AutoShowMetal=1;
	NotDeformable=1;
	voidwater=0;
	[SMF] 
	{
	minheight = -125;
	maxheight =  175;
	}
....
Which is obviously a much faster way to adjust things until they look right.

Lastly... the various tutorials are great, but I'd warn you that you should expect a certain amount of head-butting before you get it right. None of the tutorials really covers everything, and most of them have various omissions that are pretty important, so you should be prepared to read all of them... and bear in mind that, while the map format really hasn't changed in quite some time, the tools available certainly have. I make maps with a combination of L3DT, PhotoShop and HeightMapTweak, but there are lots of other tools available, including a realtime map editor that I keep wanting to get around to playing with, but never do :P

Among other things, it's really important to use RAW format for heightmaps, it produces a much better result. You can convert from BMP to RAW using HeightMapTweak, among other tools, and user's MapConverter will use its output correctly.
marcel.lowrie
Posts: 13
Joined: 17 Dec 2008, 11:02

Re: map creation question

Post by marcel.lowrie »

thanks for the great info man

as for using tiff for faster compression, im not really worried about that, the bmp's compressed in about 1 min.


EDIT: i know its me doing something wrong, but when i load the map up using your files i get no height detail, just a flat map....Could you point me to the right direction?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: map creation question

Post by Argh »

EDIT: i know its me doing something wrong, but when i load the map up using your files i get no height detail, just a flat map....Could you point me to the right direction?
Yes.

Either add the section:

Code: Select all

   [SMF]
   {
   minheight = -125;
   maxheight =  175;
   }
To your SMD file (that text file that's included with all maps). See the example above this post for where to put it, it should be pretty obvious.

Or download SMFED (you can find it around here, or on the file sites) to set max / min heights. I prefer to do it with the textfile, but either way works.
marcel.lowrie
Posts: 13
Joined: 17 Dec 2008, 11:02

Re: map creation question

Post by marcel.lowrie »

I already did that, still getting no height in the map. I tried taking it out as well.

here is a sniped from the cli, seems to be trying to look for a file by 2 image types.


Code: Select all

ECHO is off.

Edit this file in notepad.

Make sure all map bitmaps are present in the same directory as Mapconv.

Mapconv help will now display.
nvdxt.exe -file temp\*.tif -nmips 5 -dxt1 -box -fadeamount 0
found option ignoreheight in option file
found option keepminimap in option file
file format for tiles is:tif.
Loading texture
current texture width:2048
current texture height:2048
Creating height map...
Creating features
current feature map width:256
current feature map height:256
Grass Placement:
[removed all this]
A subdirectory or file temp already exists.
Writing tile files 25%
Writing tile files 50%
Writing tile files 75%
Writing tile files 100%
Creating dds files
texture program: nvdxt.
Version 8.30
    Reading temp\Temp000.tif  [Processing] Writing .\Temp000.dds
    Reading temp\Temp001.tif  [Processing] Writing .\Temp001.dds
    Reading temp\Temp002.tif  [Processing] Writing .\Temp002.dds
    Reading temp\Temp003.tif  [Processing] Writing .\Temp003.dds
calculating map id...
map id:16908052947631151340
converting it to something that can be used in spring...
map id:-1156769556
saving heightmap...
saving type map...
creating minimap...
Version 8.30
    Reading mini.png  [Processing] Writing .\mini.dds
saving minimap...
Creating tiles 1018/1024 25%
Creating tiles 2036/2048 50%
Creating tiles 3051/3072 75%
Creating tiles 4075/4096 100%
Saving metal map...
current metalmap width:257
current metalmap height:257
Writing 0 features
Could Not Find E:\WORK\-----------\----------\------------\mapconv\temp\T
emp*.png.raw
Press any key to continue . . .
Just wondering if i did something wrong, I'm using png files for everything but the height map, its a .raw. Imported to HeightMapTweak from a png, then exported to .raw. As you said you do.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: map creation question

Post by Argh »

PNG is not recommended. That said, it sounds like you're maybe reading the wrong file, or something. Post your heightmap and your batch file.
marcel.lowrie
Posts: 13
Joined: 17 Dec 2008, 11:02

Re: map creation question

Post by marcel.lowrie »

here:

Code: Select all

mapconv.exe -l -x 101 -n 100 -m metalmap.png -a heightmap.raw -t texture.png -f features.png -c 0.5 -o red-desert.smf -q 100 -z compressor.txt -w special.txt
pause
heightmap.7z
(19.1 KiB) Downloaded 11 times

As for using png, its the only thing i can get EarthSculptor to export...
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: map creation question

Post by Argh »

The heightmap looks just fine to me. Try using TIF, instead of PNG. I seem to recall having errors with PNG, it's some lame issue with DevIL.

Also, the metal's 257, but the feature's 256, I presume.
Last edited by Argh on 18 Dec 2008, 11:09, edited 1 time in total.
marcel.lowrie
Posts: 13
Joined: 17 Dec 2008, 11:02

Re: map creation question

Post by marcel.lowrie »

I used tiff with a different map, and it produced the same result. I was trying PNG to see if tiff was the problem...
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: map creation question

Post by Argh »

I'm running a quickie on your heightmap to test that it's working all right.

Oh, and one last thing... maybe it's that dash in the name. Underscores are all right, but that may be causing problems.
marcel.lowrie
Posts: 13
Joined: 17 Dec 2008, 11:02

Re: map creation question

Post by marcel.lowrie »

Cool thanks, i tried renaming it. No luck.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: map creation question

Post by Argh »

Hmm. Here's the map, after running the compressor.

Here are the files used to make it.

One last thing (I have to go to bed really, really soon). Did you make sure that all layers were flattened on all images used?
marcel.lowrie
Posts: 13
Joined: 17 Dec 2008, 11:02

Re: map creation question

Post by marcel.lowrie »

That RedMars one says its missing the smd file, as for layers i will check but im fairly sure png doesnt support layers :P
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: map creation question

Post by Argh »

Try the link again, I zipped the directory one layer too deep, lol. Sorry, it's very late here.

I seem to recall that with Photoshop, it treats PNG like it's not flattened, so I was wondering. But you said you started with BMP...
marcel.lowrie
Posts: 13
Joined: 17 Dec 2008, 11:02

Re: map creation question

Post by marcel.lowrie »

That map works properly, here is mine, for when you get on.
Post Reply

Return to “Map Creation”