Overview

Using Modeling Tools

To develop aircraft models, vehicle models, or scenery models for ESP, ideally you will need the 3-D modeling tool 3ds Max, but alternatively you can use any modeling tool that supports the creation of the custom ESP modeling format. The Modeling SDK consists of a set of tools that help in the building of models, and to enable those models to be exported in the correct format for ESP.

See Also

Table of Contents

Setup

  • 3ds Max

Exporting a Model from 3ds Max

Importing a Model to ESP

Sample Files

The Export and LOD tool

  • The Switch LODs rollout
  • The File Properties rollout
  • The Model verification tools rollout
  • The Export Tools rollout
  • The Export a placement file rollout

The Export and LOD tool for 3ds Max 9

The LOD and Name Tool

The Shader tool

The Wheel Setup Tool

The Attach Tool

The Cloud Tool

The Animation Manager

Creating a New Animation

The XToMdl Tool

Setup

3ds Max

In order for 3ds Max to work correctly with the scripts and tools of this SDK, go through the following steps:

  1. Install and run 3ds Max 7+.
  2. Select Customize on the main menu. Following this the options vary slightly depending on which version of 3ds Max is being used.
  3. Select Customize Paths/Configure Paths/Plug-ins in 3ds Max 7, Configure User Paths/3rd Party Plug-ins in 3ds Max 8, or Configure System Paths in 3ds Max 9.
  4. Select Add, and then browse to the Microsoft ESP\1.0\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins folder if you are using 3ds Max version 7 or 8, or to the 3DSM9\Plugins folder if you are using version 9.
  5. Select Use-Path and OK, and this path will appear in the dialog.
  6. It is now necessary to shutdown and restart 3ds Max.
  7. On restarting, a new main menu item named Aces Tools should appear with drop-down options for the tools, including: AttachPointTool, LODNameTool, AnimationManager and FSCloudTool.
  8. You are now ready to use 3ds Max to create ESP models.
Notes

The scripts in the 3DSM9 folder refer to many of the scripts in the 3DSM7 folder, so be sure not to move or delete the latter folder if you are using 3ds Max 9.

There is a known issue when running 3ds Max 9 on Windows Vista when using third-party plugins. If plugins are installed, removed, and re-installed they can fail to load. One workaround for this is create a new .ini file for 3ds Map 9, and a desktop shortcut that selects the new .ini file on startup. The default plugin.ini file is in the C:\Users\<user>\AppData\Local\Autodesk\3dsmax\9 32bit\enu folder. The new .ini file should be placed in the same folder, be called something suitable (for example, ESPplugin.ini), and contain the following:

[Directories] Additional MAX plug-ins=C:\Program Files\Autodesk\3ds Max 9\PlugIns\ AcesTools=C:\Program Files\Microsoft ESP\1.0\SDK\Environment Kit\Modeling SDK\3DSM9\Plugins [Help] mental ray 3.5 Reference=C:\Program Files\Autodesk\3ds Max 9\help\mr_reference.chm mental ray 3.5 Reference=C:\Program Files\Autodesk\3ds Max 9\help\mr_reference.chm

Then create a copy of the 3dsMax 9 shortcut on your desktop. Right click on it and select Properties. Change the Target line to read:

"C:\Program Files\Autodesk\3ds Max 9\3dsmax.exe" -p "C:\Users\<user>\AppData\Local\Autodesk\3dsmax\9 32bit\enu\ESPplugin.ini"

Then use this shortcut to start 3ds Max 9 each time.

Exporting a Model from 3ds Max

When exporting a 3ds Max model to be used in ESP, go through the following steps:

  1. Textures for the model should be converted to mip-maps, using Imagetool (found in the Environment Kit\Terrain SDK folder), and then converted to DDS files, also using Imagetool. To appear in the simulation the DDS files should be placed in the Add-on Scenery/texture folder.
  2. If skinned animation is to be applied to the model, ensure that a ESP material is applied (click the FlightSimX box of the Material Editor dialog), and that the Skinned Mesh box is checked in the enhanced parameters section of the Material Editor dialog.
  3. To animate using skinned animation select the bones of the object, then bring up the Animation Manager. Set Start and End frames. Select a name for the animation, such as Ambient, and click Create.
  4. To animate a piece of geometry without using skinned animation, select the geometry, then bring up the Animation Manager and set Start and End frames, and a name. If there are multiple animations, then select different names for each (such as Ambient, Ambient2, and so on). Click Create to create the animation.
  5. Bring up the File Properties for the model. Select the Custom tab. For Name enter the word FriendlyName, and for Value enter a suitable name for the model. Then click Add. Enter another property called Guid and enter a GUID into the Value field. See the Overview documentation for a link to a GUID generating tool. After pasting in the GUID, remove the curly brackets at either end. Click OK. Alternatively use the LOD and Name Tool to enter the friendly name and GUID.
  6. To export the model, make sure the format Flight Simulator Direct X File (*.X) is selected, no other model format will work. If the option Flightsim Model (*.MDL) is shown, do not use it, it has not been implemented in this release.
  7. Click Save. Make sure that the options Export Skin and Export Animation are checked in the Flight Simulator Model Export Options dialog, if skinned animations or animations are included in the model.
  8. If everything is correct, this process will create a .x file, and optionally a .xanim file. If there are any errors, fix them before proceeding any further.

Importing a Model to ESP

To import a model created by 3ds Max and exported correctly, go through the following steps:

  1. Convert the .x file and .xanim file to the correct model format (.mdl) using the XtoMdl tool. Make sure the /XANIM switch is set if there is a .xanim file, and the /XMLSAMPLE switch should also be set.
  2. Follow the instructions for the XtoMdl tool to edit the placement XML sample appropriately. This will place the model near the main runway of Sea-Tac airport.
  3. Copy the .mdl file output from the XtoMdl tool, and the edited .xml placement file to the BGL Compiler SDK folder.
  4. Drag the XML placement file over the BGLComp icon, which should result in a bgl file. If it does not, open up a command window and run the BGL compiler from there, as the errors will then be readable. Refer to the Compiling BGLdocumentation for more details.
  5. Copy the bgl file to the Add-on scenery/scenery folder.
  6. Run ESP. Change the airport to Sea-Tac International.
  7. The new object should be visible from the user-aircraft at the start of the runway.
  8. When you are satisfied with the model. If the object is a scenery object, create a new placement file placing the object exactly where it should be. If the object is an aircraft, refer to the Aircraft Configuration Files for all the other steps necessary.

Sample Files

The following samples are included in the Modeling SDK/3DSM7/samples folder.

  • A model Douglas DC3, with a variety of animations, textures and materials.
  • TestX.max is a 3ds Max file that contains an object with many of the animation, attach point and other features described in this document.
  • TestX.x and TestX.xanim are sample files output by 3ds Max, given TestX.max as the input.
The sample included with the modeling tools shows a landing platform with a variety of animated parts. To simplify the sample, it does not come with any textures.
The sample placed near the main runway of Sea-Tac airport.

The Export and LOD Tool

The Export and LOD tool included in this SDK is a MAXScript plugin for 3ds Max that allows you to switch and rename the LODs, add or edit a GUID and Friendly name, verify the model and then export and view it in the simulation.

The LOD and Name Tool is available in the Aces Tools drop-down menu.

The main dialog of the tool for 3ds Max 8 and earlier, looks like this:

The Switch LODs rollout:

  1. Populate the LODs!: Pressing this button will reparse the file and repopulate the LOD objects listed in the LOD listbox. This only needs to be done when a new LOD is created or merged into the scene. If a file is opened, the list box should populate automatically.
  2. Interactive LOD Window: This is a method for viewing the LOD switching as it would theoretically appear in the simulation (it uses similar LOD code to the simulation rendering engine). It's not entirely exact. Press the button and move the mouse up to zoom in and down to zoom out. Any click will stop the tool and revert the scene back to the way it was.
  3. Polygon Count: This is where the polygon count for the selected LODs will be displayed. If multiple LODs are selected, then it will display the combined polygon count. It will only display the polygon counts of objects it can read. If the stack is too deep or the object is not a mesh, it may not return a polygon count for that object.
  4. LOD List Box: This is where the LODs in the scene will be displayed. An LOD is defined as anything with the name *_LOD_[number]. Selecting one or multiple LODs from this list will hide everything except those LODs. Selecting "Unhide All" will unhide everything in the scene. Selecting "Unhide Bones" will unhide the bone objects in the scene.
  5. Rename the LODs to match Filename!: Pressing this will rename the name prefix (before the _LOD_) of any LOD to exactly match the filename.

