ALS technical notes: Difference between revisions

Jump to navigation Jump to search
Line 122: Line 122:


== Exhaust flame effect ==
== Exhaust flame effect ==
Rendering proper flames of e.g. afterburners or rocket thrusters with diffuse edges is notoriously difficult - all solutions based on textured models tend to have unnaturally sharp edges. Usually the particle system is used in such cases, however at high velocities this has other issues - particles become easily separated, making flames look disrupted and detached from the exhaust.
ALS includes dedicated procedural effect in which the flame is rendered by numerically integrating a 3-dim distribution of glowing emitters inside a bounding box (i.e. re-creates the process by which a real flame would be seen). The function which determines the emitter distribution is partially user-controlled so that a wide range of shapes can be generated.
To use the effect, first the bounding box has to be defined. Note that the shape and alignment of the bounding box needs to be standardized for the effect to work, i.e. you need to use either the default bounding box under Aircraft/Generic/Effects/Thruster/ or make a custom one which fits inside the default box at the same location in model coordinates.
To change position, size and orientation of the bounding box to match with the airplane model, translate, scale and rotate animations or model offsets can later be used.
<source>
<?xml version="1.0"?>
<PropertyList>
<path>Aircraft/Generic/Effects/Thruster/thrust_flame.ac</path>
<nopreview/>
<animation>
  <type>scale</type>
  <x-offset>8.0</x-offset>
  <y-offset>4.0</y-offset>
<z-offset>4.0</z-offset>
</animation>
<effect>
<inherits-from>Aircraft/MyAircraft/Models/Effects/my-flame</inherits-from>
<object-name>Bounding_box</object-name>
</effect>
</PropertyList>
</source>
Then, a derived effect (my-flame.eff in the above example) has to be created. Here the parameters for the flame are specified.


[[File:Shuttle flame05.jpg|400px|Space Shuttle main engine flames during early ascent]]
[[File:Shuttle flame05.jpg|400px|Space Shuttle main engine flames during early ascent]]
1,360

edits

Navigation menu