map features

map features

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
AndrewAce3158
Posts: 5
Joined: 04 Aug 2005, 05:27

map features

Post by AndrewAce3158 »

Hello

zwzsg suggested that I make a version of my feature placer program for Spring. I had a look at some of the code, but I really cant read C that well.

Can someone explain the map format for me? Mainly, how do I find and edit the features within a map file?
mufdvr222
Posts: 681
Joined: 01 May 2005, 09:24

Post by mufdvr222 »

As far as I understand it the original mapconv released in the "map tools" package places trees wherever there is green terrain, this version here uses the metal map to specify what feature and where.
The map format in its simplest form is three .bmp or raw images, one is the terrain texture the other two are heightmap and metal map which is a black image with red being the channel for metal, the higher the red number the greater the metal output, green 255 x 1 pixel is a geo vent.
Nitrus released a version of mapconv that used the following method of feature placement.
This mapconv.exe is for the old version of spring and will not work with the latest version as far as I know.

There is a lot more to the latest version of mapconv but someone else here would be better able to explain it to you.


Mapconv.exe extended version


--------------------------------------------------------------------------------



It combines all previous patches:
allows larger than 26x26 maps
No trees or grass on green of main texture
new command line option "-e" to use my edge priority compression method
Feature placing using the metal map (see start of this thread for more details)
also allows custom bitmaps to be placed on the terrain similar to the way the geovent bitmap is placed.

Green channel values on Metal map. 1 pixel = 1 feature.
128=Grass (Doesn't show up in my version of Spring.)
200 to 207=Pine type Tree
208 to 215=Broadleaf type Tree
220 to 235=Splat bitmap (useful for metal patches or maybe scorch marks etc)
255=Geovent

eg.
220 will splat bitmap named "splat0.bmp"
225 will splat bitmap named "splat5.bmp"

Notes about splat bitmaps:
They should have dimensions that are multipes of 32
magenta (v.bright purple) is used as transparent. rgb(255,0,255)
The position of the pixel on the metal map marks the center point of the bitmap

I've also included the metal patches I've been using and a new geovent with magenta background.

Created by nitrus for your convenience. Read the original topic about the matter
AndrewAce3158
Posts: 5
Joined: 04 Aug 2005, 05:27

Post by AndrewAce3158 »

that doesnt help much, sorry... i need to know exactly where in the file things are.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Try looking at the source code, specifically at buggis mapconv and the map making utilities, buggi will know the rest.
AndrewAce3158
Posts: 5
Joined: 04 Aug 2005, 05:27

Post by AndrewAce3158 »

i already said i dont read c that well, i need english!
Post Reply

Return to “Engine”