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: 1582
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: Kiowa, Mitten, Hornet
Location: Canada
Has thanked: 154 times
Been thanked: 506 times

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

Post by waspe414 »

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: 1012
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: 206 times

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

Post by Barr »

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: 3838
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 844 times
Been thanked: 1727 times
Contact:

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

Post by decaff_42 »

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 my GitHub page for Python codes: https://github.com/decaff42?tab=repositories

YSFlight Addon Database - Find links to nearly every addon made for YSFlight!
Submit Addon To Database
User avatar
waspe414
Staff
Staff
Posts: 1582
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: Kiowa, Mitten, Hornet
Location: Canada
Has thanked: 154 times
Been thanked: 506 times

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

Post by waspe414 »

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: 3838
Joined: Sat Oct 29, 2011 7:23 pm
Favorite Aircraft: SR-71 Blackbird
Location: Eastern United States
OS: Mac OSX
Has thanked: 844 times
Been thanked: 1727 times
Contact:

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

Post by decaff_42 »

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 my GitHub page for Python codes: https://github.com/decaff42?tab=repositories

YSFlight Addon Database - Find links to nearly every addon made for YSFlight!
Submit Addon To Database
User avatar
In Revolt
Rookie
Rookie
Posts: 36
Joined: Tue Jun 18, 2019 11:58 pm
Favorite Aircraft: F-117
OS: Linux
Has thanked: 26 times
Been thanked: 49 times

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

Post by In Revolt »

Is there a way to to make elevation grid to NOT receive shadow of a plane flying over it ?
Some line in TER file ?
User avatar
waspe414
Staff
Staff
Posts: 1582
Joined: Thu Feb 10, 2011 9:35 pm
Favorite Aircraft: Kiowa, Mitten, Hornet
Location: Canada
Has thanked: 154 times
Been thanked: 506 times

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

Post by waspe414 »

The shadow falls on any landable surface. That's ground, elevation grids* and carrier decks. That's hardcoded and we can't change it

*if you raise an elevation grid so no point of its base intersects the ground, it stops having collision, and is therefore not landable and the shadow doesn't snap to it. But it kind of stops being a mountain at that point and turns into a hologram
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 2 guests