The File Properties rollout:

  1. GUID: This is where the file's GUID is displayed. The GUID is stored in the Custom section of the File Properties as a string.
  2. Create: Pressing this button will create a new GUID for the file. If a GUID is already specified, then the tool will prompt with the following dialog:
  3. Friendly Name: This is where the file's Friendly Name is displayed. The Friendly Name is stored in the Custom section of the File Properties as a string.
  4. Edit: Pressing this button will enable the Friendly Name text box. On enter, the Friendly Name will be changed. If a Friendly Name is already specified, then the tool will prompt with the following dialog:
  5. Get GUID from .x file: If there is a .x file in the same folder, with the same name as the currently opened file, then pressing this button will cause the tool to automatically pull the GUID and Friendly Name from that .x file.
  6. Choose .x file to get GUID? Checking this check box will allow the user to select which .x file to get the GUID and Friendly name from when the Get GUID from .x file: button is pressed.
  7. Model has shadow map? Checking this check box will cause the object to use the shadow map self-shadowing method. Currently this only works in Virtual Cockpits.

The Model verification tools rollout:

  1. Verify Scale: If this is checked, all objects will be tested to make sure their scale is [1,1,1] or 100%.
  2. Verify GUID and Friendly: If this is checked, the file will be tested for a GUID and Friendly name. Additionally, the .x file will be checked to make sure the .Max and .x file GUID and Friendly name match.
  3. Verify Colocated verts: If this is checked, each object will be tested to make sure it doesn't have multiple vertices in the same location. This can take several minutes for high polygon count objects (>2000).
  4. Verify Duplicate Parts: If this is checked, the model will be tested for objects that have duplicate part names.
  5. Verify Aces Materials: If this is checked, the model will be tested for correct materials.
  6. Verify LODs: If this is checked the model's LODs will be tested to make sure the LOD names match the filename and also verify that the hierarchy is correct. It will also test the polygon counts to make sure they are reasonable.
  7. Verify Open Edges: If this is checked, the model will be tested for open edges.
  8. Verify Volume Shadow: If this is checked, the model will be tested for edges that are used in more than two faces. This can potentially cause problems for the volume shadow. This can take several minutes for high polygon count objects (>2000).
  9. Verify texture verts: If this is checked, the model will be tested to make sure the texture verts are within a reasonable range (+-10.00).
  10. Verify Root node: If this is checked, the model will be tested for multiple root nodes.
  11. Verify!: Pressing this button will initiate the verify function. If the model is perfect, it will return a dialog like this:

    If the model has errors, it will open another dialog that displays each error in a list box. When that error is selected, it will display the specifics in the list box below it. The image below shows the results of that. Hover over the broken parts to see the result and what can be done with the tool from there.

The Export Tools rollout:

  1. Root path info: This is currently disabled for the SDK.
  2. Change Root Path: This is currently disabled for the SDK.
  3. Prompt on export? Checking this will enable the export prompt for animation and skinning when the .x file is exported. Check this if the model has skinning or animation.
  4. Build on export? This is currently disabled for the SDK.
  5. Build only MDL file? This will build an .mdl file and place it in the addon scenery\scenery folder for use in a placement file later.
  6. Choose Export file: Checking this enables the user to select the .x file to export to, rather than exporting a .x file with the same name as the filename in the same directory as the current file. (Which is the default behavior for .x file exports with this tool.)
  7. Build type: This is currently disabled for the SDK.
  8. Tex Dir: This is currently disabled for the SDK.
  9. Export this Max file! Pressing this button will cause 3ds Max to export a Flightsim .x file using the parameters specified in the various check boxes described above.
  10. Export all Max files! This is currently disabled for the SDK.
  11. Export type: These radio buttons will enable additional export functionality. Clicking on a radio button will bring up a new rollout with more export parameters. Note: Only the Placement file is currently supported in the SDK.

The Export a placement file rollout:

  1. Filename: This is the name of the .xml placement file to be exported. It will end up in the addon scenery\scenery directory.
  2. Lat: The latitude where the object should be placed in the world. Use N for north and S for south.
  3. Lon: The longitude where the object should be placed in the world. Use W for west and E for east.
  4. Heading: The heading of the object in the world. 0 is facing north, 180 is facing south, 90 is facing east.
  5. Debug / Retail / Hybrid: This is currently disabled for the SDK.
  6. Load this model in the simulation at this location? This will load up ESP in a flight at the exact location of the object placement file. ESP must be shut down in between each viewing in order for the object to refresh.
  7. Export Placement File! Pressing this button will create an .xml placement file in the addon scenery\scenery directory and then use the BGL Compiler to create a .bgl file. If the Load this model in the simulation at this location? checkbox is checked, it will then load a flight in the sane location as the object, so it can be viewed in the simulation.
  8. Delete Placement File! Pressing this button will delete both the .xml and .bgl files from the addon scenery\scenery folder that match the name in the Filename: text box.

The main dialog of the tool for 3ds Max 9, looks like this:

 

The Export and LOD tool for 3ds Max 9

By default, the tool is collapsed. Press the tool tabs to expand the appropriate tool. Press the tool tab again to collapse that tool.


 
 
Here is a view of the fully expanded tool. It is almost exactly identical to the 3ds Max 8 Export and LOD tool. The only differences are as follows:
  • The 3ds Max 9 Export and LOD tool enables the ability to open and close sections of the tool via the menu strip at the top of the tool.
  • The switch LOD's rollout of the 3ds Max 9 Export and LOD tool shows the whole scene tree rather than just root LOD node. Selecting anywhere in the hierarchy will reveal that object and all of its children.
  • Dragging and dropping a node in the switch LOD's rollout of the 3ds Max 9 Export and LOD tool will re-parent that node to the node on which it is dropped.
  • Only a single node can be selected at a time in the switch LOD's rollout of the 3ds Max 9 Export and LOD tool.
  • By checking and unchecking the Bones or AttachPts check boxes of the 3ds Max 9 Export and LOD tool, a user can include or exclude objects of that type from the list of objects displayed. A check means those objects are excluded from the list.

Note: It is important to keep the GUID of an object consistent throughout its lifespan. If the GUID is not kept consistent, then placement files will not find the object and missing scenery errors will occur.

The LOD and Name Tool

The LOD and Name Tool included in this SDK is a MAXScript plugin that allows you to view LODs quickly, rename your LODs to match your filename and setup a GUID and Friendly Name for export. 

The LOD and Name Tool is available in the Aces Tools drop-down menu.

The main dialog of the tool, looks like this:

 
If this tool is started while a file with correctly named LODs is open, then the list of LODs will automatically populate. If a new file is opened, press the Populate the LODs! button in order to repopulate the list.
 
The Polygon Count: text box will display the polygon count of the currently selected LOD plus all of its children.
 
Use the list box to select the LOD to be viewed. Upon selection, the tool will hide everything except that LOD and its children. It will also select the LOD and its children. If the list box is empty it means there are no correctly named LODs in the scene. A correctly named LOD has the suffix "_LOD_[number]", where the [number] represents the number of the LOD. Generally 100 is the top LOD. Selecting the Unhide All entry will reveal everything in the scene.
 
The Rename the LODs to match the Filename! button will rename the root node and all of the correctly named LODs in the scene to the name of the filename. This is handy for the quick renaming of all the LODs. This is also handy for making sure other tools (like the attach point tool) will find correctly named LODs.
 
The GUID and Friendly name are the methods by which 3D objects are referenced. In order to be placed in the world, every object must have a GUID. The GUID and Friendly name are stored in the File Properties of the 3ds Max file. The next section of the tool enables a user to set or edit the GUID and Friendly name.
 
If this is a new file, then a new GUID and Friendly name must be set. Press the Create new GUID for this file button in order to create a new GUID and friendly name. If there is no GUID present, then an additional dialog will pop up that looks like this:
 
 
If there is a filename for the currently opened file, the text field will default to that filename. The Friendly Name can be anything descriptive to help identify the object. Press the Go! button to confirm the Friendly Name. At that point, the file will have a GUID and Friendly Name assigned to it. To view the GUID and Friendly Name, use the File menu to select File properties.... Then click on the Custom tab. The GUID and Friendly name should look something like the image on the left.
 
In order to get the GUID and Friendly name from an existing .x file, use the Get GUID from .x file button. If there is a .x file in the same folder, with the same name as the currently opened file, then the tool will automatically pull the GUID and Friendly Name from that .x file. If there is not a .x file, then this dialog will pop up:
 
 
If the .x file that has the desired GUID and Friendly Name is not named the same as the opened file, check the Choose the .X file to get the GUID from? checkbox and then press the Get GUID from .x file. Navigate to the .x file with the desired GUID and it will get the GUID and Friendly name from that .x file.
 
