×
Меню
Индекс

NiParticleSystemController help (EN)

 

Выдержка из оригинальной справки. (NDL Gamebryo 1.1)
 
Particle Spawning
A particle spawn event can be set to occur when the particle undergoes a specific condition, such as colliding with an object or dying. When such an event happens, new particles are generated at the position of the old particle with the same attributes of the original particle. This behavior will continue until the number of spawn generations equals the number of generations allowed. The number of new particles, percentage of particles that will undergo spawning, and speed and directional chaos values can be specified by the user.
 
Direction Chaos:
Chaos %
SpawnedDirChaos
These functions get and set the change in direction that new particles generated by a spawn event will have. A value of 0.0 indicates no change in direction, and a value of 1.0 indicates between a 0% and 100% change in direction.
 
Speed chaos:
Factor %
SpawnedSpeedChaos
These functions get and set the change in speed that new particles generated by a spawn event will have. A value of 0.0 indicates no change in speed, a value of 1.0 indicates between a 0% and 100% increase in speed, and a value of –1.0 indicates between a 0% and 100% decrease in speed. There is not currently a way of allowing the system to randomly increase or decrease the speed of a new particle.
 
Multiplier
SpawnMultiplier
These functions get and set the number of new particles that will be generated by a spawn event.
 
Particle Spawn
PercentageSpawned
These functions get and set the percentage of particles that will actually spawn when a spawn event occurs. Expected values are between 0.0 and 1.0.
 
SpawnOnDeath
These functions get and set a flag indicating whether or not a spawn event should occur upon particle death.
 
Notes
Texturing and Particles
Even though no application-supplied texture coordinates are supported, particles may still be textured. If a texture is applied to a particles object, then each particle will have the entire texture mapped to it. In other words, the upper-left corner of each particle is mapped the texture coordinate [0,0], and the lower-right corner of each particle is mapped to the texture coordinate [1,1]. This approach can be extremely useful for creating particles that do not look square -- using alpha blending, alpha testing or color key transparency to make each particle appear spherical or rough.
 
Individual Particle Sizes
There are two ways to adjust particle size within an NiParticles object. The radius of each particle is retrieved with GetRadius. There is also a size for each particle, which is a ratio between 0.0 and 1.0 that is multiplied by the radius to obtain the final rendered size of the particle.
 
Particles and the Active Vertex Count
Note that if the vertex count is changed, it is important to update the model-space bounding sphere and call Update and MarkAsChanged upon the object or a parent to ensure that the vertices are correctly updated--see the NiGeometry and NiGeometryData notes for details. Also, if the active particle count is incremented the application should call Update on the object to ensure that newly active particles at the end of the array are updated.
 
Particles and Collision
General collision is not supported for NiParticles. Instead, particle colliders are implemented in the particle systems libraries. If general collision is desired for particles for some reason, then some sort of proxy object should be used to represent the particles.
 
Currently, texture-based (NiParticles) particles do not support rotations due to performance and hardware limitations. However, the rotation values are used in the NiParticleMeshes subclass to rotate the more complex mesh-based particles.
 
The Gamebryo renderers no longer support per-particle normals. The normal array passed into this object should be NULL. Even if normals are provided, they will not be used. Some renderers automatically generate a normal for each particle at the time the particle is rendered. This auto-generated normal is always set to face the camera, just like the quad that represents the particle.