FX effects in FS 2002
Previously published on Netwings, formerly CFS2 Online


FX effects, as programmable particle systems, were introduced in CFS2. FX effects are used to model things like smoke, explosions, splashes and so on. Technically speaking, an FX effect is defined by a source file that contains the rules for the generation and the behaviour of the particles. The particles are rendered on the screen using bitmaps.

The source files are standard text files (with the .fx extension). The bitmaps use the standard texture formats used by FS and CFS. In practice, by writing .fx files and painting bitmaps, players are able to modify the existing effects or to create new ones, improving the game by themselves. For FS and CFS, a big part of the game is to enjoy the mods made by other people, exchanging files and findings through the Internet. Open FX effects are another way for enjoy this side of the game.

FS2k2 adds some improvements to the CFS2 implementation of FX effects. In some way, we can see at them as a preview of what we can expect in CFS3.


New FX effects

New visual features of FS2k2 that involve FX effects are:

  • tire smoke at touch-down;
  • condensation trails at altitude;
  • dust from wheels when taxiing;
  • splashes and waves for floating planes;
  • hovering wind for helicopters.

All of them are "conditional" effects, i.e. FX effects that start only when a defined condition is true: at touchdown, when altitude is greater than a defined value, and so on. See the pictures below to have a better idea of the effects.

     

As in CFS2, the conditions are not defined in the .fx file: they are hardcoded somewhere in the simulator engine. So it seems difficult - but never say never - to add completely new conditional effects. Anyway, we can modify the already provided effects. The good thing is that MS added several effects that were wished by many people, as for instance the condensation trails.

Another relevant improvement with respect to CFS2 is that effects are now specified in the aircraft.cfg file in the aircraft directory. It is now possible to have different effects for different aircrafts. Changing the effects for an aircraft is easy. In the aircraft.cfg there is a section where the FX effects are attached to predefined conditions:

[EFFECTS]
water=fx_spray                // splashes when aircraft ditches      
concrete=fx_N_sparks          // sparks for belly landings on concrete
dirt=fx_N_tchdrt              // dust when taxiing on land
touchdown=fx_N_tchdwn_s, 1    // tire smoke at touch-down

This is an excerpt from the aircraft.cfg of my modified Corsair. The Corsair, while not documented, is bundled in FS2k2 (at least in the Pro edition I have), but the effects are not defined in the aircraft.cfg: you have to open the file (e.g. with Notepad) and add the above section.

The *_N_* in the .fx file name identifies my own version of the effects: more sparks, more dust, a little bit more tire smoke. In the pictures above, when you see the Corsair, it uses my versions of the effects. The new .fx files are downloadable here.


Other uses of FX effects

FS2k2 uses effects extensively. Another interesting new section of the aircraft.cfg regards the aircraft lights:

[LIGHTS]
//Types: 1=beacon, 2=strobe, 3=navigation, 4=cockpit, 5=landing                   
light.0 = 3, -150.30, -102.56,   3.22, fx_navredh ,
light.1 = 3, -150.30,  102.56,   3.22, fx_navgreh ,
light.2 = 3, -223.85,    0.00,   8.85, fx_navwhih ,
light.3 = 2, -150.30, -102.56,   3.22, fx_strobeh ,
light.4 = 2, -150.30,  102.56,   3.22, fx_strobeh ,
light.5 = 2, -228.97,    0.00,  44.62, fx_strobeh ,
light.6 = 1,  -45.05,    0.00,  14.65, fx_beaconh ,
light.7 = 1,  -80.22,    0.00, -12.05, fx_beaconb ,
light.8 = 4,  -16.24,    0.00,   9.19, fx_vclighth,

This is an excerpt from the Boeing 747 aircraft.cfg. As you can note, the aircraft lights are made through effects. I'm thinking to add some Christmas lights to my aircraft, or to use this section to have toggle-able smoke trails for airshows ...

Another use of effects in FS2k2 is for sceneries. Animations are implemented by effects: waves near the coastline, waterfalls and fireworks are some examples (see the pictures below ... mmh ... the idea of fireworks is not new to me).

 

I don't yet know the technical details, but it seems possible now to call effects directly from the .bgl file that define the object. In CFS2 it is possible to attach an effect to an object adding an [EXTRA] section in the object damage profile, but in FS2k2 there are no .dp's. As examples of objects with effects, looking into the FS2k2 directories, I discovered the files fx_KilaueaEruption.bgl and fx_OldFaithful.bgl.

Moreover FS2k2 effects, when attached to senery objects, can be time dependent. The Kilauea crater (south of the Big Island of Hawaii, 19.425N, 155.292W) normally emits only vapour. I had a look in the .fx files related to kil-something and in one of them there are lot of particles that don't seem only vapour. Then I searched for the date of the Kilauea eruption, I went back in January 3, 1983 and ... wow what a show!

 


Never satisfied

There is - obviously - something that is not very good.

I consider the conditional effects not yet completely well implemented because there is no control on the conditions. Take for example the condensation trails. It seems that is a completely hardcoded effect. I discovered that the effect starts exactly at 30000 feet. Then I set the autopilot to 30000 feet, the aircraft gently waves around 30000 feet and - lol - the effects starts and stops, starts and stops, ... see the picture below. I preferred a condition based on temperature (FS2k2 has temperature layers as a weather condition customizable by the player). Moreover I wasn't able to find how to change the altitude parameter, for instance to set it to an odd value, at least difficult to guess.

Effects do not depends by seasons: for instance ditching on snow produces dust (may be this is the reason because MS put so little dust in their stock effect). We can work around of this by defining a custom effect and attaching to the aircrafts we plan to use in winter. In the pictures below there is an example (the Beaver is by Fred Banting, repainted by Fred Choate).

 

Some effects provide poor visual results. For instance, as you can see in one of the above pictures, the Niagara Falls effect doesn't match the terrain mesh (at least on my system). May be this kind of bugs are deliberatly left into the game to give us the satisfation of fixing MS bugs.

Last, there are no documentation and no tools. I'm playing with effects for about one year and I was not able to find any MS official documentation about the .fx file format. Moreover, looking into the .dll's I found traces of some "Effect Tool". If you have a look into the binary code of visualfx.dll you can find strings that seems menu entries or error messages, like "Delete Particle", or "Error saving fx file". I suppose that the .dll used for running effects in the simulator engine is the same used for running the effects in some testing/development environment. Why don't they distribute such tool?


Conclusions

Good:

  • many new effects for aircrafts;
  • use of effects for lights;
  • effect configuration in the aircraft.cfg;
  • effects for scenary objects;
  • time dependent effects.

Bad:

  • no control on conditions;
  • few bugs and omissions;
  • no documentation and no tools.

With respect to CFS2 there are some important improvements, we can hope that CFS3 will continue in this trend.


Further reading

The first reference is to the classic file by Jason Waskey, even if it doesn't cover some of the features introduced in FS2k2, still is the best technical source of information about FX effects. The file is available at Netwings.

Another good source of information is the Fligthsim Veteran Club. There are lot of tips and tricks about FS2k2, some of them, under sections "Visuals" and "Lighting", regard FX effects.


Ciao,
Giovanni "Nanni" A. Cignoni
gcignoni@tiscalinet.it
http://web.tiscalinet.it/Nanni/CFS
http://web.tiscalinet.it/Nanni/FS