In the case where the currently opened file already has a GUID and Friendly name and either the Create new GUID for this file button or the Get GUID from .x file button has been pressed, the following two dialogs will pop up:
 
 
Pressing Yes will replace the GUID or Friendly Name. Pressing No will not. In this way either the GUID or the Friendly Name can be selectively replaced.

The Shader Tool

The Shader tool included in this SDK is a MaxScript tool that allows a user to easily view the materials. The default material editor in 3ds Max is not resizable and therefore is difficult to use for extended materials. The Shader tool is basically a mirror of the scene materials and their properties. The one additional functionality is the ability to load and save profiles based on the settings in the dialog. This way, if a user has a very complex set of shader settings, they can be saved and reused.

  1. Materials in the current scene: This tree view control displays the current scene materials. The root node Scene Materials is the array that contains all of the materials referenced in the current scene. Standard or FSX Materials appear as an entry under Scene Materials. Multi Materials appear as an entry with children. Selecting one of the materials will load up its properties and its maps. Properties can then be changed on that material using the various UI elements. Double-clicking on a node in the tree view allows the user to rename that material. The rename does not take effect until another node is selected.
  2. Refresh Materials: Pressing this button will repopulate the scene materials tree view control with all of the current scene materials. This populate function is called automatically when the tool is opened or when another file is opened. The only time this button needs to be pressed is if the user creates a new material in the material editor while the Shader Tool is opened.
  3. Diffuse Color / Specular Color / Specular Value: These represent the same values in the standard or FSX Material.
  4. Bitmap Type: Use these radio buttons to select the various map types available in the FSX Material. If there is a map specified and the map can be found, then it will display that map in the Current Bitmap Slot. If there is no map specified for that slot, or the map cannot be found, then the "No Image Available" map will be displayed. 3ds Max still cannot display alpha channels in a .psd file, so it will not display anything.
  5. Current Bitmap Slot: This is the large bitmap slot that is used to display the selected bitmap. Below the slot are three labels. The first displays the name of the bitmap (noImage.jpg will be displayed if there is no image associated with the currently selected slot), the second displays the size of the bitmap in pixels and the third at the bottom displays the bitmap path. If an image is specified, then these will be filled in regardless of whether or not 3ds Max can find the image itself.
  6. Bitmap Load buttons: Use these buttons to load an image file into the appropriate bitmap slot. Pressing the button will bring up the standard Material/Map Browser. Choose "bitmap" and then navigate to the image to be used in that slot. The slots that are empty will look like this: The slots that have bitmaps associated with them will have an "M" in them like this: To clear a bitmap slot, press the associated button and then choose NONE from the list of material types.
  7. Apply Material: Use this to apply the selected material in the Shader tool to the selected object in the scene.
  8. Show Maps: Use this to turn on the maps in the viewport. Currently this is not a toggle. It turns them on only.
  9. Clean up the material editor Pressing this button will invoke a function that loads only the scene materials into the 3ds Max material editor in order. All other materials are turned into the default standard material. This is a handy way to clean up the material editor if it is getting messy with unused materials.
  10. Profiles: This section of the tool allows a user to load and save profiles based on the current settings. Profiles are stored in an .xml document located in C:\Documents and Settings\[USERNAME]\My Documents\Aces Files\MyFSXProfiles.xml. If the file does not exist the first saved profile will prompt the user to create it. When the FSX Shader tool is first loaded or the materials are refreshed, this profiles document is loaded and any saved profiles' names are loaded into the drop-down list.
  11. Update selected material from profile! Pressing this button will load up all of the profile information from the selected profile and apply it to the currently selected material.
  12. Overwrite Selected! Pressing this button will take all of the current settings from the current material and save them over top of the currently selected profile.
  13. Create New! Pressing this button will create a new profile from the settings of the currently selected material. A dialog will pop up asking to name the new profile. Choose a unique name for each profile.
  14. Delete Selected! Pressing this button will remove the currently selected profile from the MyFSXProfiles.xml document. It will no longer be an available profile for loading and saving.
  15. Visualize using Direct X! Pressing this button will load onto the currently selected material a Direct X shader using a modified version of the simulation's general shader. It will look for the .dds files in the ESP directory structure (the .dds file must be somewhere in a texture folder there in order for the shader to visualize properly). It will use the constants from the FSX Material as the settings for the Direct X shader. It should look similar in the viewport to what it will look like in the engine. This is a way of quickly previewing shader work to get a reasonable idea of how it might look. Note: Because the FSX Shader is replaced with a Direct X shader, the Direct X shader will be reverted when the Shader Tool is closed, when the object is exported or when the object is saved (including during the autoback process). This prevents accidental loss of information in the FSX Material.
  16. The FSX Material Parameters: When an FSX Material is selected from the list of current scene materials, the FSX Shader tool will expand to display all of the current FSX Material settings of the selected material in an easy to use dialog. The UI should mimic the material editor in 3ds Max and any change of a setting will be immediately reflected in the material editor (except name changes, which require the user to select a new material in the material editor and then reselect the original material). Below is an image of what the settings look like in the FSX Shader Tool. For more information and what each setting means, see the FSX Material document.

The Wheel Setup tool

The Wheel Setup tool included in this SDK is a MaxScript tool for 3ds Max that enables separation, animation and annotation of wheels on vehicles. It will quickly detach the selected wheel geometry from objects, animate the resulting wheels correctly based on simulation requirements for wheels and then tag the animation with the correct animation tags so the simulation will drive the wheels correctly.

  1. Left Front: Create the appropriate animation, linkages and animation tags for the left front wheel.
  2. Right Front: Create the appropriate animation, linkages and animation tags for the right front wheel.
  3. Rear Wheels: Create the appropriate animation, linkages and animation tags for the rear wheels.
  4. Turn Radius: The amount that the wheel should turn (to the right). The default simulation turning for c_wheel is set as 0 to -360 degrees (a full turn).
  5. Go! Pressing this button will take the currently selected faces on all of the currently selected objects and detach them from their objects. It will only work on geometry that is part of an LOD. It will then rename the new parts based on which type of wheels is specified and the LOD number (for example: RearWheels_100, LFrontWheel_075, RFront_Wheel_050). The new wheels will then be linked to the original object. In the case of left and right front wheels, a turning dummy with animation is placed between the wheel and the original object. Then all of the parts are tagged with the correct animation tags based on the type of wheel (either c_tire_still_key or c_wheel).
    NOTE: The geometry must have no transforms on it in order for this operation to work correctly. Generally it is advisable to reset transforms on all geometry in the hierarchy as well as reset XForm on the selected geometry.
  6. Undo last wheel! Pressing this will revert the file back to the point it was at just before the last wheel was attempted. If the wheels shift significantly, press this button to restore the file.
  1. Turn Helper / Wheels: Which part of the object is to be selected
  2. Select Wheels! Pressing this button will select the wheels or the turn helpers based on which radiobutton is selected. This is a handy way to quickly navigate the wheels and turn helpers in a file.

The Attach Tool

The Attach tool included in this SDK is a MAXScript plugin that allows you to attach special effects, library objects, visibility conditions, and set active mouse rectangles for use with virtual cockpits, to your 3D models.  It also allows you to create landable platforms, remove crash boxes from parts of your model and attach beacons or other simulation driven objects to your models.

The attach tool is available in the Aces Tools drop-down menu.

The main dialog of the tool, when fully expanded, looks like this:

The first step in creating an attach point is setting the parameters. Although usually only one type of attach point is selected, such as Effect, any number of types can be associated with one attach point. Use the check boxes on the left of the tool to set the type of attach point. The Empty type of attach point cannot be used with other types of attach point.
 
The Attach Name: will automatically be set and updated based on the name or type of the selected attach parameters. A custom name can be typed in for each attach point if desired. The automatic updating of the attach point number suffix is done to allow speedy attach point creation while protecting from duplicate attach point names.
 
The Attach name should be unique to the point for the whole model. See the examples in Library Objects.
 
When all the correct parameters have been entered, use Attach to selected geometry or Create new attach point to complete the process.
 
Attach to selected geometry is used to create an attach point out of an already existing piece of geometry in the scene. Select the object that is to become an attach point and then press the Attach to selected geometry button. Additionally, already existing attach points can have their parameters changed by selecting the old attach point, setting up the new parameters and then pressing the Attach to selected geometry button. Check the Remove FS9 Attach? check box to clear out legacy attach point properties (which will not work in ESP). Because the actual geometry of attach points disappears, the tool will not allow a user to create an attach point out of an LOD.
 
