Map design software?

Map design software?

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

Moderator: Moderators

Post Reply
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Map design software?

Post by hughperkins »

Are there any existing applications out there for creating maps/missions? At least, height maps? ie, you see a flat plain, and you can push land up or down with left/right mouse button, using a brush of varying sizes, along the lines of SecondLife land editor.

If no, is that because making a map from a texture is easy or because there's other tools that can achieve the same thing (build a mesh in Blender and save as heightmap???) or because making a height map editor is difficult or because noone cares - theres already enough maps - or something else?

Edit: Height map editor created here: http://manageddreams.com/csai/MapDesigner.zip

- Left-click to raise land, right-click to lower
- Change brush size
- Flatten land
- Export as heightmap and /or as slopemap
- Exported slopemap color-coded by movement area, eg infantry, vehicle and extreme (configurable)

User interface:
Image

Generated heightmap:
Image

Exported slopemap:
Image
Last edited by hughperkins on 24 Nov 2006, 20:55, edited 2 times in total.
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Post by NOiZE »

well i make my heightmaps in Photoshop, but making slopes is sometimes rather trouble some, would really love a good program to make nice heightmaps.
bamb
Posts: 350
Joined: 04 Apr 2006, 14:20

Post by bamb »

Not exactly a response, but you can use L3DT and forboding's tut sticky on this forum to create a small test map really quickly...
L3DT is free for small maps, it's a terrain generation software but takes some heightmap input if you need... and has some kind of an editor too.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

The bigger picture, in the longer term, is going to be the need for a visual editor that will allow users to interactively work with SM3 mapping. With splatting, it is technically possible to have a texture that is not distorted on a sheer face, for example... none of the current tools address this.
bamb
Posts: 350
Joined: 04 Apr 2006, 14:20

Post by bamb »

Could the guy who makes L3DT work with the devs? It's a damn good software... Maybe not a whole solution but something with export at least.
User avatar
BlackLiger
Posts: 1371
Joined: 05 Oct 2004, 21:58

Post by BlackLiger »

Its in the list of things for people to try and develop. I'm gonna give it a go later this year or early next.
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Post by hughperkins »

Created a prototype map height editor at:

http://manageddreams.com/csai/MapDesigner.zip

To run, run MapDesigner.exe

left click on land to raise it, right click to lower it

ctrl-s to save into heightmap_out.bmp (takes a while)

j or middlemousebutton + move mouse to move around. scrollbutton changes viewing angle. j + move scroll button changes zoom

Mapsize hardcoded at 1025 x 1025 (in Rendering/DrawGrid.cs)

Key configuration in config.xml

The zip contains sourcecode and Windows binaries. Sourcecode is in C#, using SDL.Net and Tao.OpenGl. It's also in SVN at Tools/MapDesigner

Image
User avatar
hydr1x
Posts: 37
Joined: 12 Sep 2006, 04:51

Post by hydr1x »

holly crap that looks cool ima have to try it
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

Something we could really use for mapping with the new format is a slopemap generator. Read a height map and spit out a slope map.

For reference a slopemap is a map where the greater the slope the darker the texture in that area. So that is to say, where on a heightmap at the bottom of your mountain you would have black and at the top of your mountain you would have white and the slope would be gradually lightening shades, on a slope map on the bottom it would be white, the top would be white (because both are relatively flat) and the slope would be dark (darker where it is steeper and lighter where it is flatter).

The reason for the need for this is the way the new map format works. it's a little awkward to manually paint mountainsides and what not. In real terrain it's common to have a situation where grass may not grow on steep mountain sides, but it can grow on the flats both at the top and bottom, or snow won't stick to steeps, but it will stick to flats. This really can't be emulated with photoshop for use in mapping at the moment, having a slope map to edit as a second layer would make generating the texture transparency masks much easier from photoshop.

However if you're not looking for feature suggestions ignore this post :P
bamb
Posts: 350
Joined: 04 Apr 2006, 14:20

Post by bamb »

Really nice!
hmm seems i have NET framework 1.1, gotta dl that 2. something for this to work. I'll test soon.
User avatar
LOrDo
Posts: 1154
Joined: 27 Feb 2006, 00:21

Post by LOrDo »

You can already do this with alot of programs out there. Theres terragen, free, but I dunno if it can export as a bitmap. My personal choice, Bryce, i export it as a PGM and open it in GIMP, tweak it, and save it as a .BMP. I have somthing called TGE Terrain Editor that works like hugh perkins but with adjustable brush sizes and types. And textures. The list goes on...
User avatar
Erom
Posts: 1115
Joined: 25 Apr 2006, 05:08

Post by Erom »

Also, if you want to emulate that effect in photoshop/gimp, run a Find Edges filter on your heightmap, using a Difference of Gaussians type ( I think), then invert it. That wont give you a true slopmap, but it will darken steep areas and leave the rest light. It really only works on cliffs though - shallow ramps get quantized, which makes the terrain look like it has countour lines on it.

But I aggree, a proper slopemap generator would be useful.
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Post by hughperkins »

New version of MapDesigner. File linked to by URL above has been updated. SVN update in progress.

Changes:
*Added slopemap export. ctrl-f2 to export to slopemap.bmp
*Default heightmap filename is now heightmap.bmp
*ctrl-l will load heightmap.bmp
*Cleaned up config.xml:
- added camera translate and rotate speed
- added heighteditor speed and default brushsize
- added default map width and height
- added default heightmap and slopemap filename
- added export slope map, max slope
- added heightmap minimum and maximum

Example slopemap export:

Heightmap:

Image

Corresponding slopemap:

Image
User avatar
hydr1x
Posts: 37
Joined: 12 Sep 2006, 04:51

