New MAPCONV

New MAPCONV

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

Moderator: Moderators

nitrus
Posts: 32
Joined: 12 May 2005, 23:28

New MAPCONV

Post by nitrus »

I've put my new version of MAPCONV on Fileuniverse. It lets you put trees on the "metal map" like the placing geothermal vents, also uses my new tile compression routine which gives better/smaller results(at least for my maps)

http://www.fileuniverse.com/?page=showitem&ID=776

OK how to use it.. on the Metal Map.. (probably should be called feature map)

Blue channel is unused (as before)
Red channel is metal (as before)
green channel is used for features:

a green pixel with value:
255=geothermal
200=Tree

I've found it doesn't like it if trees are close to the edge of the map (TAS crashes when loading map) and don't use other values in the green channel. (maybe next version :wink: ). Space your trees out a bit because each one has a width of about 4 - so if two pixels are next to each other the trees will overlap. (maybe you want this?? :shock: )
User avatar
Storm
Posts: 443
Joined: 12 Sep 2004, 22:23

Post by Storm »

NICE SHOT!!

BTW, I've edited that post a bit to fit in with the rest and added in a link to "the post on Spring forums" (could be hard to find otherwise).
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

Image

Is that based on that latest mapconv?
SJ wrote:I noticed another error that prevents mapconv to go beyond about 26*26 maps though so I uploaded another verison to

http://taspring.clan-sy.com/temp/mapconv.exe
Torrasque
Posts: 1022
Joined: 05 Oct 2004, 23:55

Post by Torrasque »

Zwzsg : Are you going to remake your greenhavent map in green and with tree? And your CPIA at a right scale (20*20)?

nitrus: It's a really nice initiative!
nitrus
Posts: 32
Joined: 12 May 2005, 23:28

Post by nitrus »

zwzsg wrote:Image

Is that based on that latest mapconv?
SJ wrote:I noticed another error that prevents mapconv to go beyond about 26*26 maps though so I uploaded another verison to

http://taspring.clan-sy.com/temp/mapconv.exe
Err.. nope. :oops: Is the changed code in CVS? I'd be happy to include those changes and update CVS.

I think I should also put in a Command Line option for selecting the compression method so you can switch back to the default if you're having problems.
nitrus
Posts: 32
Joined: 12 May 2005, 23:28

Post by nitrus »

Storm wrote:NICE SHOT!!

BTW, I've edited that post a bit to fit in with the rest and added in a link to "the post on Spring forums" (could be hard to find otherwise).
Thanks - I did that cos I didn't know if I could edit it after I'd uploaded the file. It was a chicken and egg scenario.. :wink:
User avatar
[K.B.] Napalm Cobra
Posts: 1222
Joined: 16 Aug 2004, 06:15

Post by [K.B.] Napalm Cobra »

Uber.
Warlord
Posts: 26
Joined: 02 Sep 2004, 01:34

Post by Warlord »

thx loads for this nitrus, that tree thing was really annoying...
Sean Mirrsen
Posts: 578
Joined: 19 Aug 2004, 17:38

Post by Sean Mirrsen »

Great work, nitrus!

I can't compile the mapconv properly until I get MSVS.NET 2003 (hopefully today), so could you try to add this kind of system:
Before reading the metalmap, it loads a special text file called "features.txt", in the same folder as the mapconv, and parses the entries it contains to an array. The entries are like "tree1=200","rocksml1=112", "grass2=215", etc. For now it should only contain a tree.
When reading map color data, it compares the green channel value to the entries in the file. 0 is no feature, 255 is geothermal - this shouldn't be changed or overridden. When it encounters a match, it will, ultimately, when they are done, place a feature of the designated type on that spot on the map. Currently, it will place a tree type 1 for any value 200 spot. I don't recall how many tree types are there, but for a value 201 spot, there should be a type 2 tree, etc. Same for grass, but starting from value 215. It would be nice to have the engine automatically detect these things.
I know it's hard, but I would've tried to do it, if I had the compiler now.
User avatar
hrmph
Posts: 1054
Joined: 12 May 2005, 20:08

...

Post by hrmph »

I can't seem to get a single pixel of 200 green to produce a tree. Geysers are showing up fine though. Any ideas?
nitrus
Posts: 32
Joined: 12 May 2005, 23:28

Post by nitrus »

Works OK for me - I've just released my first map "Green Isles" using my modified MAPCONV.

I've made some more code changes to it (since yesterday) so more features can be placed using the MetalMap. (16 tree types and metal patches can be "splatted" on like it does the geo crack graphic) Although the 16 tree types appear more like 8 slightly different pine trees and 8 slightly different broadleaf trees.

I'll try to get that new version onto FileUniverse.. was having problems just now.

You might want to try other green values between 200 and 215, the version I released yesterday also supports the 16 types of tree - I just wasn't sure it was working correctly. :wink:
User avatar
Gabba
Posts: 319
Joined: 08 Sep 2004, 22:59