Create new attach point requires that an editable mesh is already selected in the scene. If not, warnings will pop-up suggesting either selecting an object or making sure the selection is an editable mesh. The selected object is the object to which the new attach point will attach. After the button is pressed, the new attach point (a small sphere in most cases or the actual 100 LOD from the object in the case of library objects) will follow the cursor around whenever it is over the selected object. As the cursor moves over the surface of the object, the new attach point will align to the normal of the object. When the left mouse button is pressed, the attach point will be placed and a new attach point will be loaded with the same parameters and a new number suffix on the name. This allows rapid placement of many attach points. Use the right button to exit the Create New Attach Point mode.
 
The Offset from geometry: parameter works in conjunction with Create new attach point. The offset is the number in meters that the new attach point will be displaced along the surface normal of the selected object. Negative offsets will put the attach point inside the selected object.
 
If the attach point is to move along with an animation, use the Link tool of 3ds Max to link the attach point to an animated object or an animated dummy. Because attach points have no geometry, they themselves cannot be animated.
 
If the attach point is linked to an LOD, it will only show up in the simulation when that LOD is being rendered. In order to make an attach point persistent throughout all LODs, link the attach point to the root node of the scene.
 

The following sections provide notes on each type of attach point.

Effects

When the Effect type is first selected, a folder browsing dialog will open. Navigate to the ESP\effects folder and the effects drop-down list will populate with all of the .fx files from that folder. Attaching an effect is then as easy as selecting the effect from the drop-down list. However many effects should not go off continually, so it is possible to set parameters on the effect, so they appear only when certain conditions apply. The following table lists the general parameters:

RANDOM=random_range,random_threshold Specifies that the effect occurs randomly. A random number is generated between 0 and random_range; if the number generated is less than random_threshold, the effect is not created.
For example:
RANDOM=10,9 (10% chance of seeing the effect)
RANDOM=10,6 (40% chance of seeing the effect)
YEAR=year_begin,year_end Specifies that the effect occurs only if the simulation time is within the year range, inclusively. To have an effect play for the year 1989, the parameter would be written as:
YEAR=1989,1989
MOY=moy_begin,moy_end Specifies the months of the year (MOY), days of the month (DOM), hours of the day (HOD), minutes of the hour (MOH), and seconds of the minute (SOM) for which the effect occurs. All ranges are inclusive. Any combination of these ranges may be used; the more that are used, the fewer valid date/times the effect occurs. All times are in the local time-zone.
MOY range: 1,12;Where "1"= January, and "12"= December
DOM=dom_begin,dom_end DOM range: 1,31;Where "1"= first day of the month, and "31"= last possible day of the month
HOD=hod_begin,hod_end HOD range: 0,23;Where "0"= would be midnight, and “23” is 11pm.
MOH=moh_begin,moh_end MOH range: 0,59;Where "0"= would be the start of the duration of 60 minutes
SOM=som_begin,som_end SOM range: 0,59;Where "0"= would be the start of the duration of 60 seconds
DAWN=1|0
DAY=1|0
DUSK=1|0
NIGHT=1|0
Specifies that the effect should only occur during certain periods of the day. If the value is 1, the effect will occur. If the value is 0, it will not. If none of these parameters are specified, the effect will occur the entire day.
DURATION=seconds Specifies, in seconds, the duration of the effect. This parameter may be a non-integer; i.e. 2.5.

The following table lists a few examples, note the use of commas within parameters, and the semicolon to separate different effects parameters:

Kilauea Eruption YEAR=1983,1983;MOY=01,01;DOM=03,03;HOD=07,07; MOH=29,29;DURATION=31536000
It occurs on January 3, 1983 at 7:29 am and lasts 352 days.
Atlanta Fireworks: MOY=07,07;DOM=04,04;HOD=22,22;MOH=00,20; On July 4th every year, at 10:00pm it starts and lasts until 10:20 pm.
New York New Years Eve Fireworks MOY=01,01;DOM=01,01;HOD=00,00;MOH=00,20; It starts every year on January 1st at Midnight and lasts until 12:20 pm.

Library Objects

Attaching a library object in 3ds Max is simply a case of selecting the appropriate .x file. If there is a .max file with the same name in the same folder, the 100 LOD will be loaded as the attach point visual representation, rather than the default sphere. Note: The .x file selected must be a Flightsim .x file with a GUID associated or it will fail to attach correctly. Additionally, if the associated .max file is not set up properly, it may not merge a correct visual representation.

Visibility

The Visibility option enables different pieces of artwork to be rendered depending on the information provided by the simulation engine. One example of this is giving a blurring tire effect when a vehicle is moving, but a clearer tire image when that vehicle is stationary. Select the appropriate simulation variable from the drop-down list to change the visibility.

Mouse Rect

Mouse rectangles are for use with the 3D virtual cockpit. By defining appropriate rectangles, and attaching them to specific switches, those switches become active in the virtual cockpit, enabling the user to click on the rectangle to perform the attached function. Select the pre-defined mouse rectangle from the drop-down list.

Platform

A platform is a piece of geometry that an aircraft can land on. By default all objects have crash boxes associated with them. Designating an object as a platform will make it landable as well as remove crash boxes from an area around that object (based on the crash box size used in XtoMDL). Use the drop-down list to determine the surface type of the platform (for example: Concrete, Grass, Tarmac, etc.)

Platforms are also used for bridges created as scenery objects (that is, not for extrusion bridges, which are explained in Compiling BGL). A road bridge over water, for example, should have a platform that matches the route of the cars over the bridge, otherwise the cars will drop and cross the water.

No Crash

Removing crash boxes from geometry allows you to create portions of your model that the aircraft will not crash into.  This is especially handy when working with platforms. It is important to separate the geometry that does not require crash boxes from the rest of the model.

Empty

Empty attach points have two main uses. The first is to attach special objects such as beacons, the second is for use in the mission system (refer to the Mission Creation documentation).

The Cloud Tool

The cloud tool is available in the Aces Tools drop-down menu.

Using the Cloud Tool

Setup Scene Rollout

Create Cloud Rollout

Setup Cloud Groups Rollout

Prepare Cloud for Export Rollout

Using the Cloud Tool

Once you have run CloudTool.ms, you should see the Create and Export Clouds dialog, which will look like this:

There are four Rollouts in the Create and Export Clouds dialog:
 
Setup Scene
Create Cloud
Setup Cloud Groups
Prepare Cloud for Export

Setup Scene Rollout

This Rollout deals with the preparation of the scene for the creation of clouds. Open the CumulusCongestus48-1.max file (it is located in the Modeling SDK/3DSM7/samples/clouds folder). This file was used to create one of the actual variations of Cumulus Congestus clouds at 4/8 coverage. At first glance, it looks a little odd. There is a cloud and a whole bunch of brightly colored boxes. The brightly colored boxes are used to create the cloud shape. The cloud shape consists of many smaller facing sprites or planes, which creates the volumetric feel of the clouds.

On the Setup Scene Rollout, click the Hide the Boxes! button. Now you can see the cloud all by itself. Next click the Select All Sprites! button. Notice that all of the cloud sprites are selected. This comes in handy when you want to move, rotate or scale the entire cloud. Now click the Clear Old Sprites! button. This will remove all of the existing cloud sprites. Your scene should now be virtually empty except for the camera and the bounding box. Click the Unhide the Boxes! button. Now you can see all of the boxes that were used to create the cloud. You are now ready to re-create the cloud using the Create Cloud rollout.

Create Cloud Rollout

The scene in CumulusCongestus48-1.3ds is ready for cloud creation, so you should be able to work right from within this file. It is a good idea to use this file as a base file for the creation of new clouds, since it is set up to work properly already. You can just copy and manipulate the existing boxes, or add new boxes of your own to create different cloud shapes and types. However, to start from scratch, the following points outline some of the requirements and features of the .3ds file:

  1. All clouds are in 16km x 16km blocks. If you look at the CumulusCongestus48-1.3ds file, you will see a bluish-grey box outline that is 16,000 meters long by 16,000 meters wide by 3,000 meters tall. This is a dummy object that has been scaled and then frozen in 3ds Max. This provides you with a guideline to work around. If you keep your cloud close to the edges of this box (you can overlap a little bit for continuity), it will blend with the other clouds, because they are all 16km x 16km. The height of the cloud can be whatever you’d like for cumulus, though this affects the section it should be placed in, in the CloudArtFiles.xml (see the Prepare Cloud for Export Rollout section.) For stratus clouds, the cloud will be scaled according to the heights entered in the Advanced Weather dialog in ESP. Create the cloud at some mid-range height like 3,000 to 5,000 meters so that it looks good both large and small.

  2. The X and Y dimensions of the cloud should be centered around [0,0,0] in 3ds Max. The bottom of the cloud should be at 0 in the z dimension. This is because the altitude of the base of the cloud in the simulation corresponds to 0 in the z dimension in 3ds Max.

  3. When creating boxes, group identically colored boxes (wirecolor) close to each other and make sure to have a wide variety of colored boxes. This is because the wirecolor of the boxes gets transferred to the sprites that fill it. The wirecolor of the sprites gets transformed into Shading Groups, which determine how the cloud is lit. If you have only one Shading Group for your entire cloud, the highlights and shadows will be spread out over 16km. If there are too many Shading Groups, the cloud will look spotted. Take a look at the color distribution in CumulusCongestus48-1.max for a good idea of how many Shading Groups to have.

  4. To fill a box with one type of sprit, give it a specific name. If you look at the names of the boxes in CumulusCongestus48-1.max, you will see that there are a few different names for the boxes. Any box that is named Box* will get filled by the type of sprite called out in the Create Cloud radio buttons. Any box named Stratus* will be filled only with sprites using the Stratus textures. Any box named Solid* will be filled only with sprites using the Solid Cumulus textures. Any box named Wispy* will be filled only with sprites using the Wispy Cumulus textures. Any box named Base* will be filled only with sprites using the Base texture and those sprites will have their rotation limited from -5 to 5 degrees. Below is the Cumulus01 texture sheet and the locations of the various categories of textures:

    • Do not name any box “Plane*”. This will potentially confuse the export process later on. This is because the sprites that fill the boxes will be named “Plane*”.
    • You should have only one material in your scene. It should reference the included Cumulus01.tga as a map in both its color and alpha channels (if you want the cloud to appear close to how it will in the simulation).
    • If the texture does not show up in the viewport or in the material, this is because the path to it is erroneous.
    • There must be a target camera in the scene named Camera01. If there isn’t, the script will fail because it is trying to align all of the sprites to Camera01.

In order to create a cloud in 3ds Max, you must use the Create Cloud rollout on the Create and Export Clouds dialog. Since you have removed all the sprites from the CumulusCongestus48-1.max file, you are now ready to re-create the cloud from scratch. To do this, you must fill in some of the text boxes with appropriate numbers and choose from a variety of options. Here is what each of the inputs means:

Number of Sprites This is the number of sprites you want to initially fill the box volumes with. When you press the Create Cloud!! button, the cloud tool will figure out the volume ratio of each box to the volumes of all the boxes combined and fill that box with a corresponding ratio of sprites to the total number of sprites. So if the box it is filling is 1/100 of the total ratio of box volume, and you have entered 500 sprites in the Number of Sprites field, the cloud tool will fill that box with 5 sprites. Simply put, the bigger the box, the more sprites it gets.
Size of Sprites This is the sprite diameter in meters.
 
Cull Distance When the cloud tool fills the boxes with sprites, for each sprite it randomly chooses an x,y,z coordinate within each box’s bounding range and places the sprite at that location. Because random does not necessarily mean even distribution, you will sometimes see clumps of sprites together (this also happens if you overlap the boxes). The Cull Distance helps to mitigate this somewhat. When all of the sprites have been placed, the cloud tool goes back through each sprite and checks the distance from its center to every other sprite in the scene. If the distance is less than (1/Cull Distance * diameter of sprites) then that sprite is deleted. Typically, a very high Cull Distance will keep more sprites around. A very low Cull Distance will keep less sprites around.
Random Size Value This is the amount of variation in the sprite size in meters. If you have entered 1300 in the Size of Sprites text box and 100 in the Random Size Value, your sprites will be anywhere from 1200 to 1400 meters in diameter.
Fill only selected boxes! If this check box is checked, when you press the Create Cloud! button, the cloud tool will fill only the boxes that are selected with sprites
Make each box have a sprite This guarantees that every box will have a sprite. If you have 500 boxes and try to fill them with 300 sprites, this will guarantee that every box gets a sprite regardless.
Cloud Coverage Type The type of the cloud is determined by which portion of the Cumulus01 image gets applied to the sprites as they are created. If there are multiple textures within a type of cloud (as there are with Stratus, Wispy Cumulus and Solid Cumulus textures), each time a sprite is created, it gets assigned a random texture from within that type. There are four types of cloud coverage that can be assigned to the sprites in a cloud:
  • Low Coverage: applies only the Wispy Cumulus Textures to each sprite.
  • Stratus: applies only the Stratus Textures to each sprite.
  • Wispy Cumulus: applies both the Wispy Cumulus Textures and the Solid Cumulus Textures to each sprite.
  • Solid Cumulus: applies only the Solid Cumulus textures to each sprite.
You can also determine which textures get assigned to the sprites by naming the boxes. The names of boxes that will affect texture type are: Base*, Solid*, Wispy* and Stratus*. Any sprite placed within that box will get the corresponding texture type. That’s why CumulusCongestus48-1 has all of those boxes way below the bottom of the cloud. Those are all named Base, which means they will get filled with the base texture. The base texture has a flat bottom—something most clouds tend to have. Using box naming, you can create a wide variety of clouds. If you name all of the bottom boxes Base, then leave all of the bulk of the cloud named Box*, name all of the boxes on the very edge of the cloud Wispy, and then choose Solid as your cloud coverage type, you should see a dense cloud that has a flat bottom and wispiness all around the edges.
Create Cloud This button will start the cloud creation process, which can take a minute or two.
Number of Sprites
 
Update Sprite Count
These display the current number of sprites in the cloud. Because of the Cull Distance text box and the Make each box have a sprite check box, there will not necessarily be the same number of sprites as the number entered in the Number of sprites text box. After pressing the Create Cloud button, it counts and displays the number of sprites in the cloud. At any time, if you press the Update Sprite Count button, it will update the text box with the current number of sprites in the scene.
Overdraw Amount
 
Calculate
The Overdraw Amount text box is a very rough way of determining the performance of this particular cloud. When you press the Calculate button, the cloud tool will compare the total amount of area the sprites are covering to the16 x 16 km block. The number displayed is the ratio of these two areas. If the Overdraw Amount shows 2, then you are covering the area of the 16 x 16 km block twice over. This means at any given point, there will be two sprites overlapping each other. Large numbers of overlapping alpha textures is a big performance hit. If you can keep the Overdraw Amount around or less than 6, performance should not be adversely affected. This is a very simple way of calculating overdraw, so you may see some anomalies, but it is a reasonable baseline for checking the performance of your clouds.

To create a cloud, enter some appropriate values into the Create Cloud rollout:

Try different settings for different results.

Once you have entered all of the information, press the Create Cloud! button. The creation of the cloud may take a little while. The progress bar at the bottom of 3ds Max should let you know, roughly, the progress. When the cloud creation is finished, it will hide the boxes, update the Sprite Count and show the sprites:

The cloud appears all black because there is no lighting. This will get addressed later in the Prepare Cloud for Export section. Notice that the bottom of the cloud is way below 0. We separate out the bottom of the cloud because it is easier to line up and tweak this way.
 
Select all of the Base sprites (the ones below the cloud) and move them up to line up with the bottom of the cloud, so it looks like the following image.
You can also view the cloud from all angles by manipulating Camera01. The sprites will face you as you move the camera. What you see in 3ds Max should be a very close approximation of what you will see in the simulation.

Setup Cloud Groups Rollout

The Setup Cloud Groups rollout is used to do two things: define Cloud Groups and limit Cloud Rotation. Currently, Cloud Groups are used for dynamically fading clouds in and out when the weather changes. They fade clouds out based on smaller units, rather than just the whole 16km x 16km block of clouds. All sprites must be associated with a cloud group or you will get an error when you try to export.

To create Cloud Groups, select a small batch of sprites that would reasonably make up a small cloud. Then press the Assign to Selected button next to the Cloud Group Number text box. It will put the following text in the User Defined Properties of the selected sprites: Cloudgroup = 0. It will also increment the Cloud Group Number text box by 1. This allows you to quickly assign Cloud Groups without having to type in a new number each time.

When sprites are displayed they default to a full 360 degree random rotation. This allows you to use less textures and get more variation. If you want to limit the rotation of a sprite (especially for the Base textures), use the Cloud Rotation text box to do so. If you name a box Base* when creating the cloud, it will automatically put Rotation=5 into the User Defined Properties of all the sprites created within that box. This means that the sprite will never rotate more than +5 or -5 degrees from 0 degrees. A 0 degree rotation means that when a sprite is facing you, the top of the texture will always be pointing up:

If you want to set rotation on sprites, first select them, then type in the rotation value in the Cloud Rotation text box. Then press the Assign to Selected button directly next to the Cloud Rotation text box. To view the user properties, right click on the sprites. This will display the rotation amount. Due to some differences between 3ds Max and ESP controls, you cannot view rotation in 3ds Max as it would appear in the simulation.

