Getting started with scenery design - SwissAirfields/SwissAirfieldsFS2020 GitHub Wiki
This is a description of my workflow when creating airfields in the MSFS-SDK. As I'm no professional scenery developer this might not be the best workflow, but it's what I've learned in the past months creating a handful of airfields for the "Swiss Airfields" scenery package. I hope somebody might find it useful.
Getting set up
Enter developer mode / install SDK
- In the Simulator bring up the options menu and switch on "developer mode" in the general >> developer section. This should bring up a menu bar at the top of the screen. You can always leave developer mode by switching it off in the same place in the menu or simply "Exit [DevMode]" from the menu bar.
- In the menu bar under "help" there is a menu item that lets you download the installer for the SDK. I think for simple scenery design tasks this is optional. It contains mainly (sparse) documentation, samples and plugins/materials for 3ds max and Blender.
Using the developer camera
- Start a free flight, get parked somewhere handy and enter pause/active pause. Then start the developer camera from the menu bar.
- Use the following controls to steer the camera:
- WASD to move the camera in the horizontal plane
- Alt + Mouse to Pan/Orbit the camera
- Mousewheel to move the camera forward/backward on the axis where it's pointing. Use this to change the camera's height when it is pointing downwards.
There are more controls, but I find these get you very far. In fact I get so used to them that I keep trying to use them in Google Maps/GIS browsers when switching back and forth between them and the sim.
The WASD controls get reversed once you look down past vertical. This is quite annoying and I think the only remedy is to look back up a bit. Once you have objects placed and selected you notice when you go past vertical when the gizmo-arrows flip around.
Setting up a new scenery project
For this task I refer you to this Tutorial.
Luckily, if you want to work on the Swiss Airfields you won't have to deal with this.
Downloading/cloning the "Swiss Airfields" source
If you're familiar with GIT you know what to do - go right ahead.
If you're not familiar with GIT, this might not be the time to learn it. Download the newest source as a zip-file from the "code" page on this Github repository. Unpack it into a location of your fancy.
Folder structure
The repository contains the following folders:
- Models (3ds models for markers etc.)
- Project (Everything to do with the developer mode)
- PackageDefinitions (metadata of the package and a thumbnail image)
- PackageSources (the sources of the scenery as created in the developer mode)
- Packages (the output folder for the scenery after the build process)
- _PackageInt (temporary files created during the build process. Not included in the repository)
In general the build process processes the source folder and generates the output folder. BUT: There are a few files (see Services/LivingWorld) that must be manually created in the output folder. A build process must be started afterwards so that these files get included in the "layout.json" file. Extra danger: These files get deleted on a "clean" or even when you press the wrong build button. So keep a copy of these files (or commit them before building).
Opening the project/project structure
- Click on "Open Project..." in the menu bar and open the file SwissAirfieldProject.xml out of the project root folder. This opens the "project editor" and the "inspector".
- In the project editor extend the only node (sc-airport-swiss-airfields). The next level shows the "asset packages". There are asset packages for each airfield, one for materials, one for common custom models "assets" and one for each SimObject (the landing tees).
- Highlight one of the airfields (ideally the one you're parked at) and click on the "Load in Editor" button in the inspector window. Apart from loading the actual airfield data this brings up a lot of extra windows.
- Arrange the windows, dock them along the sides, then click on "save settings" in the main menu.
- Ready to edit
Additional Software/Tools
- 3d Modeling: I used 3ds max. Blender is also supported (and free). The MSFS SDK installs plugins for exporting models in gltf-format and FS-specific materials. The materials never showed up in 3ds max for me. But the exported models seem to work anyway just using normal 3ds materials. I wouldn't start any extensive modeling before solving this though.
- Good text editor of your choice (I use notepad++)
- Image editor (Gimp, Photoshop...). For creating custom markings and textures. When creating the composite texture map for the ski tracks on the glacier strips I found Gimp had superior capabilities in rearranging the color channels.
- Bump map to normal map converter (online tool) - I used the normal maps for the ski tracks but there might be other uses. The bump map approach seems good enough for the ski tracks. I know nothing about the more sophisticated ways to create better quality normal maps.
General editing topics
Source data/research
Google maps is wonderful. But don't rely on it exclusively. Airfields change often and the aerial imagery might be outdated. Most Kantone have their own GIS-Browsers with more up to date and higher resolution ortho photos. Try to find out which is newest - in the case of LSZF it was actually Google maps.
There is also the national GIS browser which seems really good and even shows a height profile when you draw a line - great for the runway profile.
When using photos and videos from the internet as a reference also be aware of their date and what has changed since.
Accuracy, measuring and coordinates
Measuring capabilities in the editor are limited.
- There is a "ruler" in the "windows"-menu but it seems cumbersome and I haven't figured out how to use it.
- A square apron can be used to cross check distances. When created it is 30x30m. Drag the edge handles to resize it (using the snap function in the "Gizmo" window) to the desired width/length BEFORE rotating it and placing it. Use the texture on the surface as reference, not the boundary line (which is often above or below the ground and therefore distorted).
- As of late I have started to strictly transfer WGS84 coordinates from Google maps or a GIS browser and not just trace along the ground texture in the sim. It's tedious and a lot of work but the results are much more accurate. While I trust the GIS browsers more in terms of accuracy, Google maps seems to have better precision (six fractional digits).
- In some GIS browsers it seems impossible to get the WGS84 coordinates of a point.
- In Google maps it's several clicks until you get a copyable display (Place marker, then click on coordinates link at the bottom, then copy data from left side bar)
- In the FS enter the data in the lat/long fields of the Gizmo-Window. Use it to place points of an apron, taxiways, lines, scenery objects etc.
- The ground texture in FS might not align exactly to the transferred coordinates. I assume the fault lies with the FS data and a world update might improve that. If visually at all possible I therefore give precedence to the external data (runway markers on grass are a good example where this is not viable).
- New: I wrote a little tool that speeds up the coordinate transfer into FS tremendously. 1. It observes the clipboard for coordinate pairs (in various formats when copying from GIS/Google Maps) and adds them to a list. 2. It listens to the use of Ctrl-V and then injects the next single coordinate value from the list into the clipboard (for insertion in FS). It works quite well but isn't good enough quality to make available publicly.
Ground texturing (my observations)
There seem to be (at least) two layers of ground texture that get blended together when rendering:
- A somewhat coarse specific texture with everything we place on the ground. It seems to get pre-composited in 2D (when?).
- A very high resolution tileable texture "surface" (the pebbles in the asphalt)
Both layers seem to have the usual set of PBR texture maps (the documentation says "metallicness" is not used on the ground though).
I'm not sure how much the resolution of the coarse texture can be adjusted in the graphics settings. But it seems to be too low for things like small text. Even painted lines can sometimes look jaggy at the edges. So it makes no sense to have ultra high resolution textures to place on the ground.
When creating a material in the material editor we get to choose the images to be used for the coarse texture maps. There is a field where we get to choose the "surface". This seems to be the fine texture that gets overlayed. I don't know if we can create custom surface materials.
Snow: When snow is added in the weather settings this seems to:
- Add white to the albedo of the coarse texture
- Probably also affects roughness of the coarse texture
- Doesn't alter the normal maps. Structures on the ground are also visible on top of the snow.
- Replace the fine grain surface texture with "snow"
Airport editing
TODO
Special topics
Tracks on snow
As used for ski tracks on glacier strips
A square apron with a 2048x2048 pixel material is used. I made some experiments using custom painted lines which somewhat worked (normal maps) but I didn't take it further yet (only the narrow lines get rendered curved, so each ski would need a separate line).
For our material we need an Albedo texture and a Normal/Roughness/Metal texture.
- We start by creating a bump map as the basis of the normal map. Create a white 2048 pixel image and use gray and black to draw on it. The darker the color the deeper the indentation.
- Generate a normal map out of the bump map. I used this service. The settings need to be "invert G(reen)" and the strength can be quite low - especially if dark colors were used in the bump map.
- Flip the normal map horizontally (Gimp) as the materials are getting displayed mirrored for some reason.
- Shuffle the color channels
The created normal map has the color channels assigned as follows:
- R: Normal x
- G: Normal y
- B: Normal z
- A: Unused
The Normal/Roughness/Metal composite map wants the channels to be arranged like this:
- R: Metal (?)
- G: Normal x
- B: Roughness (?)
- A: Normal y
Using Gimp convert the channels to layers (Menu Colors > Components > Decompose > Model: RGBA)
- The layer called "alpha" needs to be filled with solid black (will be metalness)
- The layer called "blue" needs to be filled with solid white (will be roughness)
Convert the layers back to channels (Menu Colors > Components > Compose)
- Model RGBA
- Red <-- alpha
- Green <-- red
- blue <-- blue
- alpha <-- green
Save this image as png. It will be used as the second texture in the FS material editor.
- Create the albedo texture (with alpha) out of the bump map
- Select the color range white (with low tolerance)
- Make the selection transparent (delete)
- invert the selection
- fill this with a suitable/snowy color. This will only be visible when snow is not turned on in the weather settings.
- save as png. This will be the albedo map in the material editor.
- Create the material and use it with an apron (tutorial video).