Howto:Add shared models manually: Difference between revisions

Jump to navigation Jump to search
needs a cleanup
(needs a cleanup)
Line 1: Line 1:
{{cleanup}}


Note: You may include scenery objects in any format that PLIB supports. Currently, this means in addition to the 3ds models mentioned, you may use AC3D and other formats.
Note: You may include scenery objects in any format that PLIB supports. Currently, this means in addition to the 3ds models mentioned, you may use AC3D and other formats.


== Adding Share Models ==
== Adding Share Models ==
Here is a quick rundown on how to add a shared model to the current version of FlightGear.
Here is a quick rundown on how to add a shared model to the current version of FlightGear.


Line 31: Line 31:
  Tile: 2039314
  Tile: 2039314
  Path:  "w060n30/w056n30/2039314.stg"
  Path:  "w060n30/w056n30/2039314.stg"


=== Step 6 ===
=== Step 6 ===
Line 46: Line 45:
You can use FGSD for steps 4 to 7
You can use FGSD for steps 4 to 7


 
== .STG file format ==
== STG File Format ==
 
Currently, no documention exists for the .stg files used by FlightGear other than this. There is none in the 'mini-docs' folder bundled with the source.
Currently, no documention exists for the .stg files used by FlightGear other than this. There is none in the 'mini-docs' folder bundled with the source.


Each line of the STG file has the following format:
Each line of the STG file has the following format:


OBJECT_SHARED RELATIVE_PATH LON LAT ALT ROT
{| class="prettytable" border="1" cellspacing="0" bordercolor="black">
 
|OBJECT_STATIC
Where
|KSFO-maint-1-fb.ac
 
|<nowiki>-122.377127</nowiki>
RELATIVE_PATH is the location of the scenery object.
|37.71570833
 
|1.756719854
LON is the Longitude
|20
 
|-
LAT is the Lattitude
|Type
 
|Relative path
ALT is the altitude above the surface of FlightGear world model.
|Longitude
 
|Latitude
ROT is the amount of rotation applied to the model in degrees. For example, if your model had a window that should face north, but it should face south, you could adjust the rendering of the model to face south by rotating 180 degrees.
|Elevation
|Heading
|}


About Altitude. Looking at the files shipped with FG, there are some strange, to me, figures for altitude. Some are negative numbers. That seems odd, since objects are being placed on the surface. It suggests that above surface may be negative on the Z axis. COMMENT : Much more likely these are objects which are purposely sunk into the terrain to adjust their height.
About Altitude. Looking at the files shipped with FG, there are some strange, to me, figures for altitude. Some are negative numbers. That seems odd, since objects are being placed on the surface. It suggests that above surface may be negative on the Z axis. COMMENT : Much more likely these are objects which are purposely sunk into the terrain to adjust their height.


I ran across a comment: 3D object need scenery to compute their height. This is why scenery must be associated with an existing land surface file (whatever you call it).
I ran across a comment: 3D object need scenery to compute their height. This is why scenery must be associated with an existing land surface file (whatever you call it).
Example


This is what a line with an XML file specifying the model looks like.
This is what a line with an XML file specifying the model looks like.
Line 89: Line 85:
  OBJECT_STATIC KSFO-maint-1-fb.ac -122.377127 37.62647917 0.5 62
  OBJECT_STATIC KSFO-maint-1-fb.ac -122.377127 37.62647917 0.5 62
  OBJECT_STATIC candlestickpark-fb.xml -122.3838418 37.71570833 1.756719854 0
  OBJECT_STATIC candlestickpark-fb.xml -122.3838418 37.71570833 1.756719854 0
[[Category:Howto|Add shared models manually]]
[[Category:Scenery enchancement|Add shared models manually]]

Navigation menu