Magical Box  1.15
Modular Particle Engine for Unity3D
Parameters reference

The following parameters ship with Magical Box:

General

You'll notice that most parameters share a basic set of properties:

Base values are the initial values used at particles birth. Usually, if you use Static/Birth Animation the Base value will be ignored and a curve will be used instead.

Random % defines a random deviation from the base value. The resulting value v=Base+-Random*Base, so if you set Base=4 and Random%=0.5 the result will be in the range of 2..6.

Use Clear on a curve to reset the curve to some reasonable values. Most of the time this is a linear curve on the base value.

Color parameters

Fixed

Defines a fix or birth animated particle color.

pcolorfixed.jpg
  • Base - sets particle's initial color
  • Mode - sets the birth animation mode
    • Fixed - fixed color (no birth animation)
    • GradientKeyRandom - sets initial color to a random key color
    • GradientRandom - sets initial color to a random gradient color
    • Timeline - animate initial color over emitter's duration by using the gradient
    • TimelineKeys - animate initial color over emitter's duration by using the gradient keys only
  • Lifetime animation
    • Die On Alpha - kill particle when alpha is below 0 ?
    • AutoFade - fade automatically in to the first key's alpha or out from the last key's alpha?

Timeline

Animates particle color over lifetime using a timeline gradient.

pcolortimeline.jpg
  • Lifetime animation
    • Die On Alpha - kill particle when alpha is below 0 ?
    • AutoFade - fade automatically in to the first key's alpha or out from the last key's alpha?
    • Gradient - particles color will be changed based on this gradient over their lifetime

Image Animation

Animates particle texture after you've assigned multiple textures to an emitter in the emitter's texture section.

pimageanim.jpg
  • Start Frame - the starting frame
  • Advance Mode - whether the birth animation is based on timing (FPS) or number of launched particles
  • Birth animation
    • Animation Mode - determines how the starting frame animates
      • Absolute - animate using frames/second or particles beginning with start frame
      • Relative - animate using loop cycles/emitter cycle beginning with start frame
      • Random - animate using frames/second or particles beginning with a random frame
    • FPS/Cycles - animation speed in frames/second or cycles (depending on animation mode)
    • Repeat Mode - determines how the animation continues playing. This isn't available in Random animation mode.
      • Once - play once, then stop
      • Loop - repeat in a loop
      • PingPong - play and reverse in a loop
  • Lifetime animation
    • Animation Mode - determines how living particles animate.
      • Absolute - animate using frames/second
      • Relative - animate using loop cycles/lifetime
      • Random - animate using frames/second and random textures
    • FPS/Cycles - animation speed in frames/second or cycles (depending on animation mode)
    • Repeat Mode - determines how the animation continues playing. This isn't available in Random animation mode.
      • Once - play once, then stop
      • Loop - repeat in a loop
      • PingPong - play and reverse in a loop

Lifetime

Determines particle's lifetime

plifetime.jpg
  • Base - initial lifetime in seconds
  • Random % - random deviation from Base
  • Birth animation
    • Lifetime/Birth - lifetime in relation to emitter's age
Note:
If you omit this parameter emitter duration will be used to determine particle's lifetime

Orientation

Orientation rotates a particle's image without affecting heading

porientation.jpg
  • Offset - sets an offset in degrees for all other operations
  • Base - base orientation in degrees
  • Random Arc - add/subtracts a random arc
  • Lifetime animation
    • Mode - determines how orientation animates
      • Turn - steady rotate the particle using the below parameters
        • ByVelocity - particle's orientation will match its velocity vector
        • ByHeading - particle's orientation will match its heading vector
    • Speed - angular velocity in degrees/second. Only available in "Turn" mode
    • Random % - random speed deviation. Only available in "Turn" mode
    • Random Dir - random direction. Only available in "Turn" mode

Rotation

Unlike Orientation this rotates the particle's position around the emitter

protation.jpg
  • Base - Base rotation
  • Random % - Random deviation

Size/Size3

psize.jpg
  • Constrain axis - whether particles are quadric or rectangular
  • Die on Size - check to let particles die on an alpha below 0
  • Base - Base size
  • Random % - random deviation from Base
  • Birth animation
    • Size/Birth - size in relation to emitter's age
  • Lifetime animation
    • Relative - determines how animation curve's values will be applied
    • Growth/Life - scaling over lifetime. Only available if Relative is checked
    • Size/Life - size over lifetime. Only available if Relative is not checked
Note:
Size3 is a 3D variant of Size. Use it if you need 3D sizes, e.g. when working with the Transform connector

Velocity

pvelocity.jpg
  • Base - base velocity
  • Random % - random deviation from Base
  • Birth animation
    • Velocity/Birth - initial velocity in relation to emitter's age
  • Lifetime animation
    • Relative - determines how animation curve's values will be applied
    • Increase/Life - Velocity change over lifetime. Only available if Relative is checked
    • Velocity/Life - velocity over lifetime. Only available if Relative is not checked
