Aces High Bulletin Board

General Forums => Terrain Editor => Topic started by: orangepine on May 02, 2006, 06:06:49 PM

Title: 1 white dot
Post by: orangepine on May 02, 2006, 06:06:49 PM
on the elevation .bmp how many tiles of land does 1 dot of white mean

and

does this change for every map size scale
Title: 1 white dot
Post by: Bogie603rd on May 02, 2006, 07:05:50 PM
Where is the elevation.bmp file? Cause i've been trying to make my own tiles and cant figure it out?!?
Title: 1 white dot
Post by: Easyscor on May 02, 2006, 09:57:29 PM
Quote
Originally posted by orangepine
on the elevation .bmp how many tiles of land does 1 dot of white mean

and

does this change for every map size scale
One tile, one square mile.  You're discribing a .bmp to IMPORT for elevations.

For question 2 hit the back button on your browser and read the recent thread under your nose about grid size / etc.

Bogie, under the File menu, see Export and Import.  Try Export and find the bmp in the ahedit folder or the terrain subfolder, can't remember which it ends up in.  Make your grayscale changes if you like and re-import it.  Whenever you make changes in the editor, export it again to update the grayscale bmp.  AND write down the settings for map (terrain) size and max elevation.  You'll need them later so you might as well copy them to a text file and save them in your terrain folder.
Title: 1 white dot
Post by: Easyscor on May 02, 2006, 10:01:33 PM
One other thing, it's very easy to leave stray non black bits scattered around on your grayscale bmp and they add to the size of your terrain so be sure to paint everything black that falls outside your clipboard area.  You'll save at least 400k.
Title: Re: 1 white dot
Post by: NHawk on May 03, 2006, 05:55:12 AM
Quote
Originally posted by orangepine
on the elevation .bmp how many tiles of land does 1 dot of white mean

and

does this change for every map size scale
In answer to your first question, which I don't think anyone has asked before...

1 pixel on the elevation bmp is about 1/2 mile.
Title: 1 white dot
Post by: BlauK on May 03, 2006, 08:45:14 AM
That one white dot is actually a corner of a quarter mile!!! A whole mile square is made of 9 pixels, although all but the center dot are also shared with the adjacent miles.

The bottom left corner of the bitmap is a "center dot" and so is every odd (numbered) dot from that both vertically and horizontally. All other dots are mile edges or corners.


o-o-o
|\|/|
o-o-o
|/|\|
o-o-o


o = dot, lines represent the polygon edges.

Any dot can be elevated, but to create a flat 1/4 mile, one needs 4 dots at same altitude. Similarily 1 full mile needs 9 dots at same altitude.

To create a sharp pyramid one would elevate only 1 dot.

Mind you, that if the 9 dots are not correctly positioned on the bitmap, you may end up with 2 adjacent flat 1/2 miles, or 4 adjacent flat 1/4 miles ;)

---

One may also wonder where are the mile edges at the left and bottom edges of the bitmap?
They are mirrored over the edge. But it is wise to have plenty of flat surface at the map edges anyways.

---

Every map has an elevation file of 1024x1024 pixels, regardless of the map and clipboard size. The smaller maps just use a smaller portion of the elevation file from the middle of it. 1024x1024 file is just large enough for a 512x512 miles terrain.
Title: 1 white dot
Post by: NHawk on May 03, 2006, 11:04:01 AM
Quote
Originally posted by BlauK
.......Every map has an elevation file of 1024x1024 pixels, regardless of the map and clipboard size. The smaller maps just use a smaller portion of the elevation file from the middle of it. 1024x1024 file is just large enough for a 512x512 miles terrain.
OK, maybe I'm more confused than some other people here. ;)

Just using the numbers, if a map is 512 miles across and the elevation bitmap is 1024 pixels across wouldn't you just divide 512 by 1024 to give you 1/2 mile per pixel?

EDIT: Ok, re-crunched the numbers. I should have used the squares. 262,144 divided by 1,048,576 = 1/4 mile per pixel.
Title: 1 white dot
Post by: BlauK on May 03, 2006, 11:14:04 AM
The actual pixel does not represent any area ;) It represents the altitude of one corner of a triangle. Four adjacent pixels form the corners of 1/4 mile square.
Title: 1 white dot
Post by: Dux on May 03, 2006, 11:18:29 AM
I think you guys are confusing yourselves, mixing linear distance and area.

1 pixel = 0.5 mile.


Blauk, a square mile is made up of 9 VERTICES, not 9 pixels. When you count the vertices across, don't forget that the last row of vertices is also the first row of the next tile... so don't count things twice.

