Author Topic: ELV and TYP files?  (Read 1495 times)

Offline MwDOODY

  • Zinc Member
  • *
  • Posts: 32
      • http://most-wanted.org
simple solution for a programmer.
« Reply #15 on: February 20, 2003, 07:55:04 PM »
I'm sure we can figure out how to read /write the file that stores tile info.
 I would think you could assign a particular tile type bases on the difference in elevation from vertex corners.

 i.e.
for y=1 to 1024
 x=1 to 1024
z=vertex edge alt(x,y)
z2=vertex edge alt(x-1,y)
difference=z2=z
if difference >10 use previous tile (small slope)
if difference>40 use appropriate  tile ( big slope)



ect./..
make any since?

p.s.
how come noone is writing any new tools?

Offline BenDover

  • Platinum Member
  • ******
  • Posts: 5803
ELV and TYP files?
« Reply #16 on: February 20, 2003, 08:33:02 PM »
cos we're the lazy generation:)

Offline pokie

  • Silver Member
  • ****
  • Posts: 841
      • http://s7.eastlink.ca/~tscott
Re: simple solution for a programmer.
« Reply #17 on: February 20, 2003, 10:09:40 PM »
Quote
Originally posted by MwDOODY
I'm sure we can figure out how to read /write the file that stores tile info.
 I would think you could assign a particular tile type bases on the difference in elevation from vertex corners.

 i.e.
for y=1 to 1024
 x=1 to 1024
z=vertex edge alt(x,y)
z2=vertex edge alt(x-1,y)
difference=z2=z
if difference >10 use previous tile (small slope)
if difference>40 use appropriate  tile ( big slope)



ect./..
make any since?

p.s.
how come noone is writing any new tools?


Sounds like we have a volunteer to me :D  :D

Pokie

Offline Voss

  • Silver Member
  • ****
  • Posts: 1261
      • http://www.bombardieraerospace.com
ELV and TYP files?
« Reply #18 on: February 20, 2003, 10:16:38 PM »
Doody are you aware of a utility that takes in a bitmap and outputs elv and typ files with a great deal or all of the tile assignments completed?

I have a thumbnail segment of code finished. Im mulling over the elv files now and considering anything else that might be useful.

Offline gatso

  • Silver Member
  • ****
  • Posts: 1279
ELV and TYP files?
« Reply #19 on: February 20, 2003, 10:33:55 PM »
1. We have a program that will create elv files from a bitmap. It's called the Aces High Terrain Editor.

2. AKBmp2Map predates the latest version of the terrain editor but will create elv and typ files from a bitmap.

I can see the potential usefulness of a program that either:
Creates a new typ file from a combination of an existing elv and typ file, Or, Creates typ files from a unique 512x512 bitmap.

Being able to independantly set ranges of altitude and angle of terrain for each type of tile would be extreemely useful.

Having this new program read an existing typ file and protecting all water tiles would be very useful. Many maps have large areas of zero altitude terrain and I wouldn't want it changing to water.

Gatso

Offline MwDOODY

  • Zinc Member
  • *
  • Posts: 32
      • http://most-wanted.org
ELV and TYP files?
« Reply #20 on: February 21, 2003, 12:02:59 AM »
Quote
Originally posted by Voss
Doody are you aware of a utility that takes in a bitmap and ...


I havent programmed since BASICA on dos 3.1, but.. I just picked up Dark Basic (I wanted to see how direct x was called) and its vERY easy to read a bmp into an elv file. but I know so little about 3d programming, i'm only able to read 256X256 bmps. (perhaps I should read the directions) point: its  e z to learn.
 what I'm proposing is someone that actually read the manual write a utility that will rebuild the TYP file by calculating the angle of connecting vertexes.. seems someone w/ a lil exoerience could knock it out in no time flat.

Offline Voss

  • Silver Member
  • ****
  • Posts: 1261
      • http://www.bombardieraerospace.com
ELV and TYP files?
« Reply #21 on: February 21, 2003, 12:44:53 AM »
See above Doody. I said VB 6. It's really easy in VB6. I've long ago mastered the graphic arts, so reading a bitmap file is second nature and it's really easy with greyscale bitmaps. I don't understand why you want to rebuild typ files? Is there an advantage to that? What am I missing?

Gatso I think it needs to be 1024x1024. I don't think that combining an older typ and elv would be a good idea. I can see problems there. I'll have to revisit the akbmp2map program as I didn't see that kind of functionality, and it seemed restricted in other ways. However, you have a good point about 0k ground not being water.

Other things could be added later. Getting the thing working with this first functionality would seem to be the biggest time saver, but I will be glad to offer the code with the program. Someone else may have to provide web space for it, though.
« Last Edit: February 21, 2003, 12:48:04 AM by Voss »

Offline gatso

  • Silver Member
  • ****
  • Posts: 1279
ELV and TYP files?
« Reply #22 on: February 21, 2003, 07:51:09 AM »
As far as I am aware no changes have been made to the elv and typ files for a very very long time apart possibly from the inclusion of a snow tile. The files bmp2map creates are as valid now as they were when it was written. I'm still using it now and it isn't perfect but is faster than setting everything manually.

To import a elv file directly into the TE or use one with bmp2map it needs to be 1024x1024 greyscale. the TE uses changes of height every 2640ft. hence there are 1024x1024 points of elevation on each map 512x512 map.

typ files only contain 512x512 amounts of data. 1 tile for every mile. Hence if you want to directly import typ data from a bmp your going to be working with 512x512 images.

Gatso

Offline NHawk

  • Silver Member
  • ****
  • Posts: 1787
ELV and TYP files?
« Reply #23 on: February 21, 2003, 08:19:53 AM »
I know this is slightly off topic but...

For those creating height maps in creative ways, the ability to change the 0 altitude grayscale value would probably be quite helpful. Say changing it from 0 to 4. And the import would decrease all values above 4 by 4. So, 5 would become 1... 100 would become 96 and so on.

In some cases, I know this would have saved me a ton of editing time in Photoshop and it would have rescued some good terrains in others.
Most of the people you meet in life are like slinkies. Pretty much useless, but still bring a smile to your face when you push them down the stairs.
-------------------------------
Sometimes I think I have alzheimers. But then I forget about it and it's not a problem anymore.

Offline NUTTZ

  • Silver Member
  • ****
  • Posts: 1818
ELV and TYP files?
« Reply #24 on: February 21, 2003, 09:14:27 AM »
Heres where I'm Lost. You say the TE changes of height every 2640 feet? What me and pokie were discussing is what formula the TE or Wabbit's program uses to define what tile is placed where. We know water is placed at zero alt, after that I think it is just random. The snow tile NEVER shows on my maps randomly or at any specific alt. I don't remember snow tile EVER showing up in my map unless I place it. I remember HTC added the check water no at zero to include the land tiles that corner the water. After that it's just random. I doubt at this point in HTC's schedule they are even looking at the TE with AH:2 around the corner. We were discussing hypathetically what would help the TE with tile placement to make mapmaking quicker and easier while maintaning more control.

The TE and Wabbit's program auto tiles now. A few things that would help and hurt at the same time would be the tiles to automatically place ONE land tile against water. this would help AND hurt. I often use more than one tile to transition with water and on some maps used snow to transition with water. we could have some user control on what tile would transition with water I would welcome it to auto tile with grass BUT would like even more that the USER could pick this tile or multiple tiles.


Snow: grassy rock could AUTO transition with snow, another big help.

Tiles could be preset with alt. snow tiles auto placed at a user defined alt, farm, forest ETC. Now this is NOT a cure-all but it still would save time manually placing the tiles or you could just pop in a few tiles to break up the "rings" of tiles it would create.

A few things that I would like to see ( and this is in noway a whine) but some things I personally would like to see.

Sky: someway to change the Bmp. I'm sure this could be done after all HiTech gave us the stars in the night.

Lighting: Lighting NOT lightning:) I would like the water tile to give off reflection or at least reflect some light while looking towards the sun. We have this now but all the tiles seam to reflect the same amount of difussed light, I would like to see it cranked up more on the water tile.

Bridges: althou I really like them and wanted them and hoped for them and now have them, they are almost definately only eyecandy. I would like to see them workable over a canyon not just over a small river. I did get them to cross a cayon or unlevel tile but there is still a clipping issue.

This Post is in NOWAY A WHINE and I don't want to sound ungrateful for the TE editor as it is, But just a few things I would LIKE to see in the future of the TE.

NUTTZ


 
Quote
Originally posted by gatso
.

To import a elv file directly into the TE or use one with bmp2map it needs to be 1024x1024 greyscale. the TE uses changes of height every 2640ft. hence there are 1024x1024 points of elevation on each map 512x512 map.

typ files only contain 512x512 amounts of data. 1 tile for every mile. Hence if you want to directly import typ data from a bmp your going to be working with 512x512 images.

Gatso

Offline Shiva

  • Silver Member
  • ****
  • Posts: 966
      • http://members.cox.net/srmalloy/
