TF58 - Making the absolute simplest scenery - a tutorial

Topics about .fld, .stp, .ter, .yfs, and Scenery Editor.
Post Reply
User avatar
vandal
Veteran
Veteran
Posts: 1178
Joined: Thu Feb 03, 2011 3:16 pm
Favorite Aircraft: Tornado GR4
Location: Great Britain
Has thanked: 23 times
Been thanked: 148 times

TF58 - Making the absolute simplest scenery - a tutorial

Post by vandal »

This topic and it's content has been copied over from YSPilots. It was written by TaskForce58 and the original can be found here
[note: I added some commentaries in this font. First time readers can ignore those.]

Some basics for the scenery editor:
Holding down shift and both left and right mouse button, and slide the mouse up and down: zoom in and out
shift and left mouse button: move the view around.

Now, start the editor. We are going to create a very simple scenery, with a large island and one runway, that's all.

Goto map->insert element. Select POLYGON on the drop down list. On the color palette (top right of window) select dark green. See the green box with the green lines on the screen? That's your plotting cursor. Drag it around, and hit enter. This will create the first point of the polygon. Drag the cursor around again, and hit enter again. Each time you hit enter you create the next point for the polygon. Once you have 5 or 6 points for your polygon, hit space. Now you have your island. Notice that you don't have to plot the last point of your polygon on the same location as the first one. Once you hit space the editor will close the polygon for you. Oh and the first time you create something in the editor, it will ask you if you want to create a new map. Just say yes.
{This is the common way of doing things in the editor. The Enter key to plot all the points, and Space to finalize any changes/additions.}

Next, the runway. We will create a east-west runway (i.e. Runway 09/27) with a rectangle. Creating a rectangle is a little different than a polygon. You have to specify 3 points. The first two defines the baseline of the rectangle. The third is the width.
{What will happen is that the rectangle will be aligned with one of the edges on the baseline you defined, then the editor will create the smallest rectangle that includes both the baseline and the third point you specified. The third point does not neccessary mean it is one of the corners of the rectangle, just that it will lie on the side opposite to the baseline.}

Zoom in until the blue grid just about covers the whole screen. Use map->insert element, and select RECTANGLE this time. On the color palette select dark grey. Drag the cursor around until it lines on the left edge of the blue grid. Take a look at the coordinate window. The first value (from the top) is the East-West coordinate, the second is the altitude (normally 0), the third is North-South. Now hit enter to create the first point, but don't drag the cursor around afterwards.

Take a note of the coordinates of the cursor. Since we want a runway that is 3200m long, add 3200 the the East-West coordinate (i.e. click in the box and type in the actual value), and click SET. This will move the cursor exactly 3200m due east of the first location. Now follows one of the little quirks of the editor. Since we clicked in the coordinate window to enter the value, you have to click on the main editor window again. However, we don't want to accidentally move the cursor around, so click on the window title bar of the main editor window to select it. Hit enter, and you have entered the second point of the rectangle.
{This is a more precise way of entering things, when you need to draw something with a specific dimension, such as runways. BTW 100 ft = 30.48m}

Once again look at the coordinate window, and this time add 42 to the North-South coordinate. Click set, select the main editor window, and hit enter. This will add the third point of the rectangle 42 meters due south of the first two. Hit space, and you should have a long thin rectangle in dark grey. This is your runway.
{HotelFox asked about a runway of 3200mx42m, hence the dimensions I used here.}

