WindsockSample

This sample project shows you how to create and add a simple SimObject into a scene, and how to use the Model Definitions XML to have that model interact with the simulation. In this case it's to make the SimObject change direction and animation based on the wind direction and strength. The main "core" of this sample is the included 3DS Max file (which can be found in the "Source" folder):

The Windsock Model In 3DS Max

 

The other important file is the Windsock.xml file - found in the model folder of PackageSources - which is where the basic Model Behaviors are defined to have the object interact with the simulation:

The Windsock.xml File Location

 

You can expand the link below to see the WindsockSample file and folder structure:

File OverviewFile Overview

|---+ WindsockSample
    |---+ PackageDefinitions
    |   |---+ mycompany-simobjects-windsock
    |   |   |---+ ContentInfo
    |   |   |   |---- Thumbnail.jpg
    |   |   |---- Business.json
    |   |---- mycompany-simobjects-windsock.xml
    |---+ PackageSources
    |   |---+ SimObjects
    |       |---+ Landmarks
    |           |---+ MyCompany-Windsock
    |               |---+ animation
    |               |   |---- Windsock_animations.bin
    |               |   |---- Windsock_animations.xml
    |               |---+ model
    |               |   |---- model.CFG
    |               |   |---- Windsock.xml
    |               |   |---- Windsock_LOD00.bin
    |               |   |---- Windsock_LOD00.gltf
    |               |---+ TEXTURE
    |               |   |---- Windsock_Fabric_Albedo.png
    |               |   |---- Windsock_Fabric_COMP.png
    |               |   |---- Windsock_Fabric_Normal.png
    |               |---- sim.cfg
    |---+ Sources
    |   |---+ Art
    |       |---+ Max
    |           |---- Windsock.max
    |---- WindsockSampleProject.xml

 

 

Loading And Building The Project

In order to load and build the project in Microsoft Flight Simulator, you must have previously enabled Developer Mode (see here for more information). Once enabled, simply follow these steps:

 

  • Use the Open project... command from the File menu.

Developer Mode Open Project

 

  • Select the file WindsockSampleProject.xml from the WindsockSample project folder:
    Open The Windsock Sample Project

 

  • The Project Editor should open automatically and show you the project mycompany-simobjects-windsock (if the Project Editor doesn't open, then you can open it from the Developer Mode Tools menu):
    The Windsock Package In The Project Editor

 

  • Clicking on the project in the Project Editor will open the Inspector Window, and here you need to click the Build Package button (if the Inspector Window does not open automatically, go to the View menu in the Project Editor and open it from there):
    Building The Windsock Package

 

  • This will build a package from the files specified in your project. This package will be named mycompany-simobjects-windsock and will be output in the Packages folder created in the same directory as WindsockSampleProject.xml:
    The Windsock Package Folder

 

  • Once the package has been built, the SimObject will be available to place in the world. This is done through The Scenery Editor, which can be opened from the Tools menu. Once you have the Scenery Editor opened, you will need to also open the Objects window, which can be found in The View Menu of the Scenery Editor:
    Opening The Objects Window In The Scenery Editor

 

  • In the Objects window, you should select "SimObject" as the Object Type, and then select the mycompany-simobjects-windsock package from the list:
    Finding The Windsock SimObject In The Objects Window

 

  • You can then go ahead and click on the Add button to add a copy of the Windsock object into the scene:
    The Windsock Object In The Scene