View Full Version : larger heightmap
punisher454
04-13-2007, 12:48 AM
I am new to BF2 editing (but have done some HL2 and D3 stuff) and am curious about using terrain heightmaps larger than 1025. More specifically I'd like to do terrain at 4096x1, or 2048x2 rather than 1024x4. Has this been explored yet?
zuiquan1
04-13-2007, 02:34 AM
This was from Iridium on our forums, in regards to 1024x8 maps-
The stuff is all in the heightdata.con, terrain.con, and init.con files.
In Heightdata, you need to change these lines:
heightdata.con:
heightmapcluster.setHeightmapSize 2048
(This is the full size. I took this from north sea. In black_sea its 8096, the 1024x8 multiplied out.)
heightmap.setScale 2/0.0025/2
(This is x, y, and z scales. Don't mess with the y scale (as far as i know, im not sure what messing with that would do), but pump the first and last ones to the scale you want.)
heightmap.setScale 8/0.64/8
(There are several lines like this, and they all need to be adjusted, Remeber, this is from north_sea, so 8 corresponds to x2. x8 is therefore 64.)
Terrain.con:
terrain.primaryWorldScale 2/0.0025/2
terrain.secondaryWorldScale 8/0.64/8
(Same as above for both lines. secondary is 64/0.64/64, and primary world scale will become 8/.0025/8 )
Then in init.con, theres the previously mentioned "GameLogic.MaximumLevelViewDistance 1000", which you can make whatever you want, but appears to only respond up to 3000
And thats it. Just change those values wherever those lines appear in those two files and you'll have a scale 8 map.
and this was another post of his regarding even larger scale maps-
Ok, so first off, its ABUNDANTLY clear to me that bf2 was just simply never meant to have maps of x20 http://battleship.phpbbnow.com/images/smiles/default/rebel_biggrin.gif
But it DID work. my biggest problem was the same out-of-bounds errors i had when i attempted an x4 map: essentially the out of bounds zone is everywhere, so you always die after a few seconds. Not much time to mess with stuff and see how everything goes. What DID happen was this:
sanity checks all over the place. several memory sizes apparently went over the accepted values. This DIDN't cause a crash...just error messages. I have the feeling this wouldn't be good for a server, but it might be something that can be worked out.
floating point issues mean the effects and 1p weapons get funky! like all sorts of glitching and flashing. its just cosmetic so far, so maybe worth the giant maps.
Hopefully i can figure out how to fix the combat zone problems so i can look further into this. Even if x20 isn't possible, x4 and x8 might be. If you know anything about this combat zone thing, Zuiquan, please post it!
The out of bounds area was fixed by just adding another combat area around the map...
BUT. here is the thing...
The reason larger maps like this would work for our mod is because there all water, no terrain is involved at all...large maps like these have all sorts of terrain issues...
Look HERE (http://bfeditor.org/forums/index.php?showtopic=5799) for more on the terrain issues....
punisher454
04-13-2007, 08:24 AM
Ok, some good info there, thanks.
But still in those posts I didnt see any references to trying find a way to use 2048 sized heightmaps rather than the 1024 ones.
zuiquan1
04-13-2007, 11:15 PM
The calculation work like this if I'm not mistaken-
2048 would be 1024x2
4096 would be 1024x4
8096 would be 1024x8
Thats how BF2 calculates map sizes....
4096x1 and 2048x2 are effectively the same thing, correct? Unless your talking about it being longer then it is tall...like a rectangle
If thats the case then just make it so the combat area is a rectangle.
punisher454
04-14-2007, 06:35 AM
4096x1 and 2048x2 are effectively the same thing, correct? Unless your talking about it being longer then it is tall...like a rectangle
world size yes both would be a map with 4096 units across. I am not necessarily looking for a larger playing surface, I just want a higher resolution heightmap.
I used some MOLA (Mars Observer Laser Altimeter) terrain data which was tweaked some in Terragen (adjusted the elevation) and used it as a 1025 pixel heightmap. I was very disappointed with the results on a 1024x4 map. Very ugly terrain. It was obvious that a lower multiplier like 2 perhaps would give much better looking results. However a 1024x2 map is too small for my plans, the whole reason i considered BF2 for my plans was the promise of large maps with vehicles and such.
I'm in no rush and wont have time to mess with this for a while. I'll try to make this work with bf2, if I cant get it before this coming winter there is always Megatexture ET:QW But of course that may have some issues as well.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.