tga2ter - Convert your heightmaps into terrain!

Releasing the source files for your mod or map? Post em' here. (Applies to both SWBF1 & SWBF2)

Moderator: Moderators

theultimat
Lieutenant General
Lieutenant General
Posts: 679
Joined: Sun Apr 13, 2008 1:39 pm
Location: UK

Re: tga2ter - Convert your heightmaps into terrain!

Post by theultimat »

Hello again, I've added the following features as you requested:
  • -m or --min - Set the minimum terrain height.
  • -M or --max - Set the maximum terrain height.
All the heights will then be scaled to the range you specify, with black being the lowest height, and white being the largest. If not set, the default range is [0,255].

Download: https://docs.google.com/uc?export=downl ... 29jU0VVQUE
noMatt
2nd Lieutenant
2nd Lieutenant
Posts: 398
Joined: Sun Mar 10, 2013 12:30 pm
Projects :: The Map has no name so see alpha
Games I'm Playing :: Crysis Battlefront
xbox live or psn: No gamertag set
Location: Germaneeee
Contact:

Re: tga2ter - Convert your heightmaps into terrain!

Post by noMatt »

Now its really PERFECT :D Thats what i needed (i think this is better then the scale option, way better).
Since the CryENGINE is using kinda the same system you can now set your terrain up with cryengine and then import it into ZeroEditor.
Thats AWESOME

Thanks alot sir. Youve made BF2 MOdding much much easier/better
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Re: tga2ter - Convert your heightmaps into terrain!

Post by MileHighGuy »

I think I found a glitch. there seem to be walls along the negative height, on 2 adjacent sides. Max was 327 and min was -327. the walls have a height of 0. look here http://imgur.com/a/Spq3n
theultimat
Lieutenant General
Lieutenant General
Posts: 679
Joined: Sun Apr 13, 2008 1:39 pm
Location: UK

Re: tga2ter - Convert your heightmaps into terrain!

Post by theultimat »

noMatt - Thanks, glad you're finding it useful.
MileHighGuy - Thanks for spotting the bug - the issue should be resolved now. If it isn't just let me know and I'll try again. You can use the download link in the first post. Thanks.
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Re: tga2ter - Convert your heightmaps into terrain!

Post by MileHighGuy »

Thanks, but it did not fix it for me. The bug is still there. I made new plain black tga and set the min to be negative, and the walls still appeared

PS: here is a shortcut .bat i wrote for anyone who wants one

save the following in a new txt document and change the ending to .bat. It points to where i made my tga2ter folder, where the exe is located.

cmd -c cd C:/bf2_modtools/tga2ter/
theultimat
Lieutenant General
Lieutenant General
Posts: 679
Joined: Sun Apr 13, 2008 1:39 pm
Location: UK

Re: tga2ter - Convert your heightmaps into terrain!

Post by theultimat »

Hi MileHighGuy - sorry about that, I forgot to multiply the height of the border by the overall map scale... It should all be fixed up now though! So the border will now be set to the map's minimum height. Here's the new link: https://docs.google.com/uc?export=downl ... C1pMGdQMzQ
Enjoy!
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Re: tga2ter - Convert your heightmaps into terrain!

Post by MileHighGuy »

It works perfectly! thanks.

EDIT: how to make heightmaps with gimp http://springrts.com/wiki/Height_Map_Tutorial
User avatar
The Nasal Abyss
1st Lieutenant
1st Lieutenant
Posts: 428
Joined: Sun Sep 14, 2008 12:55 pm
Projects :: Currently Working on an Indie Game
Games I'm Playing :: Splatoon 2
xbox live or psn: Stm: Tight Verbage

Re: tga2ter - Convert your heightmaps into terrain!

Post by The Nasal Abyss »

It seems that this app crashes no matter what compatibility settings I try in Windows 8. I can see it for an instant and then it crashes. I really wanted to experiment with this!

