*.TER - Terrain Mesh File (Elevation Grid) Specifications

Topics about .fld, .stp, .ter, .yfs, and Scenery Editor.
Post Reply
User avatar
Flake
VFA-49
VFA-49
Posts: 4375
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 861 times
Been thanked: 1279 times
Contact:

*.TER - Terrain Mesh File (Elevation Grid) Specifications

Post by Flake »

The lines of a TerrainMesh (ElevationGrid) file are structured like so:

TerrMesh * 1
  1. Initialise. Just like a Surf line initaliser.
NBL (X) (Y) * 1
  1. NumberOfNodesOn...
  2. XAxis
  3. YAxis
TMS (X) (Y) * 1
  1. TerrainLengthInMetersFor...
  2. XAxis
  3. YAxis
BLO 0 R 1 64 128 0 1 64 128 0 * TotalNumberOfNodes
  1. Block(Node?)...
  2. HeightInMeters
  3. R|N(R=Triangles Flipped, N=Triangles Normal)
  4. 0|1(0=Invisible Face, 1=Visible Face) Red Green Blue [PrimaryColor?]
  5. 0|1(0=Invisible Face, 1=Visible Face) Red Green Blue [SecondaryColor?]
Looks to me this is where the color gradation takes place, meaning one could do some nifty color gradation tricks with some notepad manipulation. I'm very sure a stock map (CRESCENT_ISLAND or MATSUSHIMA?) has some snow on the peaks of the grid and this should be how it is done.

END * 1
  1. Declare the terrain file closed and complete.
Forgive me if there is already a write up on this (did decaff do one?)

I plan to replace grigors grid tool over the coming week by adapting Png2Srf/LifesABeach, So I've written this up to help!

People are struggling with this programs compatability so it would be nice to have another option.
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!
User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1485
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 1051 times
Been thanked: 339 times

Re: *.TER - Terrain Mesh File (Elevation Grid) Specifications

Post by u2fly »

Thank you for this, @Flake! I will add this info in YSFlight Handbook, and hope that this specification could help me in development of YSFS 2.x add-on for Blender 2.78.

U.S. Senator John McCain wrote:“Spending #NewYearsEve w/ brave #Ukrainian Marines at a forward combat outpost
- we stand w/ them in their fight against #Putin's aggression”

pic.twitter.com/vkz0gdozVV [archived]
(31 DEC 2016)
User avatar
waspe414
Staff
Staff
Posts: 1581
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: Kiowa, Mitten, Hornet
Location: Canada
Has thanked: 154 times
Been thanked: 506 times

Re: *.TER - Terrain Mesh File (Elevation Grid) Specifications

Post by waspe414 »

viewtopic.php?f=147&t=815&p=8367#p8367
I thought I did a more comprehensive writeup on the whole filetype somewhere, but I can't find it anymore. [Link is now below]
Last edited by waspe414 on Fri Jul 14, 2017 8:16 pm, edited 1 time in total.
Actual UltraViolet
Image Image
Image
I stole your turnip. Now you must come and defend your honour. ~ Hank Green
User avatar
Flake
VFA-49
VFA-49
Posts: 4375
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 861 times
Been thanked: 1279 times
Contact:

Re: *.TER - Terrain Mesh File (Elevation Grid) Specifications

Post by Flake »

waspe414 wrote: Sat Jun 17, 2017 10:02 pm
Awesome thanks for that I now know what the 1/0 before the colors does (0 Invisible Face, 1 Visible...)
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!
User avatar
waspe414
Staff
Staff
Posts: 1581
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: Kiowa, Mitten, Hornet
Location: Canada
Has thanked: 154 times
Been thanked: 506 times

Re: *.TER - Terrain Mesh File (Elevation Grid) Specifications

Post by waspe414 »

The colours in each BLO line are just for that specific triangle. Editing individual triangle colours will just make that triangle that colour. See the ship in Helgoland for an example. The gradient is calculated for each face when it's generated in Scenedit. Gradient colours are stored in the CBE line, after what I assume are the gradient extents (whatever they are, the first two numbers are 0 and 80% of the highest node) though changing them does nothing.

A point, it's possible to generate the gradient for a given node arrangement, then change the nodes. The gradient will stay the same until recalculated. You can put gradiated spots of colour in places other than mountain tops as a result.

EDIT: I found the comprehensive writeup: viewtopic.php?f=147&t=7758. viewtopic.php?f=285&t=7753 is also useful.
Actual UltraViolet
Image Image
Image
I stole your turnip. Now you must come and defend your honour. ~ Hank Green
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest