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

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

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

Post by Flake » Sat Jun 17, 2017 7:48 am

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.

User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1200
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 681 times
Been thanked: 269 times
Contact:

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

Post by u2fly » Sat Jun 17, 2017 8:14 pm

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.
/!\ READ YSFLIGHT HANDBOOK (.PDF) | updated 2017/05/03

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”
http://pic.twitter.com/vkz0gdozVV
(31 DEC 2016)

User avatar
waspe414
Staff
Staff
Posts: 1183
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: CH-136 Kiowa
Location: Canada
Has thanked: 95 times
Been thanked: 177 times

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

Post by waspe414 » Sat Jun 17, 2017 10:02 pm

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
Core Staff
Core Staff
Posts: 4272
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 817 times
Been thanked: 1163 times
Contact:

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

Post by Flake » Sat Jun 17, 2017 11:36 pm

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...)

User avatar
waspe414
Staff
Staff
Posts: 1183
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: CH-136 Kiowa
Location: Canada
Has thanked: 95 times
Been thanked: 177 times

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

Post by waspe414 » Sun Jun 18, 2017 12:54 am

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 0 guests