It is still as it always has been... 1 pixel = 0.5 mile in length.
Title: 1 white dot
Post by: BlauK on May 03, 2006, 11:27:02 AM
Dux,
I disagree :)  IHMO 2 pixels are 1/2 mile length... that is in the ELV file.
If you only put in one white pixel, you wont get any area at that alt.. you get a sharp peak. If you put 2 pixels, you get a ridge, with 3 pixels you get a triangular flat area and only with 4 pixels you get a flat 1/4 area.

In TYP file 1 pixel represents 1 mile area and in SYP file 1 pixel represents 1/4 mile area.
Title: 1 white dot
Post by: Easyscor on May 03, 2006, 11:40:42 AM
:o oops, I miss-spoke about the single white dot.

Yes the vertices are 1/2 mile apart and a square with 1/2 miles sides is a quarter mile.:)
Title: 1 white dot
Post by: Easyscor on May 03, 2006, 11:47:43 AM
Quote
Originally posted by Dux
don't forget that the last row of vertices is also the first row of the next tile... so don't count things twice.
Actually Blauk is right. The last row or column of vertices is the center of the mile.  Think of it this way, if you start with the first vertex numbered 1 then number 3, an odd number, would be the right hand side and all center vertices are numbered even. 1024 is an even number(edit to add) so the last row or column of vertices are center points of the square miles.
Title: 1 white dot
Post by: Dux on May 03, 2006, 11:52:14 AM
Hmmm... okay BlauK, I see where you are coming from, I guess. But I think that thinking in terms of area concerning the ELV file is misleading. All you are doing with the ELV file is assigning elevations to terrain vertices... single points. Also, with one pixel, you DO get area... but that area is on a slope. :)

And again, I think the mixing of units (linear miles vs square miles) is confusing. Easy's last sentence should read "the vertices are 1/2 mile apart and a square with 1/2 miles sides is a quarter of a squre mile.

And yes, orangepine... that white dot is the same for all map sizes. All maps are 512 maps... what differs is the amount of what you see on the clipboard.
Title: 1 white dot
Post by: Bogie603rd on May 03, 2006, 12:10:34 PM
Quote
Originally posted by Easyscor
For question 2 hit the back button on your browser and read the recent thread under your nose about grid size / etc.

Bogie, under the File menu, see Export and Import.  Try Export and find the bmp in the ahedit folder or the terrain subfolder, can't remember which it ends up in.  Make your grayscale changes if you like and re-import it.  Whenever you make changes in the editor, export it again to update the grayscale bmp.  AND write down the settings for map (terrain) size and max elevation.  You'll need them later so you might as well copy them to a text file and save them in your terrain folder.


Well, that thread doesent tell me much since I replied to it answering the question being asked! But i'll try what you mentioned:aok
Title: 1 white dot
Post by: BlauK on May 03, 2006, 12:15:51 PM
Yup,
ELV file pixels do not represent any area, they simply give altitude to vertices. However, these vertices define the borders of area.

When editing an elevation bitmap, one may want to create suitable flat areas for airbases or e.g. a canyon which has a 1/4 mile wide flat floor. For this kind of reasons it is good to know what kind of area these pixels define.

For example, if one wants to draw certain lower elevation for a minimum width flat canyon floor on some already elevated area, it is necessary to use at least 2pix sized pencil tool. For a full flat squaremile the minimum 3 pix sized pencil has to be correctly positioned, while a 4 pix sized pencil will always make a flat squaremile with extra 1/2 mile deep flat area to 2 directions.

Easy,
I experimented with that last row and it turned out to be the right side edge of a mile square. However, the very first line is the center of the mile square. The very first left edge does not have a separate alt info... the first column is used for bot the left edge vertices and the center vertices. Otherwise one would need a 1025x1025 sized bitmap :)
Same goes for the bottom row... the origin being in the bottom left corner.


[edit] corrected terminology with quarters and squares :) [/edit]
Title: 1 white dot
Post by: BlauK on May 03, 2006, 12:29:12 PM
Also notice that all this talks about making a 1024x1024 8bit grayscale bmp file, which can be imported to TE.

If you want to edit the .ELV file, it is a bit different. It can be renamed as .RAW and opened in Photoshop. Notice that the bitmap is mirrored vertically and it looks different because the alt info is spread wider (more than 256 levels) in to smaller more accurate units. This is done by using the alpha channel starting from 0 for each "elevation range". This way the ELV file can contain 256x256 levels.

This same RAW technique can be used for TYP and SYP files to edit the terrain types and subtypes. Although the subtype editing cannot be controlled too well, but at least applying noise on the file will randomize the wanted areas.
The TYP file simply uses RGB levels from 0,0,0 to 6,6,6 as the different texture types for each square mile.