The third step of our simple scenery is to define the runway area. The method is almost identical to entering a rectangle. Select Edit->Insert->Rectangular Region. On the drop down list select 1 for runway. Now you need to enter a rectangle that is (roughly) identical in size and location as the grey rectangle we created to be the runway. You can use the precise coordinate method as we used for the runway, or you can just eyeball it. Once you are done you should have a blue rectangle surrounding where the runway is, with the tag "RGN ID=1 (Runway)" in the middle.
{The rectangle region is a very important element of YSFlight scenery. It is what defines a runway, taxiway, and viewpoints. Infact in our example you don't even have to draw that grey rectangle for the runway. You can just put a rectangle region down and set it as a runway and it will work. Of course a 10000ft grass strip in the middle of a lush green island 10 km wide is gonna make it very hard to find and land on!}

Goto File->Save FLD to save the scenery. Name it "myairport.fld" for our example here. Make sure you are saving it into YSFlight's scenery folder.

Last thing is to create a start position. Goto StartPosition->Insert. Drag the cursor to the western end of the runway, and hit space. You will be presented with a popup window. On the ID Name box, enter "RWY_09". Initial Speed should be 0. Landing Gear box should be checked. Throttle is 0 percent. Click OK. You have created a start position, but it is pointing north. Now select StartPosition->Rotate. The start position we just entered is now circled, with a thicker green arc beneath it. Drag the green arc around and you can rotate the start position. Keep draging the green arc until the long green dash line (the heading) is pointing towards the right (east) down the length of the runway, and hit space to confirm the change. Goto File->Save STP to save the startposition. Name it "myairport.stp"
{When you enter a start position that is on the ground double check the coordinate window, make sure the altitude (second box) is 0. If you want an inflight start position, then you can set the altitude to something other than 0, but make sure you have a reasonable initial speed, make the throttle something other than 0 percent, and uncheck the landing gear box.}

Now we have the actual scenery and the start position(s) done, we just have to let YSFlight know about it. In YSFlight's Scenery folder, use a text editor (such as notepad) to open the scenery.lst file. Add this line to the end:

MY_AIRPORT scenery/myairport.fld scenery/myairport.stp

and save the file.

Next time you start YSFlight, you should have a new scenery called MY_AIRPORT with only one start position, RWY_09.
Image
Awesome 171st pilot
A member from yesteryear!
Also known as Princess Vandel
User avatar
vandal
Veteran
Veteran
Posts: 1178
Joined: Thu Feb 03, 2011 3:16 pm
Favorite Aircraft: Tornado GR4
Location: Great Britain
Has thanked: 23 times
Been thanked: 148 times

Re: TF58 - Making the absolute simplest scenery - a tutorial

Post by vandal »

Elevation grid.

Before we start, you need to know how to change the direction of the view point. By holding shift and right mouse button down and moving the mouse around, you can change the view direction. If you want to go back to the top-down view, just click on "Top View" on the view control panel.
{you can also use the view control panel to move, zoom, etc, but I think the mouse is easier.}

The elevation grid works like this: you define a rectangular area, which is sub-divided into a number of segments, like a gird on a spreadsheet program. At the corner of each grid square is a "node". By moving these nodes up and down to a different elevation than the ground, you create a three dimensional surface which (hopefully) is shaped like a mountain. If you still don't understand, imagine a piece of plywood, with nails of different lengths nailed on it in a grid like pattern. You then lay a sheet of cloth on top of this grid of nails. The effect is similar to our elevation grid.

OK, enough theories. Start the scenery editor and load up the map of your choice. You might want to zoom in a bit until the blue grid is a bit less then a quarter of the size of the screen. Goto Edit->Insert->Elevation Grid. You will be presented with the familiar green cursor. You now need to enter the base rectangle of the elevation grid, same way as you entered a rectangle before. However, before you hit space to finalize, take a look at the sub-window on the left.

This defines how dense will the grid be sub-divided. When you change the numbers you should see the grid change on the screen also. Technically you can enter a 1x1 grid but this will be just a simple rectangle with a node on each of the four corners, and is not very useful. For our purpose, just put in a 5 x 5 grid. Click on Insert Elv Grid to lay down your grid. Once you are done use Edit->Clear Interface to clear away the Elv Grid dialog.

Now with our grid, you can try clicking on various nodes on the grid to highlight them (in light blue). You can also highlight entire polygons between notes, but that's not what we need right now. Press "U" to unselect all notes and polygons, then select just one single node near the center (anyone will do). Then select ElevationGrid->Move Node.

Remember how to rotate the view around? (The top of this message.) Do that now, rotate you view around a bit so that you are looking at the Elev Grid at an angle instead of straight down. Notice that you can drag the node that you just selected and slide it up and down. At the same time the second value on the Coordinate window (the Y-value i.e. height) will also change as you drag the node up and down. Drag the node up until it is about 600 meters (roughly 2000') above ground. Hit space to finalize, and you will see the area surrounding the node poking up from the ground. This node that we just raised will be the summit of our mountain, but right now the whole thing is not looking very mountainy yet.
{Remember that move node moves ALL the nodes that are selected. If you are doing a mountain with multiple peaks at different altitude, make sure you only select the ones that you really want to move.}

Make sure our summit node, and only that node, is still selected. Then select ElevationGrid->Laplacian Smoothing (or you can press "L" to do it). What this does, is that the editor will raise all the nodes in the current Elev Grid EXCEPT ANY NODES THAT ARE SELECTED so that the whole grid will look more smooth, less angular. Since only our summit node is selected, this has the effect of smoothing out the whole grid so that it looks like a mountain rasing from the edge of the grid to our summit. Note that I said "the edge of the grid", which is rectangular. Keep this little bit of info in your head.

The next thing you should know about elevation grid functions, and also the next thing we need to do here, is to select ElevationGrid->Apply Delaunay Triangulation. What this does is that it will rearrange all the triangular polygons that make up the entire grid so that, instead of cutting across the grid diagonally in the same direction (as it was when the grid was first laid down), they now go around like contours around a hill. By itself it does little to modify the look of the mountain, however it makes modifying the mountain a lot more easier (and logical).

Remember what I said about our mountain is rasing from the rectangular edge of the grid right now? Can you find any mountain on a real-life contour map that has a rectangular base? Not many, eh? So we need to flatten out the area around the mountain a little bit so that the mountain base looks more natural. First, click on Top View on the viewing control window so we can look straight down on the Elev Gird again. Select all the triangles surrounding the mountain so that THE UNSELECTED portion of the grid (i.e. our mountain) looks roughly oval in shape. Now use ElevationGrid->Flatten Selected Face. Now our mountain should look more like it is raising from a more natual looking base.
{You can even select all the nodes along the base of the mountain, plus the summit node(s) and do another Laplacian smoothing to smooth it out again.}

One final thing to our mountain. It is blue! So unless you are recreating the Blue Mountains :) let's fix that. Select ElevationGrid->Apply Color Gradation. You will be presented with a window which let you pick the peak and foot colors. What it will do is to apply the foot color at the lowest elevation of the grid, and gradually change to the peak color near the top. Usually you want the foot color to be the same as whatever the ground color is, so that the foot of the elevation grid will blend into the ground. Let's leave the peak color as is, and (if needed) just change the foot color to match your ground. Click OK, and your mountain is done!

So, to recap what tools we have used:
i) Same method for laying down a rectangle to lay down the elevation grid.
ii) Highlight notes and use Move Node to raise them, press U to unselect all nodes.
iii) Laplacian Smoothing to smooth out the mountain.
iv) Delaunay Triangulation to rearrange polygons along contour lines.
v) Select faces to flatten them
vi) Color Gradation to color the mountain.
Image
Awesome 171st pilot
A member from yesteryear!
Also known as Princess Vandel
User avatar
vandal
Veteran
Veteran
Posts: 1178
Joined: Thu Feb 03, 2011 3:16 pm
Favorite Aircraft: Tornado GR4
Location: Great Britain
Has thanked: 23 times
Been thanked: 148 times

