HOWTO: Green texture maps without trees

HOWTO: Green texture maps without trees

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

Moderator: Moderators

Post Reply
User avatar
Gabba
Posts: 319
Joined: 08 Sep 2004, 22:59

HOWTO: Green texture maps without trees

Post by Gabba »

---------
Edit: you can now find mapconv.exe compiled with this fix here. It's not official or supported by the SY, but it should work.
---------

Yay this is my first code contribution to TA Spring! All it does is modify the mapconv.exe to prevent it from generating trees and grass on the map. This is for those map-makers who wanted to make maps with some green texture but got flooded with trees.

To use this modification, download the 0.41b1 source code, and do the following changes to the FeatureCreator.cpp file in /MapConv:

Add /* before (and on the same line as) //trees (should be on line 313).
Add */ after (and on the same line as) the second-to-last closing bracket at the end of the file (should be on line 365).

Code: Select all

/*	//trees

	unsigned char* map=new unsigned char[ysize*xsize];

	for(int y=0;y<ysize;++y){

		for(int x=0;x<xsize;++x){
.....
.........
..... MANY LINES SKIPPED
........
.....
				ffs.zpos=(float)y*32+16;



				features.push_back(ffs);

			}

		}

	} */

}

Compile the mapconv utility.

Please let me know if it works well. Hopefully I'll get more time and add a switch which turns that option on and off, and maybe even move the generating of trees/grass to color dots in the metal map.
Last edited by Gabba on 04 May 2005, 21:34, edited 3 times in total.
User avatar
Storm
Posts: 443
Joined: 12 Sep 2004, 22:23

Post by Storm »

Qusetion: Will this affect my compatibility with other players? If so, wouldn't it be easier to lobby the SYs to include it into the next release?
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

It's a change in mapconv. In the map making program. Your question is like "does using annihilator instead of taelite makes my TA incompatible with others?"
User avatar
Gabba
Posts: 319
Joined: 08 Sep 2004, 22:59

Post by Gabba »

zwzsg wrote:It's a change in mapconv. In the map making program. Your question is like "does using annihilator instead of taelite makes my TA incompatible with others?"
Exactly. It doesn't change anything to the map format. It just doesn't put trees/grass on the map when it's being "compiled".
User avatar
Storm
Posts: 443
Joined: 12 Sep 2004, 22:23

Post by Storm »

I misread that. Mapconv has nothing to do with the engine.
User avatar
Gabba
Posts: 319
Joined: 08 Sep 2004, 22:59

Post by Gabba »

I finally managed to compile it - I uploaded the modified mapconv.exe at FileUniverse. I made a test map and it works well. So when you classify it with the Spring files, Storm, I'll edit my post to put a link to it.
User avatar
Storm
Posts: 443
Joined: 12 Sep 2004, 22:23

Post by Storm »

The [ adress ] is the same, no matter how I move it. I put it under map tools now.
User avatar
Redfish
Posts: 289
Joined: 27 Feb 2005, 16:12

Post by Redfish »

It would also be nice to have a metal map with blue dots(like the green for geos) add the metal patch texture automatically on that spot.
SporkNinja
Posts: 18
Joined: 28 Apr 2005, 01:44

Post by SporkNinja »

Redfish wrote:It would also be nice to have a metal map with blue dots(like the green for geos) add the metal patch texture automatically on that spot.
well uf we could have more colors than just a blue dot maybe it could be other metal deposits since if it works like that there could only be one metal patch type per map
User avatar
Redfish
Posts: 289
Joined: 27 Feb 2005, 16:12

Post by Redfish »

yes however at present the mapconv only looks at one channel(R G or B) and can't do different colors like orange or something or pure yellow because it will be blue and green with maximum values(255).

It would be sweet to have the mapconv have an option like -notrees
that toggles tree creation on and off.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

SporkNinja wrote:
Redfish wrote:It would also be nice to have a metal map with blue dots(like the green for geos) add the metal patch texture automatically on that spot.
well uf we could have more colors than just a blue dot maybe it could be other metal deposits since if it works like that there could only be one metal patch type per map
You can have different shade of pure blue. They are different concentration of metal. You "could" in theory program somthing that each time it sees a blue dot, looks at its concentration of blue, enlarge it to a metal extractor size, and add a metal1.bmp / metal2.bmp / metal3.bmp on the corresponding of the texture map according to the metal value. We just needs some C programmer to add that to mapconv.
SporkNinja
Posts: 18
Joined: 28 Apr 2005, 01:44