ELV and TYP files?
« Reply #25 on: February 21, 2003, 09:20:30 AM »
Quote
Originally posted by NHawk
For those creating height maps in creative ways, the ability to change the 0 altitude grayscale value would probably be quite helpful. Say changing it from 0 to 4. And the import would decrease all values above 4 by 4. So, 5 would become 1... 100 would become 96 and so on.


Paint Shop Pro has a function to do this, so Photoshop should too. Look for a function like 'Histogram Adjustment'; in PSP, this lets you perform various modifications on the luminosity or individual color channels.

In the picture below, I've loaded a random picture into PSP and brought up the histogram adjustment function. On the left hand side of the adjustment graph, you can see the output max and min values of 248 and 9, respectively; what this will do is rescale the luminosity of the image so that the original range of 0-255 becomes 9-248. Beneath the graph, the 'low' and 'high' values let you adjust the endpoints, so you could remap the luminosity so that any pixels that were darker than 5 mapped to the darkest color in the output (9 in this case), or that all colors brighter than 240 mapped to the brightest color in the output (248 in this case).

Offline NUTTZ

  • Silver Member
  • ****
  • Posts: 1818
ELV and TYP files?
« Reply #26 on: February 21, 2003, 09:29:34 AM »
Shiva the color picker tool is quicker.


Just click on the color you want to change. Then set your page color to ,4 in greyscale and grab the greyed out eraser and it will just change the one color to your page color with one double click  or drag and erase small areas.

NUTTZ
« Last Edit: February 21, 2003, 09:38:29 AM by NUTTZ »

Offline gatso

  • Silver Member
  • ****
  • Posts: 1279
ELV and TYP files?
« Reply #27 on: February 21, 2003, 11:41:23 AM »
Nuttz, First your first post... I agree completely. I was replying directly to Voss' last post directly because he seems to be getting a bit mixed up with what he's trying to achieve. What I was trying to get across is that there are more height vertices in the map currently than there are tile assignments. See attached picture. Maps use 1 tile per mile and 2 height vertices per mile. Hence if he wants to start importing bmps with the tile assignments in them he's going to be working with 512x512 bmps for tiles and 1024x1024 for elevations.

If he wants to do it automatically he's going to have to work out some method of tile assignment from the elevations either from a elv file or a 1024x1024 bitmap. Output will still have to be 512x512 tiles.

I'm not expecting anyone at HTC to spend any time re-writing the tile assignment code but if someone wants to do it third party why not?

I think what I was trying to get across is that if Voss wants to write a program to auto tile maps it will have to be BETTER than the features the TE and bmp2map already offer. I was just suggesting some things he might like to include. I've never seen snow either with bmp2map Nuttz.

Voss, We have more than adequate tools for the creation of elv files IMHO. We don't need another one. The typ file is where all the tile assignments are. Tile assignment takes a long long time if you have to do it manually and neither the TE or bmp2map offer anything in the way of being able to define how and in what situations tiles get placed. I'm confused now... What exactly are you planning to include in this program you say your thinking about writing? We'll be able to suggest things more appropriate and hopefully not end up confusing ourselves if we know what you actually want to achieve.

I use the histogram function too Shiva :) it's pretty useful.

Gatso

Offline BenDover

  • Platinum Member
  • ******
  • Posts: 5803
ELV and TYP files?
« Reply #28 on: February 21, 2003, 01:39:09 PM »
stop it, your confusing me!!!

Offline Voss

  • Silver Member
  • ****
  • Posts: 1261
      • http://www.bombardieraerospace.com
ELV and TYP files?
« Reply #29 on: February 21, 2003, 02:45:14 PM »
I am creating a system to rapidly and automatically place terrain tiles. It will allow users to modify the range and interval to which tiles are placed. A drop down list box will allow a user to select ordinarily unacceptable tiles, just in case. Also, the user should be able to designate a source directory (bitmaps) and output directory (typ files). The whole reason for this is to speed up the creation of typ files.

As to the elv file: I don't think it's a good idea to create an elv file from a 1024x1024 bitmap and then create a typ file from a 512x512 bitmap. If, you've got the 1024x1024 bitmap do both at the same time, or at least both from the same source. Excluding the elv function is easy; I just won't do it. :)

Where was I going? I just wanted to speed this terrain building up, for now. In the background I'm still kicking around the modeling system HT was looking for. I have a mesh handler created with VB that can manipulate a 300k polygon model and still maintain good frame rates. VB is not well suited for it and that project is definately back-burner.

Right now I'm re-learning 3DMAX for another project, so it's a good time to stack ideas in preparation for the next round of effort.

I have a map started and I want to get it finished and into the arena.

I'll post an image of what I am thinking of, as far as a selection window, later. That should make a few things more obvious.
« Last Edit: February 21, 2003, 02:48:16 PM by Voss »