Re: TF58 - Making the absolute simplest scenery - a tutorial

Post by vandal »

[ricm96]Q: Could somebody provide some insight into how you would go about making a simple building using the elevation grid ? I see that others have done this to make cities, and it works well. Whenever I try, the sides of the building end up sloped, like the software is trying to make a mountain instead of a building.

[TF58]A: A simple rectangular building, you just create a 1x1 elevation grid. Raise all 4 nodes to the same height, use the show/hide sidewall function in the ElevationGrid menu to paint the sidewalls.

A house type building with slope roof is a 2x1 elevation grid.
ricm96]Q: Is it possible to create an elevation grid and then paint only certain faces ?

I am not referring to the sides of a house built using an elevation grid.

What I want to do is create a hill with a plot of crops that are a different color than the rest of the hill. When I tried it the whole hill got painted a new color.

[ysmajor]A: Possible with Notepad I believe, but the tricky part is to figure out which lines in the Notepad file are which faces to paint. Might mean a lengthy process of trial and error.

Another option is to put two identical grids on top of each other. Then elevate some nodes and faces slightly higher than the lower grid, and hide any other faces. Paint all of them and it'll show up fine (this is how to make snow capped mountains as well).
[ricm96]Q:
1) I want to create an elevation grid, then have various copies of the SAME grid in a map.

2) I suspect I need to save an elevation grid (in what file format ? details ?), and then reload it.

3) I also want to be able to rotate and move around and reshape each different copy as needed.

So far I am unable to get very far with this. I can make the grid, I save it. I then can load it, but I have trouble just moving it around, much less modifying it.

[TF58]A: Duplicating elevation grids:

1) Create your elevation grid as normal.
2) While the grid is selected (it has a thick light blue bounding box), goto File->Export->Current item. It will ask to save the currently selected item (i.e. your grid) as a .ter file.
3) Now we can re-insert the grid. Goto File->Import->Elevation Grid. You will be presented with the familiar green line cursor.
4) Move the cursor to the position where you want the top left corner of your new grid to be (the top left corner is the first corner you plotted when you create the grid), press space, and you will be asked to select the .ter file that you want to import.
5) Once you imported your grid you can use Edit->Rotate->Current Item or Edit->Move->Current Item to move it.
[Flake]Q: Hi guys I'm having a probably easy to fix issue i can't get my head around.

Whenever i create a polygon, YSFlight renders it oddly, like so:

Image

this isn't too much of a problem with small polys, just big ones.

Is there something I'm doing wrong?

Maps like Hawaii and etc. can have very large polys but not have this "fog" that goes with it. If i fly on hawaii or etc, I don't get shading problems.

[TF58]A: That will always be a problem with large (measured in multiple miles) polys. Just cut it up into multiple smaller ones.
Image
Awesome 171st pilot
A member from yesteryear!
Also known as Princess Vandel
User avatar
Welshy
Staff
Staff
Posts: 2042
Joined: Thu Feb 24, 2011 4:53 pm
Favorite Aircraft: Sea Jet
Location: Wales
OS: Windows NT
Has thanked: 249 times
Been thanked: 254 times
Contact:

Re: TF58 - Making the absolute simplest scenery - a tutorial

Post by Welshy »

I would like to point out that you can use the middle mouse button instead of enter of you want the speed :P
YSFHQ Elected Overlord
Overlord of VMFA-125 (CVW-171)
Previously Supreme Overlord of 323rd CAW
Friendly Neighbourhood Miscreant
Head Honcho at Talking Aero and British Defence
If you see me post like this in a thread pay attention!
Deleted User 1872

Re: TF58 - Making the absolute simplest scenery - a tutorial

Post by Deleted User 1872 »

sorry, but every time I type in the code, it says that it cant save it. Though i could, somehow. It clearly says this:

Windows cannot save this file. You dont have permission to put it back in the file with the code in it. wouuld you like to save this in the documents folder instead?


PLZ HELP ME!!!!!!!!
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: 1726 times
Contact:

Re: TF58 - Making the absolute simplest scenery - a tutorial

Post by decaff_42 »

What code?
This is talking about Scenery Editor, so what are you trying to do? Give us some more info! ;)


Are you logged in as an Administrator?
This might enable you to save where-ever you want. People have found this important with other YSF related programs (not sure which ones, possibly Scene Edit)
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
Deleted User 1872

Re: TF58 - Making the absolute simplest scenery - a tutorial

Post by Deleted User 1872 »

This is what happened

I finished my scenery, saved the .fld and the .stp files. It saved normally, as it should. i closed out sceneryEditor, then, I did exactly what it said, put in the new .txt into the scenery.1st. I put in:

MY_AIRPORT scenery/myairport.fld scenery/myairport.stp

I clicked, "Save" in the YSFLIGHT scenery folder

Then it says I don't have permission to save the new text, or code above. I need help
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: 1726 times
Contact:

Re: TF58 - Making the absolute simplest scenery - a tutorial

Post by decaff_42 »

did you mean scenery.LST (use lowercase, just capitalized here for emphasis)

instead of 1st?

If that's not the case, then try saving it elsewhere and then copying it into the directory.
Make sure you are an administrator on your computer.

other than that, I got nothing.
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
VNAF ONE
Senior Veteran
Senior Veteran
Posts: 2147
Joined: Fri Feb 11, 2011 2:16 am
Favorite Aircraft: A-10C Thunderbolt II
Location: Indiana/Florida
OS: Windows 10
Has thanked: 230 times
Been thanked: 406 times

Re: TF58 - Making the absolute simplest scenery - a tutorial

Post by VNAF ONE »

Used to have the same problem as an administrator on my old laptop (yay Windows 7 -_-). What you need to do is create a new .lst.