Prepare Cloud for Export Rollout

This section explains how to set up a cloud so that it can be exported using the FSModelExp.dle. It is a good idea to save the cloud now. During the setup process, information about each sprite (in this case, anything named “Plane*”) will be added into the User Defined Properties. Global information about the whole cloud will be added in the User Defined Properties of Camera01.

The color levels are used to create a performance enhancing pre-lighting condition. Because it is very performance intensive to calculate lots of real-time lighting on the fly for every single sprite in every single cloud, a precalculation is done to enable simpler run-time calculations. The color levels mimic the fact that light tends to come from above the clouds (the sun) and travel through them. As this happens, the density of the cloud and the moisture particles deflect and diffuse the light, causing the bottoms of the clouds to appear much darker than the tops, especially for denser cloud coverage. There are 5 color levels that can be applied to the cloud upon export preparation. Each of these color levels has 3 possible settings. Here is a description of the color levels and export preparation process:

Color[number] Height This is the percentage of the total height of the cloud at which the Color[number] and Alpha [number] will take effect. If you have set Color1 Height at 20.0 and Color1 at pure black (0,0,0), then the bottom 20% of the cloud will be pure black. It will then interpolate to the next color over the course of the next height percentage specified. So if Color2 is pure red (255,0,0) and Color2 Height is 50.0 then it will interpolate from black to red over the next 30% (50 - 20) of the cloud height.
Color[number]
This is the color that will be displayed at the Color[number] Height. The color of the vertices of the sprites are changed to achieve this effect. What this means is that if you have a very thin cloud layer where all of the bottom vertices are very close together in the Z dimension and all of the top vertices are very close together in the Z dimension, you probably won’t see all five color levels very clearly because there are no vertices in the middle 20-80% to be colored.
Alpha[number]: 0-255 This is the level of alpha that will be applied to the vertices at Color[number] Height. 0 is 100% transparent. 255 is 100% opaque. This is handy for fading a cloud out as it gets taller or giving the whole cloud a wispy look. 3ds Max is unable to display this as it appears in the simulation, so some trial and error may be necessary to get the desired effect. Generally a value of 255 across the board will give you something in ESP very similar to what you see in 3ds Max. Plus, it will avoid excessive alpha overdraw, which is a performance problem.
Visualize Color Settings! This button will take all of the color level inputs and give an approximation of what will appear in the simulation. The default settings are generally pretty good for cumulus type clouds. Feel free to tweak and visualize to get the best settings for any given cloud type. Try much darker bases for thunderstorm clouds or much lighter bases for very thin clouds. You can also use this to create incredibly bizarre color settings as well (try dark brown, olive green and orange for those 70’s living room clouds). This is roughly what the 3ds Max file should look like using the default color levels:
 

Prepare Cloud for Export This button sets up the scene so that the cloud can be exported using the FSModelExp.dle plugin. The only thing that needs to be adjusted for this to work is the color levels as described above. Press the Prepare Cloud for Export button. There should be a pause where it appears that nothing is happening (unless you get an error, such as the “#(Plane*) does not have a cloud group number. Please assign one!” error, which means that you need to go back to the Setup Cloud Groups Rollout and make sure every sprite is in a cloud group.) During this time, the cloud tool is putting all of the properties needed for export into the User Defined Properties for each sprite. It is also putting the global file properties into the User Defined Properties for Camera01.
Note

In order to export the sample cloud file included with the SDK, a group number must be assigned to each sprite. The easiest way of doing this is to select Select All Sprites in the Setup Scene rollout, then select Assign to Selected in the Setup cloud groups rollout. This should be done before the Prepare Cloud for Export button is pressed.

  1. To export the cloud, choose Export… from the File menu. This will bring up the Select File to Export dialog. Choose to export files of type Flightsim Cloud (.CLD). Navigate to the location that you want to export to and chose an appropriate name and then press Save.

  2. Copy any .cld file that you have created to ESP\Weather\clouds.

  3. To view your new clouds in the simulator, you’ll need to edit the CloudArtFiles.xml, which is installed in Weather\clouds folder. This file determines what type of clouds appear at what coverage. Open this file in Notepad or another text editor. The first few lines of the file should look something like this:

    <?xml version="1.0"?>
    <!-- XML file for locating cloud art files. -->
    <CloudFiles xmlns="x-schema:CloudArtSchema.xml">
    <cloud description="altocumulus">
          <coverage amount = "5">
                <variation file="_altocumulus58-5s.cld"/>
                <variation file="_altocumulus58-6s.cld"/>
                <variation file="_altocumulus58-7s.cld"/>
                <variation file="_altocumulus58-8s.cld"/>
          </coverage>
          <coverage amount = "6">
                <variation file="_altocumulus68-20s.cld"/>
                <variation file="_altocumulus68-13s.cld"/>
                <variation file="_altocumulus68-11s.cld"/>
                <variation file="_altocumulus68-12s.cld"/>
          </coverage>
          <coverage amount = "7">
                <variation file="_altocumulus78-4s.cld"/>
                <variation file="_altocumulus78-5s.cld"/>
                <variation file="_altocumulus78-6s.cld"/>
                <variation file="_altocumulus78-7s.cld"/>
                <variation file="_altocumulus78-10s.cld"/>
          </coverage>
          <coverage amount = "8">
                <variation file="_altocumulus88-10s.cld"/>
                <variation file="_altocumulus88-11s.cld"/>
          </coverage>
    </cloud>
  4. When the simulation requires cloud type “altocumulus” with a coverage amount of “5”, it will chose between the 4 files listed above (_altocumulus58-5s.cld, _altocumulus58-6s.cld, _altocumulus58-7s.cld, _altocumulus58-8s.cld). Find the appropriate section for your cloud, and just insert it into the file, for example:

          <coverage amount = "7">
                <variation file="_altocumulus78-4s.cld"/>
                <variation file="_altocumulus78-5s.cld"/>
                <variation file="_altocumulus78-6s.cld"/>
                <variation file="_altocumulus78-7s.cld"/>
                <variation file="_altocumulus78-10s.cld"/>
                <variation file="Test.cld"/>
          </coverage>

  5. Now your cloud will show up mixed in with the rest of the 7/8 coverage clouds. It can be very difficult to tell sometimes if your cloud is actually showing up at all, so use the included CloudArtFilesAllOne.xml as a test tool (located in the Modeling SDK folder). This file makes every single coverage reference one cloud: Test.cld. If you export your cloud as Test.cld, and then rename your CloudArtFiles.xml to CloudArtFilesReal.xml and then rename the CloudArtFilesAllOne.xml to CloudArtFiles.xml (and place it in the weather\clouds folder), you should see the Test.cld no matter what kind of weather you select.

Note

The reason there are far less variations of Stratus clouds is because they are scaled to the desired height of the cloud layer. This means that if you set a cloud layer to be Stratus and 6000’ tall, the cloud will get scaled vertically 6000’. Because Stratus tend to have that “wet blanket” effect, this looks okay. However, scaling cumulus clouds does not work well, so they are divided into four types, and not scaled:

  • Cumulus Humilis are cumulus layers shorter than 3000’.
  • Cumulus Mediocris cover from 3000-6000’.
  • Cumulus Congestus cover from 6000-9000’.
  • Towering Cumulus and the Cumulonimbus clouds with heights above 9000’.

So make sure any new cumulus clouds are put in the right section.

The Animation Manager

The Animation Manager is available in the Aces Tools menu, and simplifies the process of creating some animations.

The Groups and Animation List lists will be populated each time the tool is opened.

For a basic animation set Start and End frames, a unique name, and select Create.

Events allow a user to add special effect triggers into an animation (for examples of these, open up the oil rig or the orca whale models). Frame is the frame at which the effect is triggered, Name/Command should be set to VFX0 (the internal code for triggering a visual effect), and Parameter is effectname,attachpoint name (for example, fx_whalebreach,attachpt_whalebreach_1). Every time the animation gets triggered, the associated effects play. You need to have an animation selected in order to add events to it.

Auto Rotate creates rotation keyframes on a part. So, for example, if you want a wheel to rotate around the z axis 360 degrees, rather than hand-keying that in, you can select the part, tag the animation and then for the axis you want to use, type in the min and max rotation, check the axis checkbutton and then press the create button and the tool will create the keyframes for you. Note that you need to have an animation tagged and selected in order for this to work.

Markers are legacy and no longer supported. Tick18->Ambient is a legacy conversion. FS9->FS10 will convert earlier animations to the latest format.

Creating a New Animation

Model animations are defined in the modeldef.xml file (found in the Modeling SDK\bin folder). This file is used both by the XtoMdl tool, and the Animation Manager used within 3ds Max. The Animation Manager primarily reads the modeldef.xml file to extract the names of the animations (the animation tags) to populate the drop-down list of available animations. The XtoMdl tool does the bulk of the work in embedding the animation information into the model files.

Animations are also referenced from the Play Animation Action in the Mission Creation document.

To create a new animation, go through the following steps:

1. Add the name of the animation to the modeldef.xml file. To do this add an entry such as this to the <ModelInfo> section of the file:

<Animation name="Ambient" guid="A6F1C5D0-BEF6-449e-BAF8-FB777F27808F" type="Standard" typeParam="AutoPlay,Random" />

The following table describes the options for this entry:

name A unique name for the new animation. It should not contain any spaces or punctuation, but can contain underscores and numeric digits.
guid Generate a unique GUID for the animation (see the SDK Overview for a link to a tool to generate GUIDs). This is the reference the simulation will use to identify the animation.
type One of Standard or Sim. Standard animations are simpler to define and not typically driven by aircraft controls. Sim animations are usually linked to Simulation Variables, see the section on PartInfo below.
typeParam A comma delimited list of parameters, or can be the empty string.
AutoPlay: The animation will run when the object is rendered.
Random: The animation will be started at a random point along its timeline.
length This is entered only for Sim animations, and is for backwards compatibility. The length in frames here is largely ignored by the simulation, which will use the frame length stored with the model itself.
typeParam2 This is entered for Sim animations only, and should be a repeat of the animation name. It is necessary only for backward compatibility issues.

2. If the animation is of type Sim, add the definition of the animation in a <PartInfo> entry in the modeldef.xml file. The following example shows a fairly simple PartInfo entry:

The switch_master_battery animation will be run when the user clicks the mouse in the mouse rectangle for the part, which triggers a TOGGLE_MASTER_BATTERY event (refer to the Event IDs document).
 
The state of the switch is obtained from the ELECTRICAL MASTER BATTERY simulation variable (either true and false, or 1 or 0). This is multiplied by 50 to give the keyframes used for each state of the switch (keyframe 0 for false, keyframe 50 for true). A Lag of 400 indicates that the animation will take a minimum of one eighth of a second to complete.
 
The mouse rectangle also defines the Help ID and Tooltip text to use.

The following table contains the full list of properties that can be added to a PartInfo entry:

<PartInfo> One entry for each animation of type Sim.  
<Name> The name of the animation from the <Animation> entry. <Name>switch_alt_field</Name>
<Name>c_tire_blurred_key</Name>
 
<Copy> One PartInfo entry can serve as a template for another. For example if the two have very similar animations but reference a different variable, the second can copy the first, but a new <Variable> entry will override the first.
 
A <Copy> entry will use all the properties of the copied entry, except those that are explicitly entered with the copy.
- <PartInfo>
    <Name>switch_alt_field</Name>
    <Copy>switch_master_alternator</Copy>
</PartInfo>

 
<PartInfo>
    <Name>switch_fuel_pump3</Name>
    <Copy>switch_fuel_pump</Copy>
    <AnimLength>50</AnimLength>
     <Animation>
         <Parameter>

            <Sim>
                <Variable>GENERAL ENG FUEL PUMP SWITCH:4

                </Variable>
            </Sim>
        </Parameter>
    </Animation>
     <MouseRect>
        <EventID>TOGGLE_ELECT_FUEL_PUMP4</EventID>
    </MouseRect>
</PartInfo>



<AnimLength> The length of the animation in keyframes. <AnimLength>50</AnimLength>
<Animation> Describes how the part will animate. <Animation>
-    <Parameter>
         <Sim>
            <Variable>GENERAL ENG FUEL PUMP SWITCH:4

            </Variable>
        </Sim>
    </Parameter>
</Animation>

 
<Parameter> Contains either a <Sim> or <Code> entry, and optionally a <Lag> entry. <Parameter>
     <Sim>
        <Variable>GENERAL ENG FUEL PUMP SWITCH:4

        </Variable>
    </Sim>
</Parameter>

 
<Code> This section can contain a script for evaluation. These are described in full in the Creating XML Gauges document. <PartInfo>
    <Name>lever_bleed_air_source</Name>
...

    <Animation>
         <Parameter>
            <Code>(A:BLEED AIR SOURCE CONTROL,enum) 33 *</Code>
        </Parameter>
    </Animation>

...
 
<Sim> This entry must contain a <Variable> entry for the animation to reference, along with a <Units>, <Scale> and <Bias> entries. <PartInfo>
     <Name>l_aileron_key</Name>
...
     <Sim>
        <Variable>AILERON LEFT DEFLECTION</Variable>
        <Scale>-1</Scale>
        <Units>grads</Units>
        <Bias>50</Bias>
    </Sim>
...
</PartInfo>

 
<Variable> Simply the name of the simulation variable. Note that the usual notation (A:Variable name) is simplified to just the variable name for this entry. <PartInfo>
    <Name>switch_master_battery</Name>
...

    <Variable>ELECTRICAL MASTER BATTERY</Variable>
<Units> The units of the variable. The Simulation Variables document lists all the available units. <Units>bool</Units>
<Lag> A lag can be entered so a part will not jump instantaneously from one state to the next.
Lag is measured in the maximum number of keyframes per second. So, for example, if the animation frame length is 50, and the lag is set to 400, the animation will take a minimum of 50/400 or one eighth of a second to complete.
<Lag>400</Lag>
<Scale> Scales the value returned by the variable, and the result is the offset into the keyframes. For example, a boolean value of 0 or 1 scaled by 50, will result in keyframe 0 being used for the false state, and keyframe 50 for the true state. <Scale>50</Scale>
<Bias> If the value returned and scaled does not fall into the desired range for the keyframes (for example, the range -50 to +50), then a bias can be added to all values to indicate which keyframe to use. A bias of 50 in this example will adjust the range to 0 to 100. <Bias>50</Bias>
<Visibility> Determines when the animation is visible. Uses the same <Parameter> and <Sim> or <Code> sections as for the <Animation> entry. The example given shows that the blurred tires animation will only run if the center wheel rpm is high enough. <PartInfo>
    <Name>c_tire_blurred_key</Name>
    <Copy>tire_anim</Copy>
    <AnimLength>100</AnimLength>
     <Visibility>
         <Parameter>
            <Code>(A:CENTER WHEEL RPM, grads) 400 > if{ 1 } els{ 0 }</Code>
        </Parameter>
    </Visibility>
     <Animation>
         <Parameter>
             <Sim>
                <Variable>CENTER WHEEL ROTATION ANGLE</Variable>
            </Sim>
        </Parameter>
    </Animation>
</PartInfo>

 
<VisibleInRange> Specifies that the animation will only be visible if the value of the variable exceeds (with a <MinValue> entry) or is less than (with a <MaxValue> entry) a certain value.
 
Uses the same <Parameter> and <Sim> or <Code> sections as for the <Animation> entry.
<PartInfo>
    <Name>engine0_turning</Name>
     <VisibleInRange>
         <Parameter>
             <Sim>
                <Variable>GENERAL ENG RPM:1</Variable>
                <Units>rpm</Units>
            </Sim>
        </Parameter>
        <MinValue>1</MinValue>
    </VisibleInRange>
</PartInfo>


<PartInfo>
    <Name>engine0_stopped</Name>
     <VisibleInRange>
         <Parameter>
             <Sim>
                <Variable>GENERAL ENG RPM:1</Variable>
                <Units>rpm</Units>
            </Sim>
        </Parameter>
        <MaxValue>1</MaxValue>
    </VisibleInRange>
</PartInfo>

 
<VisibleMask> These entries are legacy and are ignored.  
<MouseRect> This section contains details on how the user interacts with the animated part. <PartInfo>
    <Name>lever_rotor_brake</Name>
...
     <MouseRect>
        <Cursor>Hand</Cursor>
        <TooltipID>TOOLTIPTEXT_ROTOR_BRAKE</TooltipID>
        <EventID>ROTOR_BRAKE</EventID>
    </MouseRect>
</PartInfo>

 
<Cursor> The shape of the cursor when the mouse is over the rectangle.
 
One of:

NONE
NORMAL
UPARROW
DOWNARROW
LEFTARROW
RIGHTARROW
HAND
CROSSHAIR

<Cursor>Hand</Cursor>
<HelpID> The ID of the help string to display. See the Help IDs document. <HelpID>HELPID_GAUGE_FUEL_SELECTOR</HelpID>
<TooltipID> The ID of the tooltip to display. See the Tooltips document. <TooltipID>TOOLTIPTEXT_FUEL_SELECTOR</TooltipID>
<EventID> The event that will be triggered if the mouse is clicked over the mouse rectangle. See the Event IDsdocument.
 
Alternatively a custom numeric event can be defined (in the range 0x11000 to 0x1FFFF), to be picked up by a gauge handler written in C++. See the example code for the function register_key_event_handler in the Programming C++ Gauges document.
<EventID>TOGGLE_MASTER_BATTERY</EventID>
 
 
 
 
 
<EventID>0x11000 + 0 </EventID>
<EventID>0x11000 + 1 </EventID>
<MouseFlags> One or more case-insensitive mouse flags that indicate when the <EventID> is to be triggered:
 
LEFTALL,
RIGHTALL,
MIDDLEALL,
RIGHTSINGLE,
MIDDLESINGLE,
LEFTSINGLE,
RIGHTDOUBLE,
MIDDLEDOUBLE,
LEFTDOUBLE,
RIGHTDRAG,
MIDDLEDRAG,
LEFTDRAG,
MOVE,
RIGHTRELEASE,
MIDDLERELEASE,
LEFTRELEASE,
WHEELUP,
WHEELDOWN,
WHEEL,
DOWNREPEAT,
MOVEREPEAT,
LEAVE

<MouseFlags>LeftSingle+LeftDrag+Wheel</MouseFlags>
<CallbackCode> This entry allows for a range of calculations, assignments and the sending of key events to take place. The script is explained in the Creating XML Gaugesdocument. <PartInfo>
    <Name>lever_adirs_display_1</Name>
    <AnimLength>100</AnimLength>
     <Animation>
         <Parameter>
            <Code>(L:Inertial Data,number) 50 *</Code>
        </Parameter>
    </Animation>
     <MouseRect>
        <TooltipID>TOOLTIPTEXT_A321_INERTIAL_DATA_KNOB</TooltipID>
        <Cursor>Hand</Cursor>
        <CallbackCode>(L:Inertial Data,number) ++ 3 % (>L:Inertial Data,number)         </CallbackCode>
    </MouseRect>
</PartInfo>

 
<CallbackDragging> Adding this entry allows for a more complex interaction with the part. The location where the user clicked and the current simulation value related to this part are captured. When the user drags the mouse a set key event is triggered (THROTTLE1_SET) in the example. The value passed with this key event is determined by the simulation variable, and the scale and bias values.
 
<Variable> and <Units> entries are required with a <CallbackDragging> entry.
<PartInfo>
    <Name>lever_throttle</Name>
....
     <MouseRect>
        <Cursor>Hand</Cursor>
        <HelpID>HELPID_GAUGE_THROTTLE_THROTTLE</HelpID>
        <TooltipID>TOOLTIPTEXT_THROTTLE_THROTTLE_PERCENT</TooltipID>
        <MouseFlags>LeftSingle+LeftDrag+Wheel</MouseFlags>
         <CallbackDragging>
            <Variable>GENERAL ENG THROTTLE LEVER POSITION:1</Variable>
            <Units>percent</Units>
            <Scale>163.84</Scale>
            <YScale>-163.84</YScale>
            <MinValue>-16384</MinValue>
            <MaxValue>16384</MaxValue>
            <EventID>THROTTLE1_SET</EventID>
        </CallbackDragging>
    </MouseRect>
</PartInfo>
<XScale>
<YScale>
Scales the delta X or Y value for the mouse. The delta is the difference in screen co-ordinates between the current position of the mouse and the position when the dragging started. <YScale>-163.84</YScale>
<MinValue>
<MaxValue>
The lower and upper limits of the value that will actually be sent with the key event. <MinValue>-16384</MinValue>
<MaxValue>16384</MaxValue>
<EventID> This should be a set key event, and not a key event that toggles or increments or decrements.
 
The equation used to send the value passed with the event ID is shown:
<EventID>THROTTLE1_SET</EventID>
 
 
 
value = Max( MinValue, Min( MaxValue, (((Variable value, in units specified ) * Scale + Bias)+ deltaX*XScale + deltaY*YScale) )
 
<Delta> The mouse movement in screen co-ordinates required for one increment or one decrement key event to be triggered. By default movement to the right or up increments, but this can be reversed by entering a negative delta. <Delta>33</Delta>
<CallbackJumpDragging> This entry is used for mouse interactions when an increment and decrement key event are required. <PartInfo>
    <Name>lever_bleed_air_source</Name>
    <AnimLength>100</AnimLength>
     <Animation>
         <Parameter>
            <Code>(A:BLEED AIR SOURCE CONTROL,enum) 33 *</Code>
        </Parameter>
    </Animation>
     <MouseRect>
        <Cursor>Hand</Cursor>
        <MouseFlags>LeftSingle+LeftDrag+Wheel</MouseFlags>
         <CallbackJumpDragging>
             <XMovement>
                <Delta>33</Delta>
                <EventIdInc>BLEED_AIR_SOURCE_CONTROL_INC</EventIdInc>
                <EventIdDec>BLEED_AIR_SOURCE_CONTROL_DEC</EventIdDec>
            </XMovement>
        </CallbackJumpDragging>
    </MouseRect>
</PartInfo>

 
<XMovement>
<YMovement>
These entries contain the definition of the required mouse movement (in the X and Y directions). <XMovement>
    <Delta>33</Delta>
    <EventIdInc>BLEED_AIR_SOURCE_CONTROL_INC</EventIdInc>
    <EventIdDec>BLEED_AIR_SOURCE_CONTROL_DEC</EventIdDec>
</XMovement>
<EventIdInc>
<EventIdDec>
The key event that should be sent when the value increases or decreases by the <Delta> amount or more. <EventIdInc>BLEED_AIR_SOURCE_CONTROL_INC</EventIdInc>
<EventIdDec>BLEED_AIR_SOURCE_CONTROL_DEC</EventIdDec>
<EventValueInc>
<EventValueDec>
The value to be sent as the increment or decrement.  

3. The new animation will show up in the drop-down list of the AnimationManager tool in 3ds Max, though 3ds Max will need to be exited and restarted to load any new additions to the file.

Note

The modeldef.xml includes some legacy entries that are no longer used. Also some of these unused entries have <PartInfo> entries but no corresponding <Animation name> entries.

The XtoMdl Tool

To create models, aircraft or scenery, use the XToMdl tool. The XToMdl.exe is a command line tool and is in the Modeling SDK\3DSM7\Plugins folder. To make the tool easy to use, save the model .X file and .XANIM file (the default location of these is C:\Program Files\Autodesk\3dsMax7\meshes) into the Modeling SDK\3DSM7\Plugins folder.

If all the appopriate files are moved to the Plugins folder, then normal use of the XtoMdl tool would be to enter the following in a command line window:

>XtoMdl /XANIM /DICT:..\..\bin\modeldef.xml /XMLSAMPLE filename.x

XtoMdl can take the following switches, which must be entered before the filename on the command line:

/KEEP  
Keep the intermediate file. This is an .XML file and can be used for reference.
/BMP2DDS
Converts all textures references to refer to .DDS files in the binary model format.
/XMLSAMPLE
Outputs a sample XML placement for a .MDL.  This .XML file is intended for use with the BGLComp compiler. Note that the comments should be removed before using this file as input to the compiler (delete all the text shown with the strike-through style below):
 
<?xml version="1.0" encoding="ISO-8859-1"?>
<FSData version="9.0" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation="bglcomp.xsd">
<!-- Sample object placement. Remove comment markers to place object east of 34R at Sea Tac. -->
<!--
<SceneryObject instanceId="{ec14df7a-3d72-4c87-bd55-daa998b6908f}" lat="47 25.89" lon="-122 18.43" alt="0" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL">
<LibraryObject name="{6684841f-5555-46d0-bcd2-52e2e2fae6c8}" scale="1.0" />
</SceneryObject>
-->
<!-- Inclusion of model data. Use the 'Name' of this object to place -->
<!-- it in other locations. -->
<ModelData sourceFile="testx.MDL" />
</FSData>
/XANIM
Specify that the model includes animations.
/DICT:<filename>
Specifies the path to the animation dictionary (usually modeldef.xml). See Creating a New Animation for a description of the format of this file.
/OUT:<OutputName> 
Changes the output name of the .MDL file.
/NOGUI
/BATCH
/NOCRASH
These switches are ignored in this version of the tool. There is no graphical user interface, and no crash information is being generated from this release of XToMdl.
Notes
  • Animations are not supported without the modeling export tools.  XtoMdl should function on non-animating scenery objects.  Animated objects that are not exported from 3ds Max with the correct export tools can be used with XtoMdl, but will not animate.
  • Due to changes in how materials and animations are handled a translation will take place with the possibility of warnings being output to indicate this. Typically warnings should not be treated as serious problems.