Aces High Bulletin Board

General Forums => Terrain Editor => Topic started by: Voss on February 14, 2003, 02:15:06 PM

Title: ELV and TYP files?
Post by: Voss on February 14, 2003, 02:15:06 PM
Is there any documentation on the makeup of these files? Pov-Ray offers a pretty good UV-mapping to mesh. It wouldn't be too hard to write a mod for Pov to output a new file type(s), perhaps even with tiles properly alligned? I'd like to give it a shot anyway. Even a parsing macro would probably do the trick.
Title: ELV and TYP files?
Post by: Voss on February 14, 2003, 03:29:58 PM
Nevermnd, I figured it out. :)
Title: ELV and TYP files?
Post by: Shiva on February 14, 2003, 05:09:03 PM
Quote
Originally posted by Voss
Nevermnd, I figured it out. :)


I would assume that they're a raw array of integers, either indexes into the terrain types table or elevations...
Title: ELV and TYP files?
Post by: NHawk on February 15, 2003, 09:59:15 AM
Quote
Originally posted by Voss
Nevermnd, I figured it out. :)


Care to share? :)
Title: ELV and TYP files?
Post by: Voss on February 18, 2003, 07:53:43 PM
I don't mind sharing, but it doesn't seem that I have everything figured out yet. I still don't know how to rotate textures and have that recognized by the editor. I'll let you know.

Anything I make will be created with either Visual C++ or Visual Basic 6, rather then modifying Pov-Ray (or least *before*). Nuttz has hinted that something has already been created and is in testing, so maybe I don't have to do anything. I'm still proceding though; for now.
Title: ELV and TYP files?
Post by: NUTTZ on February 18, 2003, 08:05:06 PM
Nah, me and Pokie were wondering "IF" some sort of program could be made to auto tile the maps based on the color number of the greyscale. It would cut down on the map making ten fold.

NUTTZ

Quote
Originally posted by Voss
I don't mind sharing, but it doesn't seem that I have everything figured out yet. I still don't know how to rotate textures and have that recognized by the editor. I'll let you know.

Anything I make will be created with either Visual C++ or Visual Basic 6, rather then modifying Pov-Ray (or least *before*). Nuttz has hinted that something has already been created and is in testing, so maybe I don't have to do anything. I'm still proceding though; for now.
Title: ELV and TYP files?
Post by: Voss on February 18, 2003, 10:32:14 PM
Yeah, and I think it would be pretty easy to do so. I also think working out the math, to pre-calculate the required rotation of tiles for coastlines, would be fairly straightforward.  I'm pretty sure simple trig would do it.

Off the top of your head:

1) How many different textures should be used from 0k to max alt (given that max. alt. is defined by the user at runtime)?

2) Is there a way to indicate to the terrain editor that a tile should be rotated (and that info. stored in the typ file)? If not, it makes the task easier but some post-editing will still have to take place.

V.B. is built for making a tool like this and it should be quick and easy.
Title: ELV and TYP files?
Post by: NUTTZ on February 18, 2003, 11:08:30 PM
Tiles are not rotated, its 7 different tiles

water at flat 0 alt is terr0000

terr0001 threw terr0005 are tiles

and terr0016 is a  tile so thats 7, the rest are transitional tiles so there are 21 TOTAL tiles. the transitional tiles are 4 quartered tiles consisting of parts of the 2 tiles that transistion.

the transistion tiles don't rotate. I know "brand x" tiles do rotate.

NUTTZ

edited to add, NO tiles in AH rotate.


Quote
Originally posted by Voss
Yeah, and I think it would be pretty easy to do so. I also think working out the math, to pre-calculate the required rotation of tiles for coastlines, would be fairly straightforward.  I'm pretty sure simple trig would do it.

Off the top of your head:

1) How many different textures should be used from 0k to max alt (given that max. alt. is defined by the user at runtime)?

2) Is there a way to indicate to the terrain editor that a tile should be rotated (and that info. stored in the typ file)? If not, it makes the task easier but some post-editing will still have to take place.

V.B. is built for making a tool like this and it should be quick and easy.
Title: ELV and TYP files?
Post by: NHawk on February 19, 2003, 08:25:20 AM
Quote
Originally posted by NUTTZ
Nah, me and Pokie were wondering "IF" some sort of program could be made to auto tile the maps based on the color number of the greyscale. It would cut down on the map making ten fold.

NUTTZ
Just off the top of my head, if you use grayscale mapping, what you'll wind up with in many cases is a striped terrain. Especially if the terrain has gently sloped hills and mountains.

They only 2 or 3 that can be based on gray scale altitude would be water(0), snow(say 20k or max alt) and rock(just below 20k or max alt). The rest would have to be random.
Title: ELV and TYP files?
Post by: Voss on February 19, 2003, 09:09:01 AM
Okay, Nuttz, here's why I was asking about rotated tiles. How the hell do you fix the coastlines?:) Please explain what you mean by 'quartered tiles,' as I can assume quite a bit about that. Maybe you mean transitional tiles (tiles that 'tween' two different tiles)? What the hell does terr0016 do?

NHawk, why would gently sloping terrain cause striping? I've been using height_fields for years and never seen this? In fact, we've been using color images for input by ignoring two color channels and using only one; works fine.:D
Title: ELV and TYP files?
Post by: Shiva on February 19, 2003, 09:22:12 AM
Quote
Originally posted by NUTTZ
Tiles are not rotated, its 7 different tiles

water at flat 0 alt is terr0000

terr0001 threw terr0005 are tiles

and terr0016 is a  tile so thats 7, the rest are transitional tiles so there are 21 TOTAL tiles. the transitional tiles are 4 quartered tiles consisting of parts of the 2 tiles that transistion.

the transistion tiles don't rotate. I know "brand x" tiles do rotate.


So it sounds as if what we actually have in practice is that the terrain types are defined for the edges between each pair of adjacent tiles, with a limitation on how many different types of terrain can edge a tile.
Title: ELV and TYP files?
Post by: detch01 on February 19, 2003, 10:04:53 AM
Voss email me at asw441@shaw.ca and I'll send you a completed tile set so you can get a look at the transitions.

Cheers,
Title: ELV and TYP files?
Post by: NHawk on February 19, 2003, 10:55:47 AM
Quote
Originally posted by Voss
NHawk, why would gently sloping terrain cause striping? I've been using height_fields for years and never seen this? In fact, we've been using color images for input by ignoring two color channels and using only one; works fine.:D
If you're talking about tiling using the grayscale height map, then this is what you'll wind up with

Grayscale 0 - water
Grayscale 1 to 10 - Grass
Grayscale 11 to 20 - farm
Grayscale 21 to 30 - forest
Grayscale 31 to 40 - rocky grass
Grayscale 41 to 50 - rock
etc..etc..

This is simplified, but unless I'm missing something... sure looks like layers/stripes to me. On a fairly flat terrain this wouldn't be a problem. But, on anything with a good slope to it, it might be. :)

If I'm misunderstanding something here, fill me in.
Title: ELV and TYP files?
Post by: NUTTZ on February 19, 2003, 12:03:07 PM
if this WERE the case snow would be auto placed anything over the 50 greyscale mark, But it doesn't.

NUTTZ

Voss the water tile is terr000. Now any tile can transistion with this ( athou I would recommend ONLY using grass terr0001) to start with. The transitional tiles with water/grass are terr0018-terr0019-terr0020. Once comfortable with tiling JUST grass against the water, I'll be more than happy to show you how to make more than one tile transition with water.

Someone already offered to send you tiles, If you don't get them or would like to see some more, I'll post some tonight when I get home.


NUTTZ


Quote
Originally posted by NHawk
If you're talking about tiling using the grayscale height map, then this is what you'll wind up with

Grayscale 0 - water
Grayscale 1 to 10 - Grass
Grayscale 11 to 20 - farm
Grayscale 21 to 30 - forest
Grayscale 31 to 40 - rocky grass
Grayscale 41 to 50 - rock
etc..etc..

This is simplified, but unless I'm missing something... sure looks like layers/stripes to me. On a fairly flat terrain this wouldn't be a problem. But, on anything with a good slope to it, it might be. :)

