Everything you ever wanted to know about .ter files but were afraid to ask

Topics about .fld, .stp, .ter, .yfs, and Scenery Editor.
Post Reply
User avatar
waspe414
Staff
Staff
Posts: 1247
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: CH-136 Kiowa, Yak-130 Mitten
Location: Canada
Has thanked: 114 times
Been thanked: 214 times

Everything you ever wanted to know about .ter files but were afraid to ask

Post by waspe414 » Fri May 08, 2015 7:04 am

This is a sample .ter:
TerrMesh
SPEC FALSE
NBL 2 3
TMS 170.14 161.48
CBE 0.00 170.23 46 112 10 194 169 92
BLO 0.00 L 1 194 169 92 1 46 112 10
BLO 0.00 R 1 194 169 92 1 46 112 10
BLO 0.00
BLO 0.00 R 1 194 169 92 1 194 169 92
BLO 212.78 R 1 194 169 92 1 194 169 92
BLO 0.00
BLO 0.00 R 1 46 112 10 1 194 169 92
BLO 212.78 L 1 46 112 10 1 194 169 92
BLO 0.00
BLO 0.00
BLO 0.00
BLO 0.00
END
Let's break it down.

TerrMesh defines the filetype (similar to the DYNAMODEL header in .dnm and SURF in .srf)

SPEC FALSE or SPEC TRUE disable or enable specular reflections (currently found only in the OpenGl2 version).

NBL # # defines the number of columns and rows the elevation grid has.
TMS defines the square dimensions, and so is grid length and width divided by NBL.
See below for CBE.

The BLO lines come in blocks. Each block has as many lines as NBL # #, and there are as many blocks as NBL # #. Blocks are ended by BLO 0.00, which defines the last (faceless) node on the line. The last block is made up of only node lines (being the final edge of the grid, there are no faces to associate with the nodes).

BLO 0.00 R 1 0 127 0 0 0 127 0

Part of the grid
Node height(m)
Left or right face orientation (from Elevation Grid > Flip Selected Faces)
Face state: invisible (0), visible (1), projected picture flag (2), or protected face (3)
Face colour


The CBE line defines the gradient.
The gradient is calculated when applied in Scenedit, and colours the individual faces, then smooths them. It won't recolour if elevations are changed, so it's possible to get the peak colour on the side of a mountain if you change the geometry without updating the gradient.

CBE 0.00 170.23 46 112 10 194 169 92
Zero
80% of maximum height when the gradient is calculated. These two don't currently do anything, but may eventually be for changing gradient distribution.
Foot colour
Peak colour

As usual, the file ends with END.
Last edited by waspe414 on Fri May 08, 2015 5:40 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
Barr
Veteran
Veteran
Posts: 1011
Joined: Wed Mar 28, 2012 8:49 pm
Favorite Aircraft: The Boeing 757
Location: Providence, Rhode Island
OS: Windows 10/Gentoo
Has thanked: 272 times
Been thanked: 204 times

Everything you ever wanted to know about .ter files but were afraid to ask

Post by Barr » Fri May 08, 2015 12:40 pm

Nice.....

Thanks for the post waspe.
Image
Beginner ATC for hire!
Current Projects:
-Pilatus PC12
-Mooney M20
-New England Scenery
Fine Print:
**Word of Caution**
My knowledge is limited. Anything I write in my posts may or may not be accurate. To be honest I think its all crap.

User avatar
decaff_42
Staff
Staff
Posts: 3536
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 613 times
Been thanked: 1319 times
Contact:

Everything you ever wanted to know about .ter files but were afraid to ask

Post by decaff_42 » Fri May 08, 2015 1:44 pm

Just a couple of things to add that I have found.

The TMS line is the true size of each dimension divided by 10.

The BLO 0.00 is actually referring to the last node in the block. There are the input number of faces but #+1 nodes. the BLO 0.00 refers to the last node in the block. This is useful when creating elevation grid buildings.
Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Civilian Aviation Server Flight Log

User avatar
waspe414
Staff
Staff
Posts: 1247
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: CH-136 Kiowa, Yak-130 Mitten
Location: Canada
Has thanked: 114 times
Been thanked: 214 times

Everything you ever wanted to know about .ter files but were afraid to ask

Post by waspe414 » Fri May 08, 2015 5:35 pm

Better correction: TMS is the square length and width, and so is real dimesions / NBL.
BLO 0.00 makes total sense.
Actual UltraViolet
Image Image
Image
I stole your turnip. Now you must come and defend your honour. ~ Hank Green

User avatar
decaff_42
Staff
Staff
Posts: 3536
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 613 times
Been thanked: 1319 times
Contact:

Re: Everything you ever wanted to know about .ter files but were afraid to ask

Post by decaff_42 » Tue Apr 02, 2019 2:41 am

Bumping to add some more information.

If you want to define the side wall colors, for an elevation grid building, then you have more lines at the beginning of elevation grid definition. If all the walls of your elevation grid can be the same color, then this makes things simple. :D

For this elevation grid:
  • BOT is the SOUTH Side
  • RIG is the right or EAST Side
  • TOP is the NORTH Side
  • LEF is the WEST Side

Code: Select all

TerrMesh
NBL 2 4
TMS 256.43 239.05
BOT 0 0 215
RIG 194 169 92
TOP 46 112 10
LEF 46 112 10
BLO 0.00 R 1 46 112 10 1 46 112 10
BLO 0.00 R 1 46 112 10 1 46 112 10
BLO 0.00
BLO 314.14 R 1 46 112 10 1 46 112 10
BLO 314.14 R 1 46 112 10 1 46 112 10
BLO 0.00
BLO 0.00 R 1 46 112 10 1 46 112 10
BLO 314.14 R 1 46 112 10 1 46 112 10
BLO 0.00
BLO 0.00 R 1 46 112 10 1 46 112 10
BLO 78.53 R 1 46 112 10 1 46 112 10
BLO 0.00
BLO 194.13
BLO 0.00
BLO 0.00
END

Check out my website YSDecaff for all my tutorials and addon releases.
Visit by Bitbucket page for Python codes: https://bitbucket.org/decaff42/

Civilian Aviation Server Flight Log

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest