SpringMapEdit - CLI interface

SpringMapEdit - CLI interface

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

Moderator: Moderators

Post Reply
Frostregen
Posts: 179
Joined: 17 Jul 2007, 00:52

SpringMapEdit - CLI interface

Post by Frostregen »

Hi everyone,

with all these mapconv clones emerging,
I thought it would be nice to add a commandline interface to
SME to accomplish the same.
Mainly because SME is quite fast in compiling (uses the graphics card for DXT1 compression):
8x8: 4s
16x16: 16s
32x32: 74s
(times just for exporting to sm2, not loading...so complete compiling may take more time)
Actually you are able to decompile as well.

My current interface looks like this:

Code: Select all

* Immediate Settings (order does not matter):
* 
* -batchmode			//Disables rendering and hides GUI. Optimizes memory usage,
* 					//speeds up batch processing, quits after executing all given commands.
* -mapwidth <N>			//initial mapsize in spring units 2-32
* -mapheight <N>		//saves some time if set to same values as to be loaded heightmap
* -texturemapdds <xyz.dds>	//path to precompressed DXT1 file (only for sm2 exporting)
* -mc_featurelist <xyz.tdf>	//path to mapconv style featurelist
* 
* 
* Batch commands (executed in given order):
* 
* -load_heightmap <xyz.bmp>	//load heightmapfile
* -load_texturemap <xyz.bmp>	//load texturemap
* -load_metalmap <xyz.bmp>		//load metalmap
* -load_typemap <xyz.bmp>		//load typemap
* -load_featuremap <xyz.fmf>	//load featuremap
* -load_mc_featuremap <xyz.bmp>	//load mapconv style featuremap (requires mc_featurelist)
* -load_vegetationmap <xyz.bmp>	//load vegetationmap
* -load_allmaps <xyz>			//load all maps
* -load_sm2 <xyz.smf>			//load sm2 map
* 
* -save_heightmap <xyz.bmp>	//save heightmapfile
* -save_texturemap <xyz.bmp>	//save texturemap
* -save_metalmap <xyz.bmp>	//save metalmap
* -save_typemap <xyz.bmp>		//save typemap
* -save_featuremap <xyz.fmf>	//save featuremap
* -save_mc_featuremap <xyz.bmp>	//save mapconv style featuremap (requires mc_featurelist)
* -save_vegetationmap <xyz.bmp>	//save vegetationmap
* -save_allmaps <xyz>			//save all maps in default format
* -save_sm2 <xyz.smf>		//save sm2 map
* 
* -terrainheight <MIN> <MAX>	//set terrainheight. (waterlevel is at 0)
* -erode <script.tdf> <type> //erode heightmap with given script. (type = WET, WET2 or DRY)
* -texgen <script.tdf>		//autotexture with given script
* -smooth <N>			//smooth heightmap. (N = iterations)
Something missing, ideas?
prodigy
Posts: 14
Joined: 19 Apr 2009, 04:58

Re: SpringMapEdit - CLI interface

Post by prodigy »

Hi Frostregen,

Your SME command line interface looks like it covers everything, the only other thing I could suggest (which mapconv is missing) is an option to dither the texture before compressing it. DXT1 compression appears to run a lot faster on dithered (fewer colors) textures. But since SME makes use of hardware DXT compression, a dithering option may be unnecessary.

Maybe a good time to mention the differences between SME, and mapconv, to be clear that these mapconv "clones" may do the same job but are not quite clones in the sense that they have slightly different implementations.

My (prodigy mapconv) does not use video hardware (GPU) at all. The DXT compression is entirely done on the main CPU, and uses the Squish library to do this. It has been compiled natively for Windows and Linux. Probably the main reason anyone would be interested in this mapconv is if they are running on low end hardware.

I believe SME is a much more user friendly tool than mapconv. Although I had trouble running SME on my PC, I think due to missing OpenGL extensions. Is there some way SME can detect and work on lower versions of OpenGL? I can understand if you'd rather work on new features instead of supporting older graphics cards.
Post Reply

Return to “Map Creation”