Post by SporkNinja »

zwzsg wrote:
SporkNinja wrote:
Redfish wrote:It would also be nice to have a metal map with blue dots(like the green for geos) add the metal patch texture automatically on that spot.
well uf we could have more colors than just a blue dot maybe it could be other metal deposits since if it works like that there could only be one metal patch type per map
You can have different shade of pure blue. They are different concentration of metal. You "could" in theory program somthing that each time it sees a blue dot, looks at its concentration of blue, enlarge it to a metal extractor size, and add a metal1.bmp / metal2.bmp / metal3.bmp on the corresponding of the texture map according to the metal value. We just needs some C programmer to add that to mapconv.
yea thats what i was thinking when i posted that :roll: but i didn't type but i was thinking like 255 blue for one metal deposit look then 254 for another look and so on :P
User avatar
Redfish
Posts: 289
Joined: 27 Feb 2005, 16:12

Post by Redfish »

I think if we want to keep to original ta style we'd have to make preset patches. Even though it's theoretically possible to have a map with a metal patch that gives anything from 0.1 to 2.3, still most maps use something in between. Like comet catcher 2.0 1.1(or even 1.0) and 0.5. Gow 2.0 and 1.1. Most maps will not do that many steps in between, so maybe we could assign certain ranges to a certain metal density. Like 200-255 = 2.0(or 2.3 on metal map). 155-200 = 1.5.
100-150= 1.0 and 50-100 = 0.5 or something similar. Question is still, who's going to program it?
SporkNinja
Posts: 18
Joined: 28 Apr 2005, 01:44

Post by SporkNinja »

Redfish wrote:I think if we want to keep to original ta style we'd have to make preset patches. Even though it's theoretically possible to have a map with a metal patch that gives anything from 0.1 to 2.3, still most maps use something in between. Like comet catcher 2.0 1.1(or even 1.0) and 0.5. Gow 2.0 and 1.1. Most maps will not do that many steps in between, so maybe we could assign certain ranges to a certain metal density. Like 200-255 = 2.0(or 2.3 on metal map). 155-200 = 1.5.
100-150= 1.0 and 50-100 = 0.5 or something similar. Question is still, who's going to program it?
well i doubt SY would tho it would be awesome or if gabbas proficient skill could possibly manage this.

Another question i wonder if some on could probally do the same idea for the metal but for trees like 1 g for trees on that painted area on the metal map or whatever color 100 or 255 =/ i mean i *some* in my maps but not spawning every where like tree hell has broke loose. one 1 pixel could represent 1 tree? or 5 pixel one tree? since i just want to paint some areas with trees and some not. I know this since i ported over Evad River Confluence (i just need to resize it since its 10x11 and the right side is cut off by one =/) but anyways when i tested my map out the trees spawned everywhere which was decent i guess kinda gave me a feel for the map but when units can't move thru the trees and one slight spark your whole base can blow up if trees surround your base and reclaiming is too much work even with draging reclaim feature Which is nice btw
User avatar
Gabba
Posts: 319
Joined: 08 Sep 2004, 22:59

Post by Gabba »

SporkNinja wrote:it would be awesome or if gabbas proficient skill could possibly manage this
:lol: I don't think I deserve that compliment yet. Thanks anyways!
Another question i wonder if some on could probally do the same idea for the metal but for trees like 1 g for trees on that painted area on the metal map or whatever color 100 or 255 =/ i mean i *some* in my maps but not spawning every where like tree hell has broke loose. one 1 pixel could represent 1 tree? or 5 pixel one tree? since i just want to paint some areas with trees and some not. I know this since i ported over Evad River Confluence (i just need to resize it since its 10x11 and the right side is cut off by one =/) but anyways when i tested my map out the trees spawned everywhere which was decent i guess kinda gave me a feel for the map but when units can't move thru the trees and one slight spark your whole base can blow up if trees surround your base and reclaiming is too much work even with draging reclaim feature Which is nice btw
I like metal the way it is in Spring, actually, so I won't be the one to do the metal patch thing. BUT I am interested in tree/grass placement, and in allowing people to add more features from 3do models or however the current trees work. Give me time, though, quite a bit of time, because right now I'm still struggling with C++ syntax (Java is what I know best) and I mainly do "monkeywork", that is, I imitate already existing code in the game.

Probably my next achievement will be to add a -notrees switch to mapconv, instead of disabling them completely. Then I'll get into the trees placement problem. In the meanwhile, enjoy your treeless maps!
Post Reply

Return to “Map Creation”