ActiveParticleFire
Harigane- Particle
MMM Compatible
Last updated: 20/05/2014
ActiveParticleFire generates a lasting flame when moved.

Click the image above to see it in full
Download
Tutorial
1. Go to 'accessory manipulation' and click 'load'.
2. Select 'ActiveParticleFire.x' and click 'OK'.
Accessory Parameter Values
-X, Y, and Z: Adjusts the position of the effect.
-Si: Adjusts the amount of particles generated.
-Tr: Adjusts the opacity of the particles.
Editing the Code Parameters
-Line 10: #define UNIT_COUNT: Determines the maximum number of particles, by multiples of 1024, that can be generated at once. Setting this value to 1 sets the maximum number of particles to 1024, or (1 x 1024); whereas setting it to 4 sets the maximum to 4096, or (4 x 1024).
-Line 12: float ParticleSize: Determines the size of the particles.
-Line 13: float ParticleSpeedMax: Determines the maximum initial speed of the particles generated.
-Line 14: float ParticleSpeedMin: Determines the minimum initial speed of the particles generated.
-Line 15: float ParticleInitPos: Determines the initial position where particles spawn, relative to the accessory x file.
-Line 16: float ParticleLife: Determines the duration of the particles generated, represented in seconds.
-Line 17: float ParticleDecrement: Determines when the particles begin to disappear, represented as a ratio to ParticleLife. A smaller value means the particles will disappear sooner.
-Line 18: float OccurFactor: Determines the number of particles generated relative to the movement. A greater number means more particles are generated.
-Line 19: float ObjVelocityRate: Determines the particle velocity relative to the accessory x file's movement speed.
-Line 21: #define FireColorTexFile: Determines which image file to use when generating the color of the flames.
-Line 24: float fireDisFactor: Determines the maximum distance the flame can flare out to. A larger number means the flame will not flare out as far.
-Line 25: float fireSizeFactor: Determines the maximum size the flame can flare out to. A larger number means the flame will flare to a larger size.
-Line 26: float fireShakeFactor: Determines the speed at which the flame flares. A larger number means the flame will flicker more frequently.
-Line 28: float fireRiseFactor: Determines the maximum height the flame can reach.
-Line 29: float fireWvAmpFactor: Determines the range intensity of the flame's sideways fluctuations.
-Line 30: float fireWvFreqFactor: Determines the frequency of the flame's sideways fluctuations.
-Line 32: int FrameCount: Determines the frequency at which the flame texture is updated. Setting this value to 1 updates it every 60 frames; 2 updates it every 30 frames, and so forth.
-Line 34: float3 GravFactor: Determines the intensity of gravity on the particles generated, represented in a (x, y, z) format.
-Line 35: float ResistFactor: Determines the velocity resistance of the particles generated. A greater value means the particles will drag along.
-Line 43: float3 vel = float3: Determines the initial velocity of the particles generated. A non-zero value means the particles will be generated even when the accessory x file is not being moved.
Tips
-You can attach the effect to a model's bone and it will follow the bone movement.
-Harigane recommends setting this effect to be at the bottom of the accessory draw order.
-As the frame rate affects the fire effect, Harigane recommends setting the FPS refresh rate in line 32 of the code, and then loading in the effect.
-By default, the maximum number of particles generated will not exceed 4096. The effect will stop generating new particles until some have disappeared.
-The amount of particles generated is determined by the movement distance, ie. moving the effect a shorter distance will produce fewer particles than moving the effect a farther distance.