for the newbies
Hi,
I have been tinkering with water effects for the last month or so and I can definitely say that in FSX the effects do not always have the same visual appearance as they would have in FS9.
But the purpose of this thread is to answer some of your (basic)questions regarding making smoke, spray, fire etc.
First, we have to make a distinction between scenery effects and aircraft effects.
Aircraft:
Effects that are added to airplanes or boats cane be added to the aircraft.cfg.
In the aircraft.cfg you will find several sections where you can add effects, namely in the
- light section
- effect section or
- smoke section
The effects will be triggered depending on what section you put them in. E.g. a light effect will normally be triggered by pressing L or ctrl L if it is put in the light section.
Scenery:
For a scenery effect to work in a scenery you will have to first make an XML file with the effect file name in it, place it somewhere in your scenery (i.e. giving it some coordinates and altitude), and convert it into a .bgl format file using BGLcomp. All this is explained in the special effects SDK.
Now for the effect itself:
If you want to make some effect yourself, I suggest you use an existing effect that at least slightly resembles the one you are trying to make (You can open the content of an .fx file with wordpad or notepad).
As explained in the Special effects SDK an effect file consists of several parts:
[Library Effect]
[Emitter.x]
[Particle.x]
[ParticleAttributes.x]
where the x denotes whether there is only one emitter, particle and particle attribute (in which case the x is a 0) or more, in which case the following ones are numbered 1,2,3 etc.
It is hardly possible to explain everything in detail so I will use an example to show you the changes that can be made.
We will use a smoke effect for an airplane.
Let us use the following effect file fx_smoke_sml.fx ( I am not sure if it is a default one or not)
Opening it, shows us the following layout :
[Library Effect]
Lifetime=5
Version=2.00
Radius=-1
Priority=0
[Properties]
Cockpit=1
VirtualCockpit=1
Spot=1
Tower=1
Map=1
[Emitter.0]
Lifetime=0.00, 0.00
Delay=0.00, 0.00
Bounce=0.00
Rate=5.00, 10.00
X Emitter Velocity=0.00, 0.00
Y Emitter Velocity=0.00, 0.00
Z Emitter Velocity=0.00, 0.00
Drag=0.00, 0.00
X Particle Velocity=-0.20, 0.20
Y Particle Velocity=0.00, 0.00
Z Particle Velocity=-0.20, 0.20
X Rotation=0.00, 0.00
Y Rotation=0.00, 0.00
Z Rotation=0.00, 0.00
X Offset=0.00, 0.00
Y Offset=0.00, 0.00
Z Offset=0.00, 0.00
Pitch=0.00, 0.00
Bank=0.00, 0.00
Heading=0.00, 0.00
[Particle.0]
Lifetime=1.50, 2.00
Type=19
X Scale=0.50, 0.85
Y Scale=0.50, 0.85
Z Scale=0.00, 0.00
X Scale Rate=0.40, 0.40
Y Scale Rate=0.40, 0.40
Z Scale Rate=0.00, 0.00
Drag=-1.00, -0.50
Color Rate=0.20, 0.80
X Offset=0.00, 0.00
Y Offset=0.00, 0.00
Z Offset=0.00, 0.00
Fade In=0.00, 0.00
Fade Out=0.60, 0.80
Rotation=-20.00, 20.00
Shade=1
Face=1, 1, 1
[ParticleAttributes.0]
Blend Mode=1
Texture=fx_1.bmp
Bounce=0.00
Color Start=44, 44, 44, 80
Color End=97, 97, 97, 150
Jitter Distance=0.03
Jitter Time=0.30
TempK=122.00
TempRate=-1.00
uv1=0.00, 0.50
uv2=0.50, 1.00
X Scale Goal=300.00
Y Scale Goal=300.00
Z Scale Goal=0.00
Extrude Length=0.00
Extrude Pitch Max=0.00
Extrude Heading Max=0.00
[Emitter.1]
Lifetime=0.00, 0.00
Delay=0.00, 0.00
Bounce=0.00
Rate=5.00, 10.00
X Emitter Velocity=0.00, 0.00
Y Emitter Velocity=0.00, 0.00
Z Emitter Velocity=0.00, 0.00
Drag=0.00, 0.00
X Particle Velocity=-0.20, 0.20
Y Particle Velocity=0.00, 0.00
Z Particle Velocity=-0.20, 0.20
X Rotation=0.00, 0.00
Y Rotation=0.00, 0.00
Z Rotation=0.00, 0.00
X Offset=0.00, 0.00
Y Offset=0.00, 0.00
Z Offset=0.00, 0.00
Pitch=0.00, 0.00
Bank=0.00, 0.00
Heading=0.00, 0.00
[Particle.1]
Lifetime=1.50, 2.00
Type=19
X Scale=0.25, 0.60
Y Scale=0.25, 0.60
Z Scale=0.00, 0.00
X Scale Rate=0.40, 0.40
Y Scale Rate=0.40, 0.40
Z Scale Rate=0.00, 0.00
Drag=-0.50, -0.50
Color Rate=0.20, 0.80
X Offset=0.00, 0.00
Y Offset=0.00, 0.00
Z Offset=0.00, 0.00
Fade In=0.00, 0.00
Fade Out=0.60, 0.80
Rotation=-20.00, 20.00
Shade=1
Face=1, 1, 1
[ParticleAttributes.1]
Blend Mode=1
Texture=fx_1.bmp
Bounce=0.00
Color Start=89, 89, 89, 80
Color End=145, 145, 145, 50
Jitter Distance=0.03
Jitter Time=0.30
TempK=122.00
TempRate=-1.00
uv1=0.00, 0.50
uv2=0.50, 1.00
X Scale Goal=300.00
Y Scale Goal=300.00
Z Scale Goal=0.00
Extrude Length=0.00
Extrude Pitch Max=0.00
Extrude Heading Max=0.00
Now let us see what all this means:
[Library Effect]
Lifetime=5
Version=2.00
Radius=-1
Priority=0
The above is explained in the SDK
[Properties]
Cockpit=1
VirtualCockpit=1
Spot=1
Tower=1
Map=1
The above is explained in the SDK
[Emitter.0]
The emitter is the point at which particles are emitted
Lifetime=0.00, 0.00
which in the case of 0.00 means always. Change this to 10.00 and it will be emitted only for 10 seconds. Please note that you have to put two values each time because that gives you to possibility to randomize between the first and second value
Delay=0.00, 0.00
If you want to delay the start of the effect, add the number of seconds you want to have it delayed here
Bounce=0.00
Means the emitter bounces back when it touches another object or terrain. In the case of smoke it does not bounce back.If 1 the emitter (or in the case of a particle) bounces back at the same speed as it touched the ground or object.
Rate=5.00, 10.00
If you want to increase the rate at which smoke is produced, increase the numbers. Smoke 'puffs' would mean lowering this rate
X Emitter Velocity=0.00, 0.00
Y Emitter Velocity=0.00, 0.00
Z Emitter Velocity=0.00, 0.00
Smoke comes from a fire and as the fire does not move the emitter does not move in any direction either. It should therefore be 0. If you would e.g.increase the Y velocity the emitter would be shot up into the sky.
Drag=0.00, 0.00
is set at 0 as the emitter does not experience any drag in the case of smoke. Drag is the influence of wind and gravity on the emitter or particle. (Negative numbers impart gravity drag, positive numbers would mean antigravity)
X Particle Velocity=-0.20, 0.20
Y Particle Velocity=0.00, 0.00
Z Particle Velocity=-0.20, 0.20
This the direction in which the emitter spawns its particles. X is sideways, + is right, - is left. Y is up (+) or down (-), Z is forward (+)or backward (-)
X Rotation=0.00, 0.00
Y Rotation=0.00, 0.00
Z Rotation=0.00, 0.00
You can make the emitter rotate but in the case of smoke that makes no sense. Therefore a 0.00
X Offset=0.00, 0.00
Y Offset=0.00, 0.00
Z Offset=0.00, 0.00
self explanatory, I think (in the case of smoke coming from a fire in a scenery, you will have given it the right place, so there will be no need for an offset)
Pitch=0.00, 0.00
Bank=0.00, 0.00
Heading=0.00, 0.00
Are explained in the SDK and are of no importance in the case of smoke
[Particle.0]
Now here it becomes interesting!
Lifetime=1.50, 2.00
This is the lifetime of your (smoke) particle. Make the lifetime longer and you will have the smoke particles go up or down longer before they disappear. If you want your smoke column longer, increase the lifetime of your particles
Type=19
Explained in the SDK (but not really). Do not change it.
X Scale=0.50, 0.85
Y Scale=0.50, 0.85
Z Scale=0.00, 0.00
A smoke particle should have 3 dimensions but as you can further determine how it is viewed under face=...(see further down below) you only need a 2-dimensional particle.
Smoke consists of only very small particles, if it were water spray, you would increase the size(scale)
X Scale Rate=0.40, 0.40
Y Scale Rate=0.40, 0.40
Z Scale Rate=0.00, 0.00
The scale rate determines how fast a (smoke) particle grows from a 0 volume to the point where it dissipates (either because its lifetime is finished or because it has become completely transparent). An interesting facet of the scale rate is that it can be negative,meaning that its original size (defined in its scale)dimishes to become zero at a rate defined by the numbers you put in. Playing with these numbers can make the effect spread out (numbers are positive) or shrink (negative numbers)
Drag=-1.00, -0.50
If negative the drag from gravity and wind increases and viceversa. In the case of smoke it is negative as smoke drifts with the wind. It interacts with the temperature of the particle
Color Rate=0.20, 0.80
the point in the lifetime of the particle at which it starts changing its color from the color at color start to the color at color end (see particle attributes for more explanation)
X Offset=0.00, 0.00
Y Offset=0.00, 0.00
Z Offset=0.00, 0.00
Is not interesting in the case of smoke but if the point at which the effect emitter is generated is fixed (like in the case of a ship's wake) it can be of importance
Fade In=0.00, 0.00
Fade Out=0.60, 0.80
Self explanatory, I guess, as it defines the percentage of the lifetime of a particle at which it starts fading in or out
Rotation=-20.00, 20.00
The speed at which the particle itself rotates and if rotating left or right
Shade=1
Meaning it is darkened at night when 1 and visible at night when 0.
Face=1, 1, 1
I am not able to explain this well. Depending on a value of 0 or 1 the direction the particle is facing is forced or not. see note at the end.
[ParticleAttributes.0]
This is where texture comes in. Every particle needs to have texture. The texture can be found in a subfolder of the effects file.
Blend Mode=1
I think that is explained well in the SDK
Texture=fx_1.bmp
This is the texture file that is used for this effect.
Bounce=0.00
See emitter
Color Start=44, 44, 44, 80
Color End=97, 97, 97, 150
The figures correspond to the RGB values of colors, the last figure being the transparency level (alpha). Use e.g. the DTX.BMP program to open the file then export the image to a graphical editor like Photoshop, Paintshop,Paintnet or other to see what the colors represent. The SDK also explains the kind of texture formats that can be used
Jitter Distance=0.03
Jitter Time=0.30
Explained in the SDK
TempK=122.00
a neutral value is 107. If higher, the particle rises, if lower, the particle falls due to gravity. In the case of smoke, it is logical for it to be 107+ as smoke rises.
TempRate=-1.00
The rate at which the particle heats (+) or cools (-). If positive the smoke would rise faster the higher it goes
uv1=0.00, 0.50
uv2=0.50, 1.00
SDK explains it well.
X Scale Goal=300.00
Y Scale Goal=300.00
Z Scale Goal=0.00
If using the scaling rate of the particle, the scale goal limits the increase of the value to the number mentioned in here.
Extrude Length=0.00
Extrude Pitch Max=0.00
Extrude Heading Max=0.00
In case of extrusions, meaning an emitter that extrudes particles at a velocity and at a rate as defined earlier on, these parameters define its maximum length, its pitch and its heading.
The above is by no means exhaustive and just gives you an inkling of the many possibilities available in producing effects. It is a poor attempt at best to add some more comments on the explanations provided in the Special Effects SDK.
Probably the reason for there not being many more detailed explanations on its workings is that it is so hard to explain whitout trying yourself.
Hopefully someone will fill out the blanks, add more info or explain further.
Roby
Note: Misho explains better what "face" means:
Quote:
"Face=" parameter sets how the "sprite" will face the viewer. Effects are, of course, 2-D "sprites" that exist in a 3-D world. You can set how they will orient themselves when viewed in the sim by adjusting the 3 parameters. Each parameter is basically an axis constraint that will limit the sprite's orientation in pitch, bank and heading axis. Let's look at some cases:
Effect: A stop sign on the intersection of the road. If you use Face=0,0,0, the stop sign will always stay upright, and in the same place. If viewed from the side or straight from the top, it will be very very thin Setting Face=0,0,1 will "free" the heading axis, and the stop sign will ALWAYS point towards the observer. It will however still look very very thin from directly above.
Effect: A leafy tree. We could construct an effect representing a tree, with one sprite for a tree trunk with Face=0,0,1 setting, and another sprite for the leaves and branches "ball". That sprite should have a Face=1,1,1 setting - effectively facing the viewer in any direction. Viewed from any angle AROUND it, tree trunk would always face the viewer (and being cylindrical, that's what we want) and when viewed from above, its "thin" nature would be masked by the leafy ball sitting on top of it (and always facing the viewer and looking as if it has volume from any angle). You could add a few more "ball" parts of various sizes (almost like molecule chain) to build up a more complex looking tree. Actually, I always wondered why are default autogen trees in FSX/FS9 those horrible "X" things instead of this volumetric approach.
Face=1,1,1 works best with generally "Globular" sprites, in fact, most of the dust effects are made this way... You can combine Face=1,1,1 sprites to create volume effects of various sizes and dynamics.
A special case that overrides Face command is "Ground Normal" parameter. It basically sets the effect lying flat on the ground (which would probably be acomplished by setting Face=0,0,0 and rotating the sprite to lay flat and move it close to the ground).
Unquote