Edit: With further experimentation, it seems I can't even run mod tools at all either! I've tried all suggested fixes and troubleshooting, and none of it works! That stifled my testing and modding return quite quickly I'd say! EDIT 2: I'm an idiot, I no longer have these problems. Whoops!
Last edited by The Nasal Abyss on Thu Mar 13, 2014 2:35 pm, edited 1 time in total.
noMatt
2nd Lieutenant
2nd Lieutenant
Posts: 398
Joined: Sun Mar 10, 2013 12:30 pm
Projects :: The Map has no name so see alpha
Games I'm Playing :: Crysis Battlefront
xbox live or psn: No gamertag set
Location: Germaneeee
Contact:

Re: tga2ter - Convert your heightmaps into terrain!

Post by noMatt »

on windows 8 run Zero editor as adminstrator once. after that it should be fine.
Tga2ter is nothing to run with diuble click on it. you have to run it via cmd.exe

I think those are the two things you gotta do. if you already done that i cant help :/
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Re: tga2ter - Convert your heightmaps into terrain!

Post by MileHighGuy »

The Nasal Abyss wrote:It seems that this app crashes no matter what compatibility settings I try in Windows 8. I can see it for an instant and then it crashes. I really wanted to experiment with this!
noMatt is right, it can only be used with the command prompt. Its easiest if you make a bat file with this in it:

cmd -c cd C:/bf2_modtools/tga2ter/

(pointing to the folder where you put tga2ter.exe)

Run the bat file, then type "tga2ter -i yourtexture.tga -o whatever.ter" and any other parameters you want.
User avatar
The Nasal Abyss
1st Lieutenant
1st Lieutenant
Posts: 428
Joined: Sun Sep 14, 2008 12:55 pm
Projects :: Currently Working on an Indie Game
Games I'm Playing :: Splatoon 2
xbox live or psn: Stm: Tight Verbage

Re: tga2ter - Convert your heightmaps into terrain!

Post by The Nasal Abyss »

Alright, with the .bat file tga2ter works perfectly.

(Also, since it has been a while, I was clicking the wrong program to try and make a new world. Doh!)

Problems solved. Just goes to show, if you don't use it, you lose it!
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Re: tga2ter - Convert your heightmaps into terrain!

Post by MileHighGuy »

Can you maybe add a command to scale in x and z (horizontally). Now that you added the min and max height the old scale command is less useful.

EDIT:

Hey guys I found a program called WILBUR that lets you erode a heightmap. I used it and it made my map look amazing. wilbur download: http://www.ridgenet.net/~jslayton/software.html

look at the results here: http://imgur.com/a/6AJQw

I sort of followed this "tutorial" from http://www.bay12forums.com/smf/index.php?topic=104004.0
it was made for perfect world but i just adapted it for swbf2
GhostDwemer wrote:GIMP http://www.gimp.org/ is an open source image editing program. I use it to draw the outlines of my continent or island, white on a black background. Start with a 1024x1024 pixel file, it gives you more control and you can scale it down to 256x256 (the size used by Perfect World) later. after I the use the levels command to set the white point to something quite low, around 80 or so. This is your sea level land. Next I like to make mountains and hills. I usually make a separate layer for these features. You can draw them in manually or use the selection tool to draw an outline. Then use shape filled gradient to draw mountains that slope nicely from their peaks to the plains. I like to use the fingerpaint tool to drag some ridge spurs out from the main mountain, and give more interesting topology to the coasts. There are really an endless number of techniques you can use to create your basic land mass.

After you have some topography drawn in GIMP, save the file as a .png. Then use the excellent free height map editor, Wilbur http://www.ridgenet.net/~jslayton/software.html, to perform some tweaks and pre-erode your map. Wilbur has two erosion tools, a "precipiton" based system that simulates rainfall washing soil downhill, and an "incise flow" tool that calculates water flows for the whole map, and erodes rivers based on flow rates. When using the incise flow tool, be sure to use the "fill basins" tool, every single time. I like to run a few passes of the precipiton tool, fill basins, and then run a few passes of the incise tool, using gradually increasing gradients and decreasing widths. This creates river valleys that are wide near the mouth and narrower near the source.

If your rivers aren't going where you want them to, you can use Wilbur's hill and valley tools to get them to go where you like. On one map, for instance, I created a large, high plateau where all the water drained off the plateau on one side. This created a major river feeding into another major river over a HUGE waterfall. I will often switch back and forth between GIMP and Wilbur in order to use the different tools each provides. The curves and levels tools in GIMP are very useful for fine tuning your contours, using curves for instance you can create continental shelves, flat topped mesas, and sharp spiky peaks.
theultimat
Lieutenant General
Lieutenant General
Posts: 679
Joined: Sun Apr 13, 2008 1:39 pm
Location: UK

Re: tga2ter - Convert your heightmaps into terrain!

Post by theultimat »

Hi there, and first off let me apologise for the lack of updates - I've got exams at the moment so I've been pretty busy.

MileHighGuy - what do you mean by scaling the x and z? Would it just stretch the terrain or something more interesting? Yeah, scale is completely useless, so I've replaced it with a terrain smoothing option, which will be in the new release. Thanks for being patient!
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Re: tga2ter - Convert your heightmaps into terrain!

Post by MileHighGuy »

I mean like scaling the terrain so you don't have to use a bigger image size to get a wider map. scaling it in the horizontal direction. and THANK YOU for the smoothing.
Epifire
First Lance Corporal
First Lance Corporal
Posts: 124
Joined: Wed Mar 10, 2010 6:11 pm
Projects :: Supplies Outpost
xbox live or psn: SirEpifire
Location: Dantooine, East of the enclave.

Re: tga2ter - Convert your heightmaps into terrain!

Post by Epifire »

I know it's an old topic but I was wanting to try this thing for a BF1 map I was making. Was wondering though would it be possible (or if anyone has tried) to run these commands via batch file? I figured if you kept to a file convention you should be able to bypass manually running the command console each time. Still not sure how the whole scope on this thing is yet, but if I get the hang of it I may attempt one myself (with my limited "batchery" skills) to see how that fares. Great tool though by the looks of it so I better get to just trying to test the thing before I try anything fancy.

Cheers! :thumbs:
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Re: tga2ter - Convert your heightmaps into terrain!

Post by MileHighGuy »

from up the page
MileHighGuy wrote:
The Nasal Abyss wrote:It seems that this app crashes no matter what compatibility settings I try in Windows 8. I can see it for an instant and then it crashes. I really wanted to experiment with this!
noMatt is right, it can only be used with the command prompt. Its easiest if you make a bat file with this in it:

cmd -c cd C:/bf2_modtools/tga2ter/

(pointing to the folder where you put tga2ter.exe)

Run the bat file, then type "tga2ter -i yourtexture.tga -o whatever.ter" and any other parameters you want.
I dont know how to include the options and stuff in it tho
Epifire
First Lance Corporal
First Lance Corporal
Posts: 124
Joined: Wed Mar 10, 2010 6:11 pm
Projects :: Supplies Outpost
xbox live or psn: SirEpifire
Location: Dantooine, East of the enclave.

Re: tga2ter - Convert your heightmaps into terrain!

Post by Epifire »

Oh yeah sorry my bad. Only issue I'm getting now is ZE crashes when I try and edit with the new .TER file in place. Anyone know offhand why that could happen?
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Re: tga2ter - Convert your heightmaps into terrain!

Post by MileHighGuy »

well if you are using it in bf1 ZE you have to convert it from bf2 format to bf1 format first. I always use the -b option too.
Epifire
First Lance Corporal
First Lance Corporal
Posts: 124
Joined: Wed Mar 10, 2010 6:11 pm
Projects :: Supplies Outpost
xbox live or psn: SirEpifire
Location: Dantooine, East of the enclave.

Re: tga2ter - Convert your heightmaps into terrain!

Post by Epifire »

MileHighGuy wrote:well if you are using it in bf1 ZE you have to convert it from bf2 format to bf1 format first. I always use the -b option too.
Hmm yeah I'm not sure what I'd need to do to convert it to the BF1 format though. Still trying to sort through all the commands as I don't even know what's all current for the latest version of tga2ter.
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Re: tga2ter - Convert your heightmaps into terrain!

Post by MileHighGuy »

This thread worked for me. I just used the hex editor method.

http://www.swbfgamers.com/index.php?top ... 3#msg42983
Post Reply