If I'm misunderstanding something here, fill me in.
Title: ELV and TYP files?
Post by: Voss on February 19, 2003, 01:06:34 PM
By all means post anything you feel might be helpful.
Title: simple solution for a programmer.
Post by: MwDOODY 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?
Title: ELV and TYP files?
Post by: BenDover on February 20, 2003, 08:33:02 PM
cos we're the lazy generation:)
Title: Re: simple solution for a programmer.
Post by: pokie 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
Title: ELV and TYP files?
Post by: Voss 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.
Title: ELV and TYP files?
Post by: gatso 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
Title: ELV and TYP files?
Post by: MwDOODY 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.
Title: ELV and TYP files?
Post by: Voss 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.
Title: ELV and TYP files?
Post by: gatso 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
Title: ELV and TYP files?
Post by: NHawk 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.
Title: ELV and TYP files?
Post by: NUTTZ 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
Title: ELV and TYP files?
Post by: Shiva 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).
Title: ELV and TYP files?
Post by: NUTTZ on February 21, 2003, 09:29:34 AM
Shiva the color picker tool is quicker.
(http://mywebpages.comcast.net/NUTTZ/images/corel015.jpg)

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
Title: ELV and TYP files?
Post by: gatso 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
Title: ELV and TYP files?
Post by: BenDover on February 21, 2003, 01:39:09 PM
stop it, your confusing me!!!
Title: ELV and TYP files?
Post by: Voss 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.
Title: ELV and TYP files?
Post by: gatso on February 21, 2003, 02:52:09 PM
Quote
Originally posted by Voss
A drop down list box will allow a user to select ordinarily unacceptable tiles, just in case.


OK. Got it. Apart from the above. There's only 7 tiles, what do you mean by 'ordinarily unacceptable'?

Gatso
Title: ELV and TYP files?
Post by: Shiva on February 21, 2003, 03:48:21 PM
Quote
Originally posted by Voss
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.


Voss, can you email me (srmalloy@cox.net) the internal file formats of the .ELV and .TYP files? I've got some ideas about algorithms for distributing the terrain tiles, and would like to take a crack at implementing them, but I'd rather not have to reverse-engineer the file format if I don't have to.
Title: ELV and TYP files?
Post by: NHawk on February 21, 2003, 03:55:46 PM
Quote
Originally posted by Shiva
Paint Shop Pro has a function to do this, so Photoshop should too.
My God you just made my life sooo much easier. I have them both.:D
Title: ELV and TYP files?
Post by: pokie on February 21, 2003, 06:22:31 PM
Quote
NUTTZ
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.


Right now it seems that ROCK is the higest elevation tile with either using the MapMaker or the Bmp2map program.

Quote
NUTTZ
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.


One of the things to think about is we are only dealing with 6 Tiles ....  water, grass, farm, forest, grassyrock and rock and a possible 7th tile snow, if we can get the TYP file to make the TE to except it.  The transition tiles will look after themselves automatically.  With the 6 or 7 tiles we have 256 color scale numbers to work with.  ( RGB numbers of grayscale from 0 to 255 )  So with that in mind maybe we could enter those numbers to gives us what we want?
Example: Maybe I only want grass, Forest and Rock on my terrain and I don't have water!
Quote
Voss
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.


Work with the 1024 X 1024 bmp, the TE can place tiles every 2640 ft, Idealy it would be every 5280 ft but if you notice in the TE that any tile place while mouse cross is at North, NorthEast or East will still place that texture in the Center of the Gridsquare.

I can't see how you can work around the 0 ft alt ground not being water with out changing the Bmp image.  I think that this would be easier corrected in the Te after.  Just don't make land less than 1 ft alt and you can eliminate this.


Quote
Voss
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.

Web space for the program shouldn't be a problem, I'll volunteer as I'm sure others will.  FIELD OF DREAMS "Build it, and they will come"

P.S  I'll sorry if this is a little scrambled, I'm been interrupted several times at home here while making this up that I've loss some of my train of thought :(

Pokie
Title: ELV and TYP files?
Post by: Voss on February 22, 2003, 12:26:12 AM
I'll email you if you want, but I think it's fairly simple. The typ files are just numerical representations of the tiles for a given point (the center of a given polygon I'm guessing). The file is written in reverse order, so the upper left tile of a given terrain is written last. Water is 00, grass 01, etc. There is no angle data in a typ file.

I think! I haven't tested it, but that seems to hold. At least that's what my analysis indicates.

The elv files are a little more difficult. Again, I haven't tested this thoroughly, but it makes sense that it would be vertices data, probably a normal vector, and probably in reverse order again. It's not really important, because you can let the editor create the elv file.

You can test this by creating a dummy input file and checking the results, which is precisely what I intend to do (and did preliminarily, but I also ran into several editor/system crashes doing it). It would be nice if HT just opened up and let us in on the makeup of the elv files, but I believe I have all the information I require.

I said I would post a sample of the application form, but I haven't had the time to sit down and make it yet (takes just a few minutes anyway). I am intending to have a single form where the user selects the input image and sets his choices for altitude changes between tiles and the tiles to be used for each of six altitudes. Additionally, I intend to allow some turbulation of tiles, so they are a little mixed around the edges (again user defined). There will also be an output window and a thumbnail on import. So, each of six different altitudes can be set by the user and have a tile assigned to it. Tests for 0 versus 1 alt, and error handling, etc.

Did I miss anything? (More tomorrow as time permits)
Title: ELV and TYP files?
Post by: Shiva on February 22, 2003, 12:45:08 AM
Quote
Originally posted by Voss
Did I miss anything?


Taking a hint from VistaPro, I would suggest that you add a 'cliff' setting, which would automatically apply the 'rock' texture to any tile that had a slope greater than a user-defined value. This would let you automatically get bare rock mountains from sufficiently-sharp elevation changes in the terrain.
Title: ELV and TYP files?
Post by: gatso on February 22, 2003, 06:19:26 AM
I just found out you can open .typ files as images. I don't know why I didn't think of this before.

For a 512x512 map,

copy the .typ file to somewhere safe.

rename it to .raw

Use the settings below and you can open it in Paint Shop Pro and I assume photoshop. (see pic)

RGB,

0,0,0 is Water
1,1,1 is Grass
2,2,2 is Grassy Rock
3,3,3 is Farm
4,4,4 is Rock
5,5,5 is Forrest
6,6,6 is Snow

It'll look completely black so I change it to 16 mill colours and swap each RGB to an obvious colour, (blue for sea, green for grass etc)

I just fixed ALL the coastlines on a 512x512 map in less than 2 hours using this method. One use, I assume you could find others.

Before saving take it back to RGB 0,0,0 to 6,6,6 and 8 bit colour. Also remember to flip the top and bottom.

Gatso
Title: ELV and TYP files?
Post by: BenDover on February 22, 2003, 10:32:16 AM
works in ifranview as well

although you can only edit :(
Title: ELV and TYP files?
Post by: BenDover on February 22, 2003, 10:37:36 AM
d'oh, the image didn't attach
Title: ELV and TYP files?
Post by: Voss on February 22, 2003, 10:55:28 AM
Gatso, you might try setting up a special palette for editing purposes and importing that every time you edit a typ. Save the original palette before you start, import the edit palette, do your work, and then import the original before saving your work. That would save you having to reset each individual color.

I'll think about including this as a method.
Title: ELV and TYP files?
Post by: Voss on February 22, 2003, 11:31:47 AM
Actually, I just thought of a much easier way to do this.

The bitmap used as input could be used as a height_field bitmap and rendered in Pov-Ray with the appropriate colors applied to different height values. It would be clumsy and confusing to guys that don't use Pov, though.

The process would involve rendering, color reduction, importing a greyscale pallette, saving as raw data, and renaming the file *.typ.

I still like the editor idea.
Title: ELV and TYP files?
Post by: NAD on March 19, 2003, 06:33:50 PM
Voss, I would appreciate if you can e-mail (aliefs@otenet.gr)  me the  file formats of  *.ELV and *.TYP files, and inform me about any tool that opens and reads the data.
Thanks.
Title: ELV and TYP files?
Post by: Shiva on March 19, 2003, 07:45:54 PM
Quote
Originally posted by NAD
Voss, I would appreciate if you can e-mail (aliefs@otenet.gr)  me the  file formats of  *.ELV and *.TYP files, and inform me about any tool that opens and reads the data.


Same here, except that you can just e-mail (srmalloy@cox.net) the file formats; I'm sure I can write my own code to read/write the data.

ADVthanksANCE