User Tools

Site Tools


sdk:scenery

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
sdk:scenery [2017/01/16 11:52] aeroflysdk:scenery [2020/05/10 21:17] (current) jh
Line 1: Line 1:
-====== Scenery Workshop ======+====== Introduction to Scenery Development for Aerofly FS ======
  
-===== Kingman Example Airport ===== +==== Downloading the SDK ====
-To get a better idea on how the whole process of creating an airport for Aerofly FS 2 works, we have provided the airport 'Kingman' with all required source files. Before creating your airport, the process of exporting via export plugins and then converting using the Aerofly FS 2 Content Converter should be tested. But before we export our Kingman airport we will briefly describe what the scenery definition file does, and we will summarize the different scenery mesh classes that our Aerofly FS 2 engine supports.+
  
-===== Scenery Definition File (.tsc) ===== +Please read the [[sdk:intro|SDK introduction]] for the latest download links. 
-The .tsc is a simple text file that defines the type of scenery object, its 3d model origin on the globe, elevation and use of auto height, its name as short and long version, description text and specific to airports: ICAO code identifier, parking positions, runway endpoints and threshold points, runway width and its approach light system, tower view position and more. We will address some of these features later on in this workshop.+ 
 +==== Tutorial ==== 
 + 
 +We offer a step-by-step tutorial with an [[sdk:scenery:tutorial|example airport]] to get started with the SDK. 
 + 
 +===== Scenery Definition File (TSC) ===== 
 + 
 +The [[sdk:scenery_tsc|TSC file]] is a simple text file that defines the type of scenery object, its 3d model origin on the globe, elevation and use of auto height, its name as short and long version, description text and specific to airports: ICAO code identifier, parking positions, runway endpoints and threshold points, runway width and its approach light system, tower view position and more. We will address some of these features later on in this workshop.
  
 Changing the .tsc file can be done in two different ways: Changing the .tsc file can be done in two different ways:
Line 12: Line 18:
  
 ===== Scenery Object Classes Overview ===== ===== Scenery Object Classes Overview =====
 +
 The Aerofly FS 2 engine supports the following scenery classes. A more detailed description will be given further down. The Aerofly FS 2 engine supports the following scenery classes. A more detailed description will be given further down.
   *ground (runways, taxiways, aprons)     *ground (runways, taxiways, aprons)  
Line 19: Line 26:
  
 ===== Exporting an Airport ===== ===== Exporting an Airport =====
 +
 Go ahead and open the airport 3D model file in 3D Studio Max or Cinema 4D, whichever is preferred. Then the runway, decals, objects and alpha-to-coverage (atc) object have to be exported one after the other. When one of these is changed in the future, only the affected objects will need to be exported again. Running the Content Converter will update the results afterward. Go ahead and open the airport 3D model file in 3D Studio Max or Cinema 4D, whichever is preferred. Then the runway, decals, objects and alpha-to-coverage (atc) object have to be exported one after the other. When one of these is changed in the future, only the affected objects will need to be exported again. Running the Content Converter will update the results afterward.
 To export the ground mesh follow these steps: To export the ground mesh follow these steps:
Line 39: Line 47:
  
 ===== Notes using the Content Converter ===== ===== Notes using the Content Converter =====
 +
 Before the Aerofly FS 2 Content Converter can be started, several conditions have to be met. Otherwise the Content Converter throws an error and does not proceed. Before the Aerofly FS 2 Content Converter can be started, several conditions have to be met. Otherwise the Content Converter throws an error and does not proceed.
   *The input and output folders have to be set to valid file paths that fit the specific folder structure of your machine. To configure these paths edit the 'content_converter_config.tmc' text file in the project folder with a UNICODE capable text editor.     *The input and output folders have to be set to valid file paths that fit the specific folder structure of your machine. To configure these paths edit the 'content_converter_config.tmc' text file in the project folder with a UNICODE capable text editor.  
Line 49: Line 58:
  
 ===== Starting the converter ===== ===== Starting the converter =====
 +
 When the above conditions are met the Aerofly FS 2 Content Converter can be executed. When the above conditions are met the Aerofly FS 2 Content Converter can be executed.
  
Line 54: Line 64:
  
 ===== Coordinate System ===== ===== Coordinate System =====
-The entire airport is modeled in a local coordinate system whose origin is moved to the longitude and latitude or web-mercator coordinates defined in the .tsc file when the airport is loaded in the simulator.+ 
 +The entire airport is modeled in a local coordinate system whose origin is moved to the [[sdk:scenery_coordinates|longitude and latitude (lon/lat)]] or web-mercator coordinates defined in the .tsc file when the airport is loaded in the simulator.
  
 The x-axis of the modeling coordinate system points towards east; the y-axis is geographic north and the z-direction is defined up from the earth's geographic center towards the sky. Z is zero at airport elevation if 'auto height' is selected and it is zero at sea level if 'auto height' is not selected. The x-axis of the modeling coordinate system points towards east; the y-axis is geographic north and the z-direction is defined up from the earth's geographic center towards the sky. Z is zero at airport elevation if 'auto height' is selected and it is zero at sea level if 'auto height' is not selected.
Line 66: Line 77:
  
 ===== Model Scaling ===== ===== Model Scaling =====
 +
 Scenery objects have to be scaled to fit web-mercator units. Close to the location defined in the .tsc file one web-mercator unit still equals one modeling unit but further away from the equator objects theoretically need to be bigger. For most airports sizes the effect is minimal and they can be modelled at a 1:1 scale with very little length error at the furthest point away from the .tsc reference point. Scenery objects have to be scaled to fit web-mercator units. Close to the location defined in the .tsc file one web-mercator unit still equals one modeling unit but further away from the equator objects theoretically need to be bigger. For most airports sizes the effect is minimal and they can be modelled at a 1:1 scale with very little length error at the furthest point away from the .tsc reference point.
  
 ===== Scenery Object Classes in Detail ===== ===== Scenery Object Classes in Detail =====
 +
 We already briefly introduced the different object classes available in the Aerofly FS 2 engine. Now we will look closer into the individual properties of the ground mesh, decals, static objects and alpha-to-coverage objects. We already briefly introduced the different object classes available in the Aerofly FS 2 engine. Now we will look closer into the individual properties of the ground mesh, decals, static objects and alpha-to-coverage objects.
  
 ==== Ground ==== ==== Ground ====
 +
 === Runways, taxiways, apron === === Runways, taxiways, apron ===
 +
 Usually, the ground mesh is one large joined mesh object that includes the runways, taxiways, aprons and surrounding area and is identified in Cinema 4D with the suffix %%'__%%runway' (note the double underscore) and exported as '_rwy.tgi'. Having multiple ground mesh objects is possible but can create visual issues when they are close together and is therfore not recommended. Usually, the ground mesh is one large joined mesh object that includes the runways, taxiways, aprons and surrounding area and is identified in Cinema 4D with the suffix %%'__%%runway' (note the double underscore) and exported as '_rwy.tgi'. Having multiple ground mesh objects is possible but can create visual issues when they are close together and is therfore not recommended.
  
Line 82: Line 97:
  
 === Ground materials === === Ground materials ===
 +
 The materials for the ground mesh must have at least one UV-color texture assigned. Multiple UV-color maps are possible to reduce visual patterns created by the texture tiling. The default Aerofly FS 2 airports use two different UV-color textures with a 40m tiling color texture and 1200m variation 'dirt' texture. Other texture assignments by the modeling software have no effect on the exported '_rwy.tgi' file. Instead, the shader will search for any files that have the same name but end with _bump or _specular and use them for the ground material in the rendering engine. The materials for the ground mesh must have at least one UV-color texture assigned. Multiple UV-color maps are possible to reduce visual patterns created by the texture tiling. The default Aerofly FS 2 airports use two different UV-color textures with a 40m tiling color texture and 1200m variation 'dirt' texture. Other texture assignments by the modeling software have no effect on the exported '_rwy.tgi' file. Instead, the shader will search for any files that have the same name but end with _bump or _specular and use them for the ground material in the rendering engine.
  
Line 91: Line 107:
  
 ==== Decals ==== ==== Decals ====
 +
 === Runway markings, taxiway lines === === Runway markings, taxiway lines ===
 +
 As decals we understand lines and markings on the ground that are usually painted onto the surface in the real world and require a higher level of detail than the ground itself. In the Aerofly FS 2 engine decals are rendered with a dynamic height offset over ground mesh to prevent z-fighting of the decals and the surface blow. The decal objects themselves must have a priority suffix at the end of their name, e.g. %%'__%%priority0'. The priority ranges from 0 to 9 with %%'__%%priority9' being the highest priority rendered on top of all other. Usually only %%'__%%priority0' and %%'__%%priority1' are needed because rarely more than two lines intersect at the same point. All decals are exported as one intermediate file with the ending %%'_%%decal.tgi'. As decals we understand lines and markings on the ground that are usually painted onto the surface in the real world and require a higher level of detail than the ground itself. In the Aerofly FS 2 engine decals are rendered with a dynamic height offset over ground mesh to prevent z-fighting of the decals and the surface blow. The decal objects themselves must have a priority suffix at the end of their name, e.g. %%'__%%priority0'. The priority ranges from 0 to 9 with %%'__%%priority9' being the highest priority rendered on top of all other. Usually only %%'__%%priority0' and %%'__%%priority1' are needed because rarely more than two lines intersect at the same point. All decals are exported as one intermediate file with the ending %%'_%%decal.tgi'.
  
Line 97: Line 115:
  
 === Decal materials === === Decal materials ===
 +
 Materials for the decals and markings must have a UV color map. The texture must have the extension _color and use three 8bit RGB color channels. Optionally an 8bit alpha channel can be used. Materials for the decals and markings must have a UV color map. The texture must have the extension _color and use three 8bit RGB color channels. Optionally an 8bit alpha channel can be used.
  
Line 104: Line 123:
  
 === Object materials === === Object materials ===
 +
 One of two combinations are possible for materials used for objects:\\  One of two combinations are possible for materials used for objects:\\ 
   - _color (mandatory), _reflection (opt.) and _light (opt.)\\      - _color (mandatory), _reflection (opt.) and _light (opt.)\\   
Line 116: Line 136:
  
 ==== Alpha-to-coverage ==== ==== Alpha-to-coverage ====
 +
 === Vegetation and others === === Vegetation and others ===
 +
 Billboard trees or flat grass planes that consist of only very few intersecting polygons fall into this category. The Aerofly FS 2 engine uses different techniques to render their transparency quicker which makes this category the best choice for large sets of partly transparent objects that are not very important. Billboard trees or flat grass planes that consist of only very few intersecting polygons fall into this category. The Aerofly FS 2 engine uses different techniques to render their transparency quicker which makes this category the best choice for large sets of partly transparent objects that are not very important.
  
Line 123: Line 145:
  
 ===== Guidelines for creating or porting own scenery objects ===== ===== Guidelines for creating or porting own scenery objects =====
 +
   - Create a new project folder where all textures and the 3D model will be stored.\\ The Aerofly convention for naming airports is icao_airport_name e.g. 'ksfo_san_francisco_int' and for cities its 'san_francisco_city' as an example.\\ The names must be in English letters, all lowercase and underscores instead of spaces. Spaces or umlauts mustn't be used to assure cross-platform compatibility.       - Create a new project folder where all textures and the 3D model will be stored.\\ The Aerofly convention for naming airports is icao_airport_name e.g. 'ksfo_san_francisco_int' and for cities its 'san_francisco_city' as an example.\\ The names must be in English letters, all lowercase and underscores instead of spaces. Spaces or umlauts mustn't be used to assure cross-platform compatibility.    
   - Start 3D Studio Max or Cinema 4D and insert a background reference image that covers scenery region sufficiently. Save the project with the same name as the newly created project folder.       - Start 3D Studio Max or Cinema 4D and insert a background reference image that covers scenery region sufficiently. Save the project with the same name as the newly created project folder.    
Line 136: Line 159:
   - Continue with decals, add the suffix 'decal%%__%%priority0' to their names for now, adjust the priority by renaming individual lines later. Group all decals together so that they can easily be selected for exporting them all at once.\\      - Continue with decals, add the suffix 'decal%%__%%priority0' to their names for now, adjust the priority by renaming individual lines later. Group all decals together so that they can easily be selected for exporting them all at once.\\   
   - Use helper objects to set the coordinates of all runway endpoints and their threshold points. The threshold points will affect the positioning of the selected approach lighting system.     - Use helper objects to set the coordinates of all runway endpoints and their threshold points. The threshold points will affect the positioning of the selected approach lighting system.  
- 
-V 
-===== Introduction ===== 
-This section gives a brief overview of how Aerofly FS 2 simulates an aircraft, the units and coordinates systems and the different file types that are used by Aerofly FS 2 and the Aircraft Converter. 
- 
-==== Simulation ==== 
-Aerofly FS 2 uses an object-based approach to simulate an aircraft for maximum flexibility. This means that each aircraft is defined in terms of many objects (also called (function) blocks or elements in commercial general purpose simulation packages), instead of a fixed set of variables that every aircraft must use. In addition to very general objects that can be used for any type of simulation, there are many objects specialized for flight simulation like aerodynamics forces, engines and propellers, avionics objects and many more. The designer of the aircraft is free to add any number of objects and connections to an aircraft by adding it to the dynamics section of the aircraft's .tmd file. 
- 
-Please refer to the 'Aircraft Definition' section of this document for further information. 
- 
-==== Units and Coordinate Systems ==== 
-Aerofly FS 2 uses the international system of units (SI) exclusively. This means that all lengths and dimensions are meters, masses are in kilograms, forces are in Newtons, power values are in Watts, speeds are in meters per second. 
-Any rotation uses the positive mathematical direction (anti-clockwise), and all angles are measured in radians (1 rad = 180/p degrees = 57.3°). 
-Fractions are used instead of percentages (20% would be written as 0.2). 
-The coordinate system the entire aircraft is defined in is set in the 3D model of the aircraft. The origin is usually placed close to the center of gravity but does not have to be. The direction of flight defines the x-axis of the aircraft's coordinate system. 
-The y-axis points towards the left of the aircraft, the z-axis points straight up. One unit in the coordinate system represents a real world length of one meter. The 3D model may use a scale factor which is removed when the aircraft is exported. 
- 
-==== File Types ==== 
-An aircraft in Aerofly FS 2 is defined by the files contained in one folder. The folder's name is the internal aircraft name. In the following, we will use xxxx for this internal name. There are no sub-folders except for the repaints. Aerofly FS 2 and the Aircraft Converter use the following files: 
- 
-| Intermediate folder | Aerofly FS 2 aircraft folder | Description | 
-|       | 
-| xxxx.tgi |   | Binary 3D model file created by the export plugins for 3D Studio Max or Cinema 4D. | 
-|   | xxxx.tmb | Binary 3D model that contains information like the vertex positions, texture coordinates, and material/texture assignments. Generated by the converter from the .tgi file. | 
-| xxxx.tmc | xxxx.tmc | Description file of the aircraft that contains the text shown in the aircraft menu together with the preview image. Also contains parameters to change the initialization of the aircraft: the orientation how the aircraft is placed on the runway, the maximum and minimum airspeed, landing speed and maximum altitude. | 
-| xxxx.tmd | xxxx.tmd | Defines camera positions, the complete physics definition of the aircraft including engine and aerodynamic parameters, logic circuits, electrical systems, fuel systems and so on, as well as the graphics animation and sound definition. | 
-| xxxx_takeoff.tmd xxxx_clean.tmd xxxx_landing.tmd | xxxx_takeoff.tmd xxxx_clean.tmd xxxx_landing.tmd | Used to set certain dynamics parameters that should be different from the standard values in the 'xxxx.tmd' for different aircraft configurations. When placed on the runway the takeoff configuration is set. Landing configuration is set when an approach location is selected, clean configuration otherwise. | 
-| controls.tmd |   | Defines positions and sizes where interaction with the mouse or VR controllers is possible. | 
-| .bmp .tif .png |   | Source texture files. Must be square power-of-two bitmaps. BMPs 24 bit RGB only. TIF and PNG RGB or RGBA. Bump maps can use 16 / 48 bit to avoid terracing. | 
-|   | .ttx | Converted and compressed texture files | 
-| preview_xxxx.png |   | Preview file rendered by the converter | 
-|   | preview.ttx | Compressed preview texture for aircraft menu | 
-| repaint.tmr | repaint.tmr | Repaint or livery description file defining the repaint's name in the user interface. | 
-| .wav |   | Source sound file. Must be PCM 22050 Hz mono | 
-|   | .tsb | Converted sound files that are created from .wav files by the converter tool. | 
-| model.tmc |   | Configuration file for aircraft conversion. Used to set non-default values for texture sizes, bump map strength and texture parameters if necessary. | 
- 
-The '.tgi', '.tmc' and '.tmd' files must have the same name as the folder / must use the aircraft's internal name, in our case 'xxxx.tgi', 'xxxx.tmc' and 'xxxx.tmd'. 
- 
-==== Limitations ==== 
-The Aircraft Converter that comes with this SDK is the same tool we use to convert aircraft. There are no limitations on objects or functions you can use to create your aircraft. 
- 
-However, the SDK doesn't support custom display programming yet. While you can re-use all existing displays, there is no way to get your display code into the simulator. This will be addressed in future versions of the SDK.   
  
sdk/scenery.1484563944.txt.gz · Last modified: 2017/01/16 11:52 by aerofly