Author Topic: TE bitmap file formats and their use  (Read 1248 times)

Offline Easyscor

  • Plutonium Member
  • *******
  • Posts: 10899
TE bitmap file formats and their use
« on: October 15, 2009, 10:53:43 AM »
I might as well post this answer to another terrain builder’s question.

The TE will build all the terrain files you need, using simple bitmaps you create, and you only need to create 4 bitmap files to create a terrain that’s ready for base placement.
Most terrain builders are familiar with the elevation import / export functions of the TE. If you’ve worked with an elevation bitmap before, you can build all the other required files using the elevation bitmap as a start. All you need to know is what each of the files does, and their format.

All these files are sorted indexed grayscale images, just like the elevation bitmap you’re used to working with. What tools you use, and how you create the bitmaps is up to you.

File names and meanings:

elevation.bmp
Bitmap size: 1024 x 1024
Determines the elevation of the terrain when imported, and provides a starting point for creating the rest of the files.
Location:  Anywhere

grndtype.bmp
Bitmap size: 4096 x 4096
Determines the terrain type, with black as water. The formula for determining which grayscale value maps to what terrain type is in the readme file that comes with the TE.
Location: Inside the terrain project’s folder (replace the default built file)

waterd.bmp
Bitmap size: 16,384 x 16,348 256 MB
Determines what is water, and how deep. Black is deep water, and white is land, a grayscale index of 254 (not quite white at 254,254,254 aka 0xfe,0xfe,0xfe), would be shallowest water possible. This file must be imported with the Import Water menu command.
Location: Inside the texsrc folder

waterc.bmp
Bitmap size: 16,384 x 16,348 256 MB
Determins the color of the water. Black is very light blue water, and white is the darkest water color. You can use white for land for instance, and vary the shades of gray as you move away from the land. . Must be imported with the Import Water menu command.
Location: Inside the texsrc folder

cmpwater.bmp
Bitmap size: 1024 x ? around 1.2 MB (200+ MB is a corrupted file)
Location: Inside the terrain project’s folder (replace the default built file)
The presence of this (uncorrupted) file is required to keep the TE from crashing when you build a terrain. However, the TE has a nasty habit of corrupting this file every time you do a build, which will crash the TE the next time you build your terrain. Simply replace the corrupted cmpwater.bmp with any uncorrupted cmpwater.bmp file and all will be good. Just be sure to make a copy of the cmpwater.bmp as soon as you see it. It will look like one of those paintings that you need to stare at for a long time to see the image. If it’s a 200+ MB file with a straight vertical line in the preview, it’s corrupted.


You will not need to worry about the .htz files, they will be kept up to date by the TE.
« Last Edit: October 15, 2009, 11:16:09 AM by Easyscor »
Easy in-game again.
Since Tour 19 - 2001

Offline 715

  • Silver Member
  • ****
  • Posts: 1835
Re: TE bitmap file formats and their use
« Reply #1 on: October 15, 2009, 02:46:40 PM »
Thanks for that info; it's very helpful.

What is the water depth information used for in game?  Apparently not water color as that is a separate file.  Is it used to designate littoral waters that the TF group cannot navigate?  Is for future use of submarines?  If you are trying to do a historical terrain should you try to put bathymetric data in there?


Offline Larry

  • Platinum Member
  • ******
  • Posts: 6123
Re: TE bitmap file formats and their use
« Reply #2 on: October 16, 2009, 01:03:18 AM »



waterd.bmp
Bitmap size: 16,384 x 16,348 256 MB
Determines what is water, and how deep. Black is deep water, and white is land, a grayscale index of 254 (not quite white at 254,254,254 aka 0xfe,0xfe,0xfe), would be shallowest water possible. This file must be imported with the Import Water menu command.
Location: Inside the texsrc folder

waterc.bmp
Bitmap size: 16,384 x 16,348 256 MB
Determins the color of the water. Black is very light blue water, and white is the darkest water color. You can use white for land for instance, and vary the shades of gray as you move away from the land. . Must be imported with the Import Water menu command.
Location: Inside the texsrc folder


Every time I click on the Import Water tab I get a windows error message and the TE shuts down.
Once known as ''TrueKill''.
JG 54 "Grünherz"
July '18 KOTH Winner


Offline Easyscor

  • Plutonium Member
  • *******
  • Posts: 10899
Re: TE bitmap file formats and their use
« Reply #3 on: October 16, 2009, 01:11:10 AM »
Have you confirmed that it's indexed grayscale, and how did you confirm that?

A bad or unsorted grayscale is what causes the most trouble.
Easy in-game again.
Since Tour 19 - 2001

Offline Larry

  • Platinum Member
  • ******
  • Posts: 6123
Re: TE bitmap file formats and their use
« Reply #4 on: October 16, 2009, 01:40:18 AM »
That worked but now all my land is dark.
Once known as ''TrueKill''.
JG 54 "Grünherz"
July '18 KOTH Winner


Offline Easyscor

  • Plutonium Member
  • *******
  • Posts: 10899
Re: TE bitmap file formats and their use
« Reply #5 on: October 16, 2009, 02:23:52 AM »
Progress. :) By dark, do you mean the tiles are dark, or that they're black?

Did you remember to add the defset.txt file?



Opps, even though it's not a bitmap file, the defset.txt file should be included in this list.

defset.txt
A text file that determines the terrain tile types, 0 = PTO and 1 = ETO, with a single alphanumeric character. If the terrain is to be a PTO, the file can be omitted.

There may be more sets of textures and tiles in the future.
« Last Edit: October 16, 2009, 02:33:18 AM by Easyscor »
Easy in-game again.
Since Tour 19 - 2001

Offline Larry

  • Platinum Member
  • ******
  • Posts: 6123
Re: TE bitmap file formats and their use
« Reply #6 on: October 16, 2009, 03:48:45 AM »
It turns out looking like this.


Once known as ''TrueKill''.
JG 54 "Grünherz"
July '18 KOTH Winner


Offline Easyscor

  • Plutonium Member
  • *******
  • Posts: 10899
Re: TE bitmap file formats and their use
« Reply #7 on: October 16, 2009, 07:48:25 AM »
PM on it's way.
Easy in-game again.
Since Tour 19 - 2001

Offline Greebo

  • Skinner Team
  • Platinum Member
  • ******
  • Posts: 7024
Re: TE bitmap file formats and their use
« Reply #8 on: October 16, 2009, 08:37:12 AM »
Thanks for that info; it's very helpful.

What is the water depth information used for in game?  

The waterd file controls the look of the water only, it has no bearing on where the ships can go on the map. If a pixel on the waterd.bmp file is pure white (255,255,255) there will be land at that point in the terrain. A pixel in any other shade of grey will produce water.

If the pixel is pure black (0,0,0) you will see a part of the sea texture tile at that point, if it is some shade of grey you will see a blend of the sea tile and whatever land tile or custom sea tile you placed at that point in the gndtype.bmp file. The lighter the shade of grey, the more the land tile will dominate and vice versa.

Generally you want a black sea with the edge blurring from dark to light towards the edge of the white land. This gives the illusion of a shallow coastal shoreline. The drawback of this is it increases the size of the terrain res file due to the way file compression works.
« Last Edit: October 16, 2009, 08:43:45 AM by Greebo »