Post by hydr1x »

hmm intresting
User avatar
NOiZE
Balanced Annihilation Developer
Posts: 3984
Joined: 28 Apr 2005, 19:29

Post by NOiZE »

hughperkins wrote: Mapsize hardcoded at 1025 x 1025 (in Rendering/DrawGrid.cs)
nice tool, but please don't hardcode that :(
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

Also, we can import height maps right? It's kind of useless if it can only work from blank templates...
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

ungh

you guys forget so many variables when talking about slope maps.

First there is the issue of height. the map height determines how steep a surface will be.

Furthurmore, you have to consider the lowpass option (which is the closest thing to 16bit heightmaps we are gonna get with mapconv, considering that raw files support is shaky at best.


That said... Hugh, would you consider perhaps writing a better mapconv program? In particular, one that supports, mosaic tiles, and png? Also, the current mapconv has an upper file size limit of 600 megs for texture images. It would be nice to see that disappear.
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

Forboding Angel wrote:ungh

you guys forget so many variables when talking about slope maps.

First there is the issue of height. the map height determines how steep a surface will be.

Furthurmore, you have to consider the lowpass option (which is the closest thing to 16bit heightmaps we are gonna get with mapconv, considering that raw files support is shaky at best.


That said... Hugh, would you consider perhaps writing a better mapconv program? In particular, one that supports, mosaic tiles, and png? Also, the current mapconv has an upper file size limit of 600 megs for texture images. It would be nice to see that disappear.
The variance in map height doesn't change the accuracy of the slope map, increasing map height doesn't make only certain slopes steeper, it makes all the slopes steeper, so your slope map is still an accurate representation, just scaled differently. As for lowpass, can you outline exactly what that does to heightmap as it is put in game? It's possible that it's emulatable by the slopemap with certain photoshop filters either way.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Post by Forboding Angel »

Hmm, that's a good question. Honestly tbh I don't think anyone really knows what the lowpass option does exactly.

It is my personal belief that it basicially does 1 of two things.

1st (and probably the most unlikely): Performs guassian blur (equating to probably about a .5 pixel blur), and converts the image to 16 bit RAW.

2nd: Simply performs a guassian blur on the heightmap.

Imo 2 is probably the most likely. It softens the edges of the heightmap in some way and honestly a blur is about the only sensible solution that I can think of.


See that thing is SS, a slopemap is of no use if it does not tell you certain things. For example. I output slopemap, I need to know what the maxslope value of that slope is at Y height values. Otherwise it is no good to me. You can tell how drastic your slopes are by simply looking at your heightmap. A slopemap without hard values is simply not useful.


As far as emulating with photoshop filters, there is a way (that I can't remember atm), that will basically use rgb values for height representation, and while useful, it's not worth the trouble to make.

We really need something that can translate slopemaps into springs idea of a MaxSlope=x; value. Otherwise the worth of having a slopemap is dubious at best, and would be only useful to newbie mapmakers (which might be reason enough to proceed, just I want something better and us experienced guys can use).
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Post by hughperkins »

Some points:
*the default mapsize is customizeable via config.xml (open with notepad)
*loading an existing map with a different size should change the mapsize
*You can load existing maps. Copy the existing bmp into the MapDesigner directory with the name "heightmap.bmp", then ctrl-l to load map.
*The slopemap is generated with the Spring algorithm, taken from ReadMap.h
*There are some parameters in config.xml to control the slopemap generation. You can open config.xml using notepad.
- exportmaxslope controls how the slopes are mapped to the bmp. 0 slope is mapped to 0. exportmaxslope is mapped to 255. Everything else falls within the two. Higher slopes are mapped to 255.
- you can control minimum and maximum height from the config file. This should affect slope generation.

Edit: just for info, here's the slopemap algorithm, in Mapping/SlopeMap.cs. The original C++ is in ReadMap.cpp.

Code: Select all

        // ported from Spring's ReadMap.cpp by Hugh Perkins
        public double[,]GetSlopeMap()
        {
            HeightMap heightmap = HeightMap.GetInstance();
            float[,] mesh = heightmap.Map;

            int mapwidth = heightmap.Width;
            int mapheight = heightmap.Height;
            
            slopemapwidth = mapwidth / 2;
            slopemapheight = mapheight / 2;
            
            //logfile.WriteLine( "Getting heightmap, this could take a while... " );
            
            double[,]SlopeMap = new double[ slopemapwidth, slopemapheight ];

            for(int y = 2; y < mapheight - 2; y+= 2)
            {
                for(int x = 2; x < mapwidth - 2; x+= 2)
                {
                    Vector3 e1 = new Vector3(-squaresize * 4, mesh[x - 1, y - 1] - mesh[x + 3, y - 1], 0);
                    Vector3 e2 = new Vector3(0, mesh[x - 1, y - 1] - mesh[x - 1, y + 3], -squaresize * 4);

                    Vector3 n = Vector3.CrossProduct( e2, e1 );
        
                    n.Normalize();

                    e1 = new Vector3(squaresize * 4, mesh[x + 3, y + 3] - mesh[x - 1, y + 3], 0);
                    e2 = new Vector3(0, mesh[x + 3, y + 3] - mesh[x + 3, y - 1], squaresize * 4);

                    Vector3 n2 = Vector3.CrossProduct( e2, e1 );
                    n2.Normalize();

                    SlopeMap[ x / 2, y / 2 ]= 1 - ( n.y + n2.y ) * 0.5;
                }
            }
            //logfile.WriteLine("... slopes calculated" );
            return SlopeMap;
        }
Post Reply

Return to “Map Creation”