Post by Gabba »

Sean Mirrsen wrote:Great work, nitrus!
Yes!!! I wanted to do this modification but lacked the time, thanks nitrus for adding this feature!
I can't compile the mapconv properly until I get MSVS.NET 2003 (hopefully today), so could you try to add this kind of system:
Before reading the metalmap, it loads a special text file called "features.txt", in the same folder as the mapconv, and parses the entries it contains to an array. The entries are like "tree1=200","rocksml1=112", "grass2=215", etc. For now it should only contain a tree.
When reading map color data, it compares the green channel value to the entries in the file. 0 is no feature, 255 is geothermal - this shouldn't be changed or overridden. When it encounters a match, it will, ultimately, when they are done, place a feature of the designated type on that spot on the map. Currently, it will place a tree type 1 for any value 200 spot. I don't recall how many tree types are there, but for a value 201 spot, there should be a type 2 tree, etc. Same for grass, but starting from value 215. It would be nice to have the engine automatically detect these things.
I know it's hard, but I would've tried to do it, if I had the compiler now.
I think Sean's idea is great. While we are at it though, do you think you could move feature placement to a new bitmap, called "feature map"? It would make things more orderly by keeping resources-related stuff on the metal map, and it will give us more colors to work with for future features. Also, in the close future, it could be used to delimit various kinds of terrain, that can affect units (such as roads, where units move faster, or sand/swamp/mud/snow, where they move slower.

By the way, can someone find where the 3d models for the trees are hidden, and what's the code that makes them appear? This way we could study how to add more features.
Last edited by Gabba on 22 May 2005, 00:33, edited 1 time in total.
TARevenger
Posts: 111
Joined: 23 Jan 2005, 00:09

Post by TARevenger »

Do I have to resize my bmps files?
because I'm getting a "image file conversion error" and my bmps are sized for the old version.
mainy because i've got a 9728x16384 texture and the old MAPCONV gives me a giantic forest and the fastest way to clear it is DGuning.

using the new version will kill off all the trees an allow to plant them where I want.

by the way the texture file is only a test until I get a good looking one.

Edit: Oops missed the notrees version of MAPCONV but still the question remains
Do I resize my .bmp files?
SporkNinja
Posts: 18
Joined: 28 Apr 2005, 01:44

Post by SporkNinja »

TARevenger wrote:Do I have to resize my bmps files?
because I'm getting a "image file conversion error" and my bmps are sized for the old version.
mainy because i've got a 9728x16384 texture and the old MAPCONV gives me a giantic forest and the fastest way to clear it is DGuning.

using the new version will kill off all the trees an allow to plant them where I want.

by the way the texture file is only a test until I get a good looking one.

Edit: Oops missed the notrees version of MAPCONV but still the question remains
Do I resize my .bmp files?
if you use 0 red 0 blue and 200green you can place trees with nitrus's mapconv but im not sure his is the one that goes beyond the 26x26 limit
nitrus
Posts: 32
Joined: 12 May 2005, 23:28

Post by nitrus »

if you use 0 red 0 blue and 200green you can place trees with nitrus's mapconv but im not sure his is the one that goes beyond the 26x26 limit
The last version didn't have the > 26x26 patch - but I've got that code now from CVS (thanks SJ) - so I'll do a rebuild and put it on Fileuniverse later today.
nitrus
Posts: 32
Joined: 12 May 2005, 23:28

Post by nitrus »

As promised, MAPConv 0.6 is available:

http://www.floridasun.co.uk/TAS/MapConv_v0_6.zip

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.

This version was used this to create Green Isles v2.

This is as far as I'm going to take MAPConv with regard to features on the metal map - although I agree that its a convenient way to mark the placing of features I find its a complete b*tch when you're looking at a huge bitmap to see how many geo's you've got and which trees are which.

Time for a proper MapEditor! :wink:
User avatar
Buggi
Posts: 875
Joined: 29 Apr 2005, 07:46

Post by Buggi »

We need to work on a new map format, not put bandaids on the existing format.

-Buggi
nitrus
Posts: 32
Joined: 12 May 2005, 23:28

Post by nitrus »

Buggi wrote:We need to work on a new map format, not put bandaids on the existing format.

-Buggi
I totally agree - hey, I was just sharing the changes to Mapconv that I used to make my life easier, a few simple changes made it work better for me (and hopefully other people too).

What's the progress on the Map Editor/new map format? I remember seeing a post about someone starting an Editor. Who's doing Editor dev stuff now that needs another pair of hands?
User avatar
Buggi
Posts: 875
Joined: 29 Apr 2005, 07:46

Post by Buggi »

Tha'd be me. :-)
User avatar
Storm
Posts: 443
Joined: 12 Sep 2004, 22:23

Post by Storm »

Uploaded. Couldn't resist.
Locked

Return to “Map Creation”