Essentials Series/Particles: Difference between revisions

no edit summary
m (Seil moved page Particles to Essentials Series/Particles without leaving a redirect)
No edit summary
 
(One intermediate revision by one other user not shown)
Line 6:
== Particle Assets ==
When using particles, you need to deal with three asset types.
* Particle Emitter ([[PARE]]), which controls where particles will be emitted, is the simplest to deal with.
* Particle Properties ([[PARP]]), which controls how particles change during their lifetime (size, color, movement) is the most complex of the 3.
* Particle System ([[PARS]]), which controls the rendering data for a particle (including the texture), is the one we don't know much how to change yet, as it contains a constructor function for the particle in its data which is best left alone for now (I would recommend changing only the particle texture and the render modes if you understand what they mean).
 
===[[PARE]]Particle Emitter===
This stands for Particle Emitter. TheyEmitters contain a reference to the PARPParticle Properties asset they will use, so be sure to update that if you renamed your assets. They contain data which tells where particles will show up, such as from a fixed point or from a specific [[Asset#Entity Assets|entity asset]].
 
By setting the Emitter Type to one of the possible shapes, you can choose if the particles emit from a point, sphere, box or line shaped region, for example. This region will be placed in the center of the emitter position. The PareSpecific region contains the information about this region, which you can change.
 
The Emitter property has a reference to the asset you want the particles to emit from (entity asset or group of markers):
If you want, you can set the Emitter_AssetID property to 0 and set the XYZ values of the emitter position directly in the PARE asset.
* To use [[MRKR|marker]] assets as emitters, place as many markers as you want using the template. Place a [[GRUP|Group]] template as well and put all the markers in the group. Put the Group's assset ID in the Emitter_AssetIDEmitter field of the PARE. The particles will be emitted from all the markers.
Another* option is toTo use an [[Asset#Entity Assets|entity asset]]., Setset the EmitterType to Entity Bound and the asset ID of the entity in the Emitter_AssetIDEmitter field of the PAREparticle emitter. The particles will be emitted from the entity's position at the time of emission.
If* youYou want,can you canalso set the Emitter_AssetIDEmitter property to 0 and set the XYZ values of the emitter position directly in the PARE asset.
 
Use [[#Events|events]] to control particle emission.
To use [[MRKR|marker]] assets as emitters, place as many markers as you want using the template. Place a [[GRUP|Group]] template as well and put all the markers in the group. Put the Group's assset ID in the Emitter_AssetID field of the PARE. The particles will be emitted from all the markers.
 
== ==Events ====
Another option is to use an [[Asset#Entity Assets|entity asset]]. Set the EmitterType to Entity Bound and the asset ID of the entity in the Emitter_AssetID field of the PARE. The particles will be emitted from the entity's position at the time of emission.
* '''On''': send this event to the PAREparticle emitter to begin particle emission.
 
Use* [[#Events|events]]'''Off''': send this event to the particle emitter to controlstop particle emission.
 
===[[PARP]]Particle Properties===
This stands for Particle Prop. TheyProperite contain a reference to the PARSparticle system they will use, so be sure to update that if you renamed your assets. They contain general information which tells how particles are created: their size, color, lifetime, how they move. A PARPparticle properties asset contains a section of 14 different structs. Each of them controls the value of one aspect of the particle, and each of them have internal controllers to decide the value. These are the fields that each of the 14 structs have:
 
* Interpolation Value 0/A: this is the minimum interpolation value for the struct.
Line 30 ⟶ 33:
* Frequency (Random, Linear and Step): this is the frequency in which the values for the Random, Linear and Step functions will be updated.
* Frequency (Sin and Cos): this is the frequency in which the values for the Sine and Cosine functions will be updated.
* Interpolation Mode: this defines which function will be used to choose an interpolation value for this struct. The value chosen for each particle is a function of the particle propproperties's elapsed time and will always be between values 0/A and 1/B. These are the possible functions:
** ConstA: always value 0/A.
** ConstB: always value 1/B.
Line 57 ⟶ 60:
* 13 - Unknown/Unused
 
===[[PARS]]Particle System===
ThisIn stands forthe Particle System. In the PARS asset editor, you can set the texture the particle will use, the pipeline rendering options for the particle, and the maximum amount of this particle that will be visible at once (although this sometimes seems to be ignored).
 
== Events ==
* '''On''': send this event to the PARE to begin particle emission.
* '''Off''': send this event to the PARE to stop particle emission.
 
[[Category:Modding]] [[Category:Tutorials]]