1st - Open notepad and create your paths. They should be something like as follows . . . (Note: this is an example of one of mine)

Indy_Regional scenery/IndyReg.fld scenery/IndyReg.stp

Note: there should be underscores where you want spaces in the actual name of your scenery. These should not exist in the names of your files however to keep it simple. Also, ensure you have the necessary space separating the path to EACH file. This is an example of files that I import directly into the scenery folder. You do NOT have to do this. You can put your files into the USER folder but you have to be sure to make a correct path to them.

2nd - Now that that's done, save the list as on your desktop or in a special folder somewhere. I have created a folder in my documents that I use as a saving point, then I can move them into ys where I want them. Either works fine (I just hate a cluttered desktop). It should look like as follows . . .

sce_IndyReg.lst

Note: when you're saving as, type your name in like this, then choose to save it somewhere.

3rd and final - Now just open your ys folder and simply drop your .lst and files where they belong. You shouldn't get any problems from this because it should be just the same as when you install addons anyway. Now you should be able to see the maps in ys flight itself. If you can't, let us know and we can troubleshoot further.
VNAF Aerobatics Commanding Officer and Founder - - - YSAS Member - - - YS Aerobatic Pilot
YS ACC A-10 East Coast Demo Team pilot - - - B-1B Razor Demo Team pilot
VFA-49 GhostHawks Commanding Officer
Image
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: TF58 - Making the absolute simplest scenery - a tutorial

Post by Flake »

Simple problem, simple solution:

You don't have permission to write to program files.

Save the scenery to your desktop then drag and overwrite.

Another option is to take ownership of the YSFlight folder and its contents, but that's another story.
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!
Deleted User 1872

Re: TF58 - Making the absolute simplest scenery - a tutorial

Post by Deleted User 1872 »

Thanks VNAF ONE, you got me through half of the deal. Now this is another problem. I was happy to see that my scenery name was in the list of maps on ysflight, but when i clicked it, it showed a blue space with no spawn areas. I think it's because i only put the scenery.lst folder into scenery. Do i have to make a user folder too? If so then how do i do it? I'm so close to finishing and posting up on YSFHQ. I'll take pictures and show them when i'm done.
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: TF58 - Making the absolute simplest scenery - a tutorial

Post by waspe414 »

The .lst for sceneries has should look like this:
MAP_NAME folder/file.fld folder/file.stp
It doesn't matter where you put the files, but make sure the file structure points to them. If you put them in user/Dtpilot247, make sure the .lst says NAME user/Dtpilot247/map.fld

An interesting thing to note, when an aircraft .lst is wrong, it will say "Cannot load aircraft NAME", but the scenery .lst parses anyway and gives a blue map.
Actual UltraViolet
Image Image
Image
I stole your turnip. Now you must come and defend your honour. ~ Hank Green
User avatar
NeurAxaL
Contributor
Contributor
Posts: 270
Joined: Sun Apr 13, 2014 5:50 pm
Favorite Aircraft: Avro Vulcan B.Mk.2
Location: Madchester, UK
OS: Windows 10
Has thanked: 6 times
Been thanked: 24 times

Re: TF58 - Making the absolute simplest scenery - a tutorial

Post by NeurAxaL »

Hi, I have followed your steps, and ysflight loads,with my scenery, but, when I looked it was just ocean, and when I load it up, it just crashes and says: Load Error (FLD) :./scenery/GR8[GR8 is the name of my scenery].fld
Shutter
Rookie
Rookie
Posts: 50
Joined: Tue Feb 11, 2014 6:01 am
Favorite Aircraft: wut
Has thanked: 2 times
Been thanked: 17 times

Re: TF58 - Making the absolute simplest scenery - a tutorial

Post by Shutter »

you got shafted by UAC. You have to run scenery editor as admin or it won't save properly. If you open your .fld in notepad, 99% its empty
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

Re: TF58 - Making the absolute simplest scenery - a tutorial

Post by Barr »

NeurAxaL wrote:Hi, I have followed your steps, and ysflight loads,with my scenery, but, when I looked it was just ocean, and when I load it up, it just crashes and says: Load Error (FLD) :./scenery/GR8[GR8 is the name of my scenery].fld
If your using a windows 8 pc try side loading XP.

Windows 8 is a real pain with all it's limitations...
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.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests