Aurora Emitter

From NWN1 Custom Content Guide

Jump to: navigation, search

Contents

[edit] Aurora Emitter (helper object)

Emitters are the basis for a large number of the visual effects found in the game. Wether it be the fire dripping from your magical sword, the water mists from a water elemental to the pyrotechnics of the most powerful magics. You will find emitters at their base.

Particle emitters in NWN emit one of two basic things, a flat two polygon object with a texture mapped to it, or a 'chunk' in the form of a small model or mdl.

The particles can be emitted from the emitter at an angle or from the emitter to a target object along a path in the case of p2p or Point To Point emitter.

Lightning is merely a specialized p2p emitter that's set up to spew lightning as its used often enough that it's convenient to have a unique set of controls for it.

Because of billboarding the flat particles can appear to be solid rather than flat depending on the various settings or they can be made to stay flat as the camera rolls around. Billboarding is a term that means the engine will constantly move the particle so that it always faces the camera regardless of how the camera is moved, also known as camera alignment in some programs.

The textures that can be mapped to a particle can be animated as well, this is what creates the nifty fire effect. Each particle has a texture sequence that's applied to it that's one frame of a fire animation.

So get to know your emitter, you'll be the better off for it.

Image:Nwmax doc obj emitter.png

[edit] Emitter Style

Update The way the emitter generates particles.
  • Fountain: The particles are emitted in a fountain based on the spread value. Anything from a single line to a spherical shape can be accomplished
  • Single: Emits one particle. As an example using this and a griddedtexture you could easily display a magic mouth talking. Another setting Loop Single causes this to emit more than once otherwise it emits one time
  • Explosion: The emitter doesn't emit anything until a detonate event is signaled on a keyframe in an animation that includes it. Then it fires off one burst based on its settings. You create events using the Aurora Base. Note that ALL explosion emitters in a single model will react to the detonate event and go off simultaneously.
  • Lightning: Generates Point 2 Point lighting effects. Lightning emitters require a target object to work. The target object is a Aurora Reference which is the child of the p2p emitter.
Render how the particles are rendered once generated.
  • Normal: Particles are generated that constantly rotates to face the camera
  • Linked: Same as above except all particles touch and are stretched where necessary to do so. Example use the ring texture and you can generate an almost chain appearance.
  • Billboard to Local Z: Particles face the way they came out regardless of camera movement. Note this will cause them to vanish from the opposite side as particles are one sided. Good idea to turn on twosided for this method.
  • Billboard to World Z: Particles face upwards
  • Aligned to World Z: ?
  • Aligned to Particle: The particles are aligned to the angle at which they leave the emitter. This has a subsetting of deadspace.
  • Motion Blur: Stretches the particles along the path of travel severely and then overlaps them as well
Blend The 3 blend modes for texture type emitters.
  • Normal: use as simple texture mapped object (including texture alpha channel (if any))
  • Punch-Through
  • Lighten: use lighten mode, so any pixel that is lighter than the background gets displayed - that way you can use textures without an alpha channel, as black will always be see-through
Spawn Type determines the type of emitter
  • Normal - Emits Particles based on Birthrate per second
  • Trail - Birthrate sets # of particles per meter, leaves a trail when moving

[edit] Emitter Parameters

Icon Size Height of the conerepresenting the emitter. Not used at the moment.
X-Size

Y-Size
The X and Y dimensions in cm of the emitter. From this you can see that an

emitter is in fact a square surface from which the particles are emitted. A size of a 0,0 is a single point. A particle is emitted randomly within the boundaries of the x/y values (in cm). So a X and Y value of 100 each would emit in the boundaries of +/- 50 cm of the emitters position.


Since NWmax 0.8 the emitter also creates a shape that shows the actual emitter area.
Note that while the value can be set very high, the NWN engine seems to cap emitter sizes at 500cm x 500cm .

Inherit Properties These determine where the particle gets it's velocity from, other than it's set velocity. Leaving these values blank means there is no inheritance. No inheriatnce means that the particles created have no tie to the local xyz of the emitter object
  • Inherit: The particals inherit the emitters Z axis and will stick to it like glue, particals in this option will stick to the emitters Z axis (direction its fireing the particals in) as well as it's world XYZ, This is used on the weapon effects in NWN like the fire swords. imagine them like a heap of small balls stuck to wires radiating from a larger ball in the middle, if the middle ball is rotated or moved around they all follow it, but in this instance the smaller balls are also following and traveling along the direction of their wires. The player effect in the cone of cold spell uses this, a sphere of snow particals swirling around the player.
  • Local: Visually its the same as inherit from emitter, but instead of particles sticking to the emitter, they stick to where they spawn from. So if you have a moving emitter, the particles will stay where they spawned, regardless of whether the emitter is.
  • Velocity: The particles inherit velocity from the motion of the emitter object
  • Part(icle): If this is on and Inherit velocity is ALSO on the particle will stretch depending on the speed its going at. With it checked on its own its as you mentioned, just the same as the others
Render Order A priority to help the Auoroa Engine determine the order in which to render different emitters in the scene. The lower the number, the higher priority particles emitted from that emitter have in the scene. So if you had emitter1 set to 0 render order, and emitter2 set to 1 render order, emitter1 particles will appear over the emitter2 particles.
Threshold From Alex Scott at Bioware - the distance away from the gravity point that the particle will be killed off. A value of 0 will let the particles pass through the gravity center and loop back in an orbital pattern. This is for the Point to Point particle type, (Gravity Field) -> the other components are Drag and Grav Pull.
Combine time From Alex Scott at Bioware - Combine time = Transition Factor. Point to Point emitters that are labeled Bezier Path have 3 settings, Transition factor, SRC tangent and Trg Tangent. Transition Factor - how long it takes the particles to flow from one point to the other along

the path.

Deadspace From Alex Scott at Bioware- View Direction Dead Space - If "aligned" particles travel directly at the camera they are invisible and wasted. Specifying a dead space in degrees ether side of the camera allows for more particles to be spawned in visible directions. A value of 12 is best.

[edit] Emitter Particles

Start color
End color
Starting and ending colour of the emitter particles. This is the final colour as the particles life span finishes
Alpha start
Alpha end
Starting and ending alpha value
Size X/Y start
Size X/Y end
Starting and ending height - If you leave the Y-values at 0.0 they will use the same value as the X axis.
Birthrate The rate of particle birth per second
Life Exp The life of each particle in seconds
Mass Effectively the weight of the particles - positive values make the particle fall down, negative values make it float up
Spread The degree of spread they can leave the emitter by, from 0 to 360 degrees. Where anything over 180 is going backwards from the direction the emitter is facing
Particle Rot the amount of rotation the particle has expressed in rotations per second
Velocity initial speed of the particle in meters per second
Random Vel An amount from 0 to x that will be added to the base Velocity
Bounce Coefficient the degree of bounce a partical will have when it hits a static walkmesh and the Bounce flag is set
Blur Length How much a motion blur particles stretches.
Loop This causes single update emitters to loop.
Bounce The particle bounces against and static walkmesh
Tinted Will tint the particles to the ambient colour of the scene
Splat On collision the particle is placed flat (face up) on the contacting surface
Affected by Wind does wind effect the particles

[edit] Emitter Texture/Chunk

Texture the texture that this emitter uses
Two-sided If the particle is visible from both sides
Grid width number of images across the texture
Grid height number of images down the texture
Speed the number of images to show per second
First Frame 0 based index
Last Frame 0 based index. A 4x4 texture has 16 images indexed 0 to 15
Random Playback Random starting point for playback
Chunk the model name to use for a chunk. Overrides the texture settings if this field is filled in.

The ones commonly used for emitters are:
plc_chunk_m01 - metal
plc_chunk_s01 - stone
plc_chunk_s02 - stone
plc_chunk_w01 - wood
plc_chunk_w02 - wood

[edit] Emitter Advanced

Delay Lightning Parameter, how fast the emitter is updated
Peak Radius Lighning Parameter, the radius in which the Lightning 'impacts'
Subdivisions Lighning Parameter, the number of subdivisions along the line from emitter to the reference object
Scale Lighning Parameter, the maximum range a subdivision can fluctuate on the lightning
Radius This setting allows a burst of wind to be emitted. This is how big of a radius the wind effects. This causes dangly objects to move, as well as emitter particles that are affected by wind.
Length This specifies how long the wind stays in effect.
Opacity From Alex Scott at Bioware - Opacity scale - How transparent is the blurred section. 0 to 1. (1 being fully visible) Relates to Motion Blurred render style. Opacity and Length scale, both go form 0 - 1.
Use P2P Sets it up as a p2p emitter. These require a reference node that must be a child of the emitter. If not, it will crash the game. p2p emitters cannot be used on tiles or placeables. God I hope this gets fixed.
Bezier/Gravity Bezier emitters use the SRC and TRG properties, while Gravity emitters use the Gravity and Drag properties.
SRC (Source) Tangent The arc length for the first half of a p2p emitter.
TRG (Target) Tangent The arc length for the second half of a p2p emitter.
Gravity Property of certain p2p emitters that allows the particles to be pulled towards the reference node as if there was a gravitational pull. The higher the value, the faster they are pulled.
Drag On p2p gravity emitters, it causes particles to shoot past the reference node then double back towards it. The higher the value, the farther the particles shoot past the reference node.

You can animate some of these properties so that they change during the course of the animation playing (e.g., birthrate). All the value spinners including the color values in the particle menu roll down can be animated. However, the Loop, Tinted, Bounce and Wind check boxs cannot be animated. You will have to play around with others because there may be more which can be adjusted through animation.

[edit] CPU overhead

From Danmar:

An emitter emits two polygon squares which have textures mapped to them. An emitter with 100 birthrate emits 200 polygons. There is also the fact of longevity. I've not done any real tests to see if birthrate = that many particles existing at one point in time regardless of longevity or if that many particles are generated every X.X seconds and the longer the longevity period the more particles that exist at any one time.

But I digress, at bare minimum an emitter creates 2xbirthrate in polygons.

In addition to the face count they add, emitters also require computation to generate and control from birth to death.

Also the size of the particles can make a big difference. Look at the 'fog/mist' placeables that people have created which use really big particles. These cause intense lag with just a few particles comparitively. Yet I can create a spell effect that has several 100 and 200 birthrate emitters that are small without any lag.

So its a complex question. Size, number, longevity all have to be factored in.

[edit] Random IRC Quotes

<Soopaman> and a birthrate of 300 *looks like* might be too much
<Trelantris> what height are you using?
<Soopaman> 9 meters
<Trelantris> it is, for the explosion
<Soopaman> thats the birthrate?
<Trelantris> 300
<Trelantris> one explosion
<Soopaman> holy crap I feel like a loser
<Soopaman> I knew the birthrate from looking at it... wow
<Trelantris> hehe
<Trelantris> you got really close last time you looked at one too
<Soopaman> man this is scaring me


<Palin> so I can see my crappy little spell effect?
<Soopaman> if the effect works, you should see particles on his head
<Palin> and go oh wow, I suck @$$
<Soopaman> but I doubt you will see it
<Soopaman> because you probly didnt put a texture in the texture field ;)
<Palin> check out that awesomeness
<Palin> you are right because you made me do all that knowing there was not a texture =p
<Palin> at least I didn't crash anything.
<Soopaman> =)


NWmax Documentation

Personal tools