CannonParticle
Harigane- Particle
MMM Compatible
Last updated: 20/05/2014
CannonParticle launches an array of particles from a specified location and velocity.

Click the image above to see it in full
Download
Tutorial
1. Go to 'accessory manipulation' and click 'load'.
2. Select 'CannonParticle.x' and click 'Open'.
Accessory Parameter Values
-X, Y, and Z: Adjusts the position of the launch source.
-Rx, Ry, and Rz: Adjusts the angle of the launch source.
-Si: Adjusts the amount of particles.
-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: #define MMD_LIGHT: Determines whether the particles are affected by the innate lighting in MMD. Setting this value to 0 causes the particles to not be affected by MMD's light settings, whereas setting it to 1 does.
-Line 14: #define TEX_FileName: Determines which image file to use when generating particles.
-Line 15: #define TEX_PARTICLE_XNUM: Determines the number of particles generated at a time when moving along the x axis.
-Line 16: #define TEX_PARTICLE_YNUM: Determines the number of particles generated at a time when moving along the y axis.
-Line 17: #define TEX_USE_MIPMAP: Determines whether the effect generates texture mipmaps. Setting this value to 0 means the effect will not generate texture mipmaps, whereas setting it to 1 means the effect will.
-Line 18: #define TEX_ZBuffWrite: Determines whether the particles are affected by depth calculations. Setting this value to 0 means the effect will not be affected, whereas setting it to 1 means the effect will be affected.
-Line 20: #define USE_SPHERE: Determines whether the particles use sphere maps. Setting this value to 0 means the particles will use a sphere map, whereas setting it to 1 means the particles will not use a sphere map.
-Line 21: #define SPHERE_SATURATE: Determines the saturation boost applied to the particles, within a range of 0~1. Furthermore, when USE_SPHERE is set to 0, setting this value to 0 will cause the particles to emit light in conjunction with AutoLuminous.
-Line 22: #define SPHERE_FileName: Determines which file to use as the sphere map.
-Line 25: float3 ParticleColor: Determines the color values to multiply the particle image by, represented by a value range of 0.0~1.0 in an RGB value format.
-Line 26: float ParticleRandamColor: Determines the color variance of the particles generated, represented by a value range of 0.0~1.0.
-Line 27: float ParticleSize: Determines the size of the particles generated.
-Line 28: float ParticleSpeedMin: Determines the minimum initial speed of the particles generated.
-Line 29: float ParticleSpeedMax: Determines the maximum initial speed of the particles generated.
-Line 30: float ParticleRotSpeed: Determines the rotation speed of the particles generated.
-Line 31: float ParticleInitPos: Determines the initial position where particles spawn, relative to the accessory x file.
-Line 32: float ParticleLife: Determines the duration of the particles generated, represented in seconds.
-Line 33: 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 34: float ParticleOccur: Determines the particle generation rate. A greater values means there is a higher chance for particles to be generated.
-Line 35: float DiffusionAngle: Determines the particles' initial diffusion angle, represented in a range of 0.0~180.0 degrees.
-Line 36: float FloorFadeMax: Determines the starting position at which the particles begin to fade in from the launch source.
-Line 37: float FloorFadeMin: Determines the ending point at which the particles begin to fade in from the launch source.
-Line 40: float3 GravFactor: Determines the intensity of gravity on the particles generated, represented in an (x, y, z) format.
-Line 41: float ResistFactor: Determines the velocity resistance of the particles generated. A greater value means the particles will drag along.
-Line 42: float RotResistFactor: Determines the rotation resistance of the particles generated. A greater value means the particles will sway rather than fully spin.
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.
-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.