Note:
Increase/Life isn't the same as acceleration. Unlike Acceleration the Velocity parameter ignores mass
If you use Heading lifetime animation, enable lifetime animation to continous apply velocity. If you don't, the particle's won't move in the new direction.

Physics parameters

Acceleration

The acceleration parameter adds force in the direction of heading to a particle.

pacceleration.jpg
  • Base - base acceleration
  • Random % - random deviation from Base
  • Birth animation
    • Accel/Birth - acceleration in relation to emitter's age
  • Lifetime animation
    • Accel/Life - acceleration over lifetime

Collider

This parameter acts like a world collider.

pcollider.jpg
  • Bounce - determines the bounciness of particles on collision
  • OnParticleCollides - determines event target object
    • Method - determines event target method

Friction

The friction parameter is used to dampen a particle's velocity.

pfriction.jpg
  • Base - base friction
  • Random % - random deviation from Base
  • Birth animation
    • Friction/Birth - friction in relation to emitter's age
  • Lifetime animation
    • Friction/Life - friction over lifetime

Gravity

Gravity is used to apply a linear and constant force to particles.

pgravity.jpg
  • Direction - the gravity vector
See also:
Mass

Heading

The heading parameter alters a particle's heading over lifetime. Heading is a normalized vector and used by Velocity, Acceleration and Orientation

pheading.jpg
  • Lifetime animation
    • Relative - determines how animation curve's values will be applied
    • X,Y,Z/Life - heading change or absolute values in degrees over lifetime

Mass

The mass parameter influences how strong a particle reacts to Gravity and Zone parameters

pmass.jpg
  • Base - base mass
  • Random % - random deviation from Base
  • Birth animation
    • Mass/Birth - mass in relation to emitter's age
  • Lifetime animation
    • Mass/Life - mass over lifetime

Zone parameters

Zone parameters are used to interact with particles within a certain range. In addition they can be used as trigger zones by using the MBParticleZoneBase.ParticleInsideZone event. Unlike most parameters the zone's transform is used to position the zone.

Note:
Keep in mind that all zone parameters can't deal with scaled emitters (i.e. the native Transform's scale), as they work in ParticleSystem space

Radial

pradialzone.jpg
  • Lifetime animation
    • OnParticleInside - determines event target object
    • Method - determines event target method
    • World Space - determines whether the zone's position is relative to the emitter or in world space
    • Position - this reflects Transform's position
    • Mode - determines the way particles are handled when intersecting the zone:
      • Attract - particles will attract or repel
      • Reflect - particles will be reflected
      • Freeze - particles will stop moving
      • Kill - particles will die
    • Attraction - attraction/repell force
    • Radius - radius of influence or 0 for an infinite zone
    • Hollow - inner radius (think donuts)
    • Falloff - Increase attraction near center, 0=linear

Rect

prectzone.jpg
  • Lifetime animation
    • OnParticleInside - determines event target object
    • Method - determines event target method
    • World Space - determines whether the zone's position is relative to the emitter or in world space
    • Position - this reflects Transform's position
    • Mode - determines the way particles are handled when intersecting the zone:
      • Attract - particles will attract or repel
      • Reflect - particles will be reflected. This is a basic implementation right now!
      • Freeze - particles will stop moving. This is a basic implementation right now!
      • Kill - particles will die
    • Attraction - attraction/repell force
    • Scale - determines zone size

Transform

This parameter duplicates a given transform for each spawned particle and synchronizes properties

ptransform.jpg
  • Source - the source transform to clone
  • Sync Position - Whether particle's position should be synchronized with it's transform counterpart
  • Sync Size - Whether particle's size should be synchronized with it's transform counterpart.
  • Sync Rotation - How transform's rotation should be set:
    • None - Not at all
    • ByVelocity - Rotation is set by particle's velocity
    • ByHeading - Rotation is set by particle's heading
Note:
When synchronizing size you should use the Size3 parameter to get a 3D size

Special parameters

Special parameters are designed to serve a special purpose and usually can't be used in a generic way.

Lightning parameter

This parameter uses Perlin noise to animate all existing particles along a set of lines. If you provide the right texture this looks like an animated lightning bolt.

Note:
This parameter only works with line based emitter types: Line, Polygon, Edge
plightning.jpg
  • Lifetime animation
    • Speed - the animation speed
    • Amplitude - the distortion amount

Math Operator

This parameter can be used to apply math operations to certain particle properties to archive some interesting results like jiggle, wave movement and so on...

pmathop.jpg
  • Lifetime animation
    • Delay - time in seconds until the operation will be applied next
    • Random % - random deviation from delay
    • Synchronize - whether global or individual particle timing will be used
    • Target - the target property
    • Operator - the used operator: Add, Multiply, SinWave
    • Value - the value to apply
    • Random % - random deviation from value
    • Random Sign - whether value's sign will be random or not
    • Use DeltaTime - whether DeltaTime will be applied to the value
    • Speed - SineWave speed. Only available when using the SineWave operator
 All Classes Files Functions Variables Enumerations Properties Events