New MAPCONV
Moderator: Moderators
New MAPCONV
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 ). 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?? )
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 ). 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?? )
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. Is the changed code in CVS? I'd be happy to include those changes and update CVS.zwzsg wrote:
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
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.
-
- Posts: 578
- Joined: 19 Aug 2004, 17:38
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.
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.
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.
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.
Yes!!! I wanted to do this modification but lacked the time, thanks nitrus for adding this feature!Sean Mirrsen wrote:Great work, nitrus!
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.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.
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.
-
- Posts: 111
- Joined: 23 Jan 2005, 00:09
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?
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?
-
- Posts: 18
- Joined: 28 Apr 2005, 01:44
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 limitTARevenger 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?
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.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
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!
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!
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).Buggi wrote:We need to work on a new map format, not put bandaids on the existing format.
-Buggi
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?