
Attaching an Effect
In order to attach an effect to your model, you must define a point in space where you
want that effect to display in relation to your model. This is done by creating a box or
another piece of geometry and using its pivot point as the location for the effect. All of
the information such as what type of effect or special parameters are then stored in the
user defined properties of that box as an xml stream. When the model passes through
MakeMDL in order to be processed into a format that Flight Simulator can read, the
geometry for the box is removed and what is left is a point where the effect will be
attached. Here’s how to view the xml stream that defines the effect and its properties:
1. Before we do anything in gmax, we need to get the effects in the right place.
Copy the included fx_ChimneySmoke.fx and fx_VentSteam.fx files to your
effects directory in your Flightsim folder (C:\Program Files\Microsoft
Games\Flight Simulator 9\Effects).
2. Open the included EffectHouse.gmax file. I have added a chimney and a vent to
this version of the house that are not in the House.gmax file used in the
gmaxSceneryTutorial.doc. The chimney already has an effect attached to it.
You can see the bright green box that sits just above the chimney.
3. Select that box and then right-click over it in any viewport. This will bring up the
Quad Menu. Select Properties… in the Quad Menu. This will bring up the
Object Properties dialog. In the Object Properties dialog, click on the User
Defined tab. In the text box, there should be something that looks like this:
<?xml version="1.0" encoding="ISO-8859-1" ?> <FSMakeMdlData
version="9.0"><Attachpoint name="attachpt_ChimneySmoke">
<AttachedObject> <Effect effectName="fx_ChimneySmoke"
effectParams=""/> </AttachedObject> </Attachpoint></FSMakeMdlData>
This is the xml stream that tells Flight Simulator what to do with this geometry.
In this case, it is attaching the effect fx_ChimneySmoke.fx to the pivot location of
the object attachpt_ChimneySmoke. You can enter this xml by hand into the
User Defined Properties of any object, or you can use the Attach Tool to do this
for you.
Here’s how to use the Attach Tool to attach an effect:
1. First you need to create a location for the effect to go. Do this by creating a box
over the opening of the grey vent on the backside roof of the house in
EffectHouse.gmax. If you do this in the top window, the pivot point will be at
the bottom of the box. Center the pivot over the opening of the vent in the top
viewport.
2. In one of the other viewports, move the box so that the pivot is just above the top
of the vent. The effect will be spawned at that location and will appear to be
emitting from the vent.