SCENERY OBJECT EXAMPLES
This section presents a couple of examples of how to write a Scenery Objects file. A complete sample project is available in the Samples\SimpleScenery
folder of the SDK, explained on this page of the documentation. For more information about the xml specifications, see Scenery Object Definitions.
<?xml version="1.0" encoding="UTF-8"?>
<FSData version="9.0">
<!--SceneryObject name: BrightonPalacePier-->
<SceneryObject lat="50.81626919200955" lon="-0.13686521180959" alt="-2.87002083100133" pitch="-0.000294" bank="0.000294" heading="95.340527" altitudeIsAgl="TRUE" snapToGround="FALSE" snapToNormal="FALSE">
<LibraryObject name="{EEB99E2B-51DC-466E-B6A6-DBECCF855E58}" scale="1.227991"/>
</SceneryObject>
<!--SceneryObject name: RotatingBeacon_Tower (Beacon)-->
<SceneryObject lat="53.33330728000590" lon="-2.15372892999952" alt="0.00000000000000" pitch="0.000000" bank="0.000000" heading="66.600000" altitudeIsAgl="TRUE" snapToGround="TRUE" snapToNormal="FALSE">
<LibraryObject name="{A04B772A-6BBF-4103-B263-D479BCCE71F5}" scale="1.000000"/>
<AttachedObject attachpointName="attachpt_beacon" instanceId="{42910FFC-EEF5-43B1-A0F6-AEB885F7B95A}" pitch="0.000000" bank="0.000000" heading="0.000000">
<RandomAttach randomness="ALWAYS_DISPLAY" probability="1.0"/>
<Beacon type="CIVILIAN" baseType="AIRPORT"/>
</AttachedObject>
</SceneryObject>
<!--SceneryObject name: TheShard-->
<SceneryObject lat="51.50444919439649" lon="-0.08636710540033" alt="0.00000000000000" pitch="0.000007" bank="0.000007" heading="-143.050594" altitudeIsAgl="TRUE" snapToGround="TRUE" snapToNormal="FALSE">
<LibraryObject name="{F6AA08D5-AD28-464E-B990-32176116CAF6}" scale="1.000000"/>
</SceneryObject>
<!--SceneryObject name: TowerBridge-->
<SceneryObject lat="51.50549855841624" lon="-0.07537307671421" alt="-6.90268715086052" pitch="-0.001025" bank="0.001038" heading="113.290128" altitudeIsAgl="TRUE" snapToGround="FALSE" snapToNormal="FALSE">
<LibraryObject name="{59ABFB71-A42D-4611-8F7A-36027505543C}" scale="1.050000"/>
</SceneryObject>
<!--SceneryObject name: TowerOfLondon-->
<SceneryObject lat="51.50819053999869" lon="-0.07646234909738" alt="0.00000000000000" pitch="-0.000014" bank="-0.000014" heading="-172.260567" altitudeIsAgl="TRUE" snapToGround="TRUE" snapToNormal="FALSE">
<LibraryObject name="{29BB5A2A-1961-4947-BB68-BB6B12C33F4E}" scale="1.639344"/>
</SceneryObject>
<!--SceneryObject name: WestminsterPalace-->
<SceneryObject lat="51.49958073637554" lon="-0.12455063961814" alt="0.00000000000000" pitch="-0.000007" bank="-0.000007" heading="-82.024718" altitudeIsAgl="TRUE" snapToGround="TRUE" snapToNormal="FALSE">
<LibraryObject name="{12406B33-9701-402F-A993-1EFEBCBD0B3B}" scale="1.039500"/>
</SceneryObject>
<Rectangle width="537.095215" falloff="1000.000000" surface="{6C0C6528-5CF1-483A-A586-2C905CF2757E}" priority="0" latitude="50.81978719575832" longitude="-0.13697406158284" altitude="7.66739702597260" latitude2="50.81804442424165" longitude2="-0.13730438911916" altitude2="7.66946940217167"/>
<Rectangle width="41.477066" falloff="1000.000000" surface="{6C0C6528-5CF1-483A-A586-2C905CF2757E}" priority="0" latitude="51.50677599757926" longitude="-0.07454985673636" altitude="10.92611636780202" latitude2="51.50434019282529" longitude2="-0.07616895001642" altitude2="10.92726953048259"/>
<Rectangle width="264.427002" falloff="1000.000000" surface="{47D48287-3ADE-4FC5-8BEC-B6B36901E612}" priority="0" latitude="50.81838491442576" longitude="-0.13655762749126" altitude="5.81503701396286" latitude2="50.81357637779939" longitude2="-0.13655762839609" altitude2="5.82139671314508"/>
<Rectangle width="197.397522" falloff="1000.000000" surface="{47D48287-3ADE-4FC5-8BEC-B6B36901E612}" priority="0" latitude="50.82136283151566" longitude="-0.13652918989031" altitude="16.63162323087454" latitude2="50.81963351191674" longitude2="-0.13652919021575" altitude2="16.63391016516834"/>
<Rectangle width="166.948624" falloff="1000.000000" surface="{47D48287-3ADE-4FC5-8BEC-B6B36901E612}" priority="0" latitude="51.50081260596380" longitude="-0.12486857023988" altitude="7.33923465944827" latitude2="51.49815743809018" longitude2="-0.12486857074700" altitude2="7.34312872495502"/>
<Rectangle width="23.012264" falloff="20.000000" surface="{47D48287-3ADE-4FC5-8BEC-B6B36901E612}" priority="0" latitude="51.50404982769119" longitude="-0.07638587580600" altitude="23.46374481637031" latitude2="51.50367378167159" longitude2="-0.07662410878080" altitude2="23.46394288539886">
<RunwayDeformation alt="20.274467" ratio="0.000000"/>
<RunwayDeformation alt="12.607486" ratio="1.000000"/>
</Rectangle>
<Rectangle width="233.577698" falloff="1000.000000" surface="{47D48287-3ADE-4FC5-8BEC-B6B36901E612}" priority="0" latitude="51.50484196772720" longitude="-0.08710095868749" altitude="14.12381244264543" latitude2="51.50403872092032" longitude2="-0.08495832772839" altitude2="14.12765805516392"/>
<Rectangle width="31.798174" falloff="20.000000" surface="{47D48287-3ADE-4FC5-8BEC-B6B36901E612}" priority="1" latitude="51.50758993043948" longitude="-0.07407865819505" altitude="24.82610790245235" latitude2="51.50694192083410" longitude2="-0.07440295733848" altitude2="24.82654469925910">
<RunwayDeformation alt="15.134887" ratio="0.000000"/>
<RunwayDeformation alt="20.953575" ratio="1.000000"/>
</Rectangle>
</FSData>
The following example is to illustrate a few of the XML elements that require no attributes and that are self-closing, for example the <NoShadow />
element:
<?xml version="1.0" encoding="UTF-8"?>
<FSData version="9.0">
<!--SceneryObject name: EmpireStateBuilding_LOD0-->
<SceneryObject lat="40.74848045756816" lon="-73.98572144016812" alt="0.00000000000000" pitch="0.000382" bank="-0.000382" heading="118.942758" altitudeIsAgl="TRUE" snapToGround="TRUE" snapToNormal="FALSE">
<HideOnTIN/>
<LibraryObject name="{04640800-93AD-4758-8AD7-E700C72D7B52}" scale="1.000000"/>
</SceneryObject>
<!--SceneryObject name: NiagaraFalls-->
<SceneryObject lat="43.07744844570071" lon="-79.07597141575813" alt="-24.15384399414990" pitch="0.003039" bank="-0.003039" heading="-26.858701" altitudeIsAgl="TRUE" snapToGround="FALSE" snapToNormal="FALSE">
<NoShadow/>
<LibraryObject name="{03DB2748-D14A-4FAB-9535-76F268F5E38E}" scale="1.257357"/>
</SceneryObject>
<!--SceneryObject name: Bridge_Pedestrian-->
<SceneryObject lat="40.69268941164666" lon="-74.05378533574236" alt="0.00000000000000" pitch="-0.000041" bank="-0.000041" heading="115.909426" altitudeIsAgl="TRUE" snapToGround="TRUE" snapToNormal="FALSE">
<NoSnow/>
<LibraryObject name="{E0A3A13D-9107-4CD2-BD62-27BECB99A2F7}" scale="1.000000"/>
</SceneryObject>
</FSData>
Effects Objects
The following three examples illustrate the XML that is created for VFX Objects when added into the world. Each effect shown in the example illustrates a different way to reference the source VFX file: by name, by path/name and by GUID:
<SceneryObject lat="12.95033281481212" lon="-73.98572144016812" alt="100.00000000000000" pitch="0.000000" bank="0.000000" heading="-45.119477" imageComplexity="VERY_SPARSE" altitudeIsAgl="TRUE" snapToGround="TRUE" snapToNormal="FALSE">
<VisualEffectObject effectName="Smoke_SOS" scale="1.000000"/>
</SceneryObject>
<SceneryObject lat="40.85931289081295" lon="-119.33189593300625" alt="50.00000000000000" pitch="-105.000050" bank="-0.000057" heading="-105.503571" imageComplexity="VERY_SPARSE" altitudeIsAgl="TRUE" snapToGround="TRUE" snapToNormal="FALSE">
<VisualEffectObject effectName="Base/Smoke_SOS" scale="2.500000"/>
</SceneryObject>
<SceneryObject lat="43.07744844570071" lon="-73.98572144016812" alt="0.00000000000000" pitch="0.000382" bank="-0.000382" heading="118.942758" imageComplexity="VERY_SPARSE" altitudeIsAgl="TRUE" snapToGround="TRUE" snapToNormal="FALSE">
<VisualEffectObject name="{A04B772A-6BBF-4103-B263-D479BCCE71F5}" scale="-0.750000"/>
</SceneryObject>
Polygon Objects
The following shows the definition for a few <Polygon> objects:
<Polygon parentGroupID="9" groupIndex="1" altitude="264.51666259765625">
<Attribute name="UniqueGUID" guid="{359C73E8-06BE-4FB2-ABCB-EC942F7761D0}" type="GUID" value="{B23744ED-F1F8-405D-AA13-62D81462EC7C}"/>
<Attribute name="VegetationScale" guid="{6A043F59-E6F2-4117-A2E4-D510E7317C29}" type="UINT32" value="78"/>
<Attribute name="VegetationDensity" guid="{41EFF715-C392-4B31-A457-50A504353A90}" type="UINT32" value="6"/>
<Vertex lat="42.54891457361177" lon="-92.39786201179047"/>
<Vertex lat="42.54885347825369" lon="-92.39782048637699"/>
<Vertex lat="42.54886497163633" lon="-92.39774975025500"/>
<Vertex lat="42.54892533298898" lon="-92.39773587614825"/>
<Vertex lat="42.54895431464686" lon="-92.39780424003253"/>
</Polygon>
<Polygon parentGroupID="9" groupIndex="2" altitude="264.15545654296875">
<Attribute name="UniqueGUID" guid="{359C73E8-06BE-4FB2-ABCB-EC942F7761D0}" type="GUID" value="{A6AE81D5-13E1-4287-8499-58A72E741801}"/>
<Attribute name="VegetationScale" guid="{6A043F59-E6F2-4117-A2E4-D510E7317C29}" type="UINT32" value="127"/>
<Attribute name="VegetationDensity" guid="{41EFF715-C392-4B31-A457-50A504353A90}" type="UINT32" value="16"/>
<Vertex lat="42.54922475762785" lon="-92.39671873709825"/>
<Vertex lat="42.54902961662989" lon="-92.39657492038103"/>
<Vertex lat="42.54907691351622" lon="-92.39646895876106"/>
<Vertex lat="42.54928767905257" lon="-92.39654554842195"/>
</Polygon>
<Polygon parentGroupID="9" groupIndex="6" altitude="264.15548706054688">
<Attribute name="UniqueGUID" guid="{359C73E8-06BE-4FB2-ABCB-EC942F7761D0}" type="GUID" value="{A6AE81D5-13E1-4287-8499-58A72E741801}"/>
<Attribute name="VegetationScale" guid="{6A043F59-E6F2-4117-A2E4-D510E7317C29}" type="UINT32" value="127"/>
<Attribute name="VegetationDensity" guid="{41EFF715-C392-4B31-A457-50A504353A90}" type="UINT32" value="16"/>
<Vertex lat="42.54923153029092" lon="-92.39673089493455"/>
<Vertex lat="42.54903638929295" lon="-92.39658707821732"/>
<Vertex lat="42.54908368617929" lon="-92.39648111659736"/>
<Vertex lat="42.54929445171563" lon="-92.39655770625825"/>
</Polygon>
<Polygon displayName="Polygon ( vegetation ) (copy)" parentGroupID="13" altitude="264.47958374023438">
<Attribute name="UniqueGUID" guid="{359C73E8-06BE-4FB2-ABCB-EC942F7761D0}" type="GUID" value="{88F7F008-C075-4EAC-B4DF-2E8E55A091FB}"/>
<Attribute name="VegetationScale" guid="{6A043F59-E6F2-4117-A2E4-D510E7317C29}" type="UINT32" value="0"/>
<Attribute name="VegetationDensity" guid="{41EFF715-C392-4B31-A457-50A504353A90}" type="UINT32" value="31"/>
<Vertex lat="42.55139290577266" lon="-92.40275204714897"/>
<Vertex lat="42.55069637920847" lon="-92.40243347980447"/>
<Vertex lat="42.55053958853155" lon="-92.40122515962994"/>
<Vertex lat="42.55144930436404" lon="-92.40158704370755"/>
</Polygon>
LandmarkLocation Objects
The following example shows a scenery file that only contains <LandmarkLocation />
objects:
<?xml version="1.0"?>
<FSData version="9.0">
<LandmarkLocation instanceId="{C9C78CC3-432B-471E-9BFF-5E728377FF09}" type="City" name="TT:LOCATION.BORABORA" lat="-16.48740634871785" lon="-151.74273550071760" alt="49.29053375311196" offset="0.000000"/>
<LandmarkLocation instanceId="{8FFA7818-68CA-43E4-A1EA-B74AC37E4C27}" type="City" name="TT:LOCATION.HUAHINE" lat="-16.74681237076995" lon="-151.01408487562219" alt="79.85030739661306" offset="0.000000"/>
<LandmarkLocation instanceId="{A2378F3A-BEBD-497D-A908-95E1AF0963BF}" type="City" name="TT:LOCATION.MAUPITI" lat="-16.44618426337585" lon="-152.25683573913528" alt="356.59358739666641" offset="0.000000"/>
<LandmarkLocation instanceId="{5D42B34C-4DD5-49FC-B5E1-1A4D919D6A88}" type="City" name="TT:LOCATION.RAIATEA" lat="-16.84107534536882" lon="-151.43211091435106" alt="106.10556992329657" offset="0.000000"/>
<LandmarkLocation instanceId="{3268BE18-C1CE-48E4-AD1B-11A6147D7617}" type="City" name="TT:LOCATION.TAHA" lat="-16.63395818045029" lon="-151.51179132625131" alt="137.19065947178751" offset="0.000000"/>
<LandmarkLocation instanceId="{73062E26-166F-4A2D-8FB7-93800B5F3D6F}" type="City" name="TT:LOCATION.TUPAI" lat="-16.24178012444087" lon="-151.82183288122727" alt="61.15640213713050" offset="0.000000"/>
<LandmarkLocation instanceId="{BCF41117-7C10-4A1D-ACDC-513AD4D0AA1A}" type="POI" name="TT:LOCATION.POI.0297" lat="-16.49968948796995" lon="-151.73960294382363" alt="711.65154359582812" offset="0.000000"/>
<LandmarkLocation instanceId="{E4C4EA72-67BD-45E7-8A7B-747032C6D159}" type="POI" name="TT:LOCATION.POI.0319" lat="-16.62159338014603" lon="-151.51292226697558" alt="555.15546081867069" offset="0.000000"/>
<LandmarkLocation instanceId="{E63BE75A-73E4-4C31-85F7-75B831C7A716}" type="Fauna" name="TT:LOCATION.FAUNA.0320" lat="-16.82876905226456" lon="-151.45226861291394" alt="983.29910009168088" offset="0.000000"/>
<LandmarkLocation instanceId="{A5F91E90-5C05-4325-B7CA-64D55C360109}" type="Star landmark" name="TT:LOCATION.STAR.0321" lat="-16.72630193473168" lon="-151.01271306272750" alt="759.02450194209814" offset="0.000000"/>
</FSData>