|| Experimental: The Particle Component is an experimental feature in ANVEL 3.5.|
The Particle component allows the visualization of particles through a prebuilt Ogre particle script. Particles are useful for effects such as explosions, water fountains, smoke (shown below), and dust, as they display a large number of simple renderables efficiently. The Particle component requires a reference to a uniquely named Ogre Particle script. See documentation on the particle script format at Ogre Particle Script documentation.
|Enabled||bool||Whether this particle is active|
|Position||Vector3||Position offset from its parent object|
|CreationTime||float64||Time of particle creation|
|AutoExpire||bool||If the particle emitter will be disabled after the particles have been emitted|
Particle Components must currently be defined with XML definitions and cannot be dynamically created through API or Python scripting. However, once a definition is specified in XML, these assets can be attached to other objects to create more complex behaviors.
The Particle component utilizes the following XML structure to define a new particle object.
|template||Name of the Ogre particle script to utilize||yes|
|autoExpire||"true" if the particle should shut down after its emitter is no longer emitting particles||no|
The following examples are complete, user-placeable objects. To utilize these, add them to a new definition file or include them in an existing definition file. If creating a new file, verify the new definition file has an associated ANVEL package file, or is added to the user's AnvelInit.xml configuration file.
The following object definition describes an invisible object that will spawn a dust cloud that moves with the object. Note that the particle script "Vane/DustCloud" must exist for visualization of this object.
<object name="DustCloudObject" category="Particles" placeable="true" selectable="false"> <Components> <ParticleComponent template="Vane/DustCloud" autoExpire="false"> </ParticleComponent> </Components> </object>
The next definition creates an explosion, with both a fiery instantaneous blast and a plume of smoke, along with a basic cube to allow user manipulation. Note that this uses two separate particle components.
<object name="ExplosionObject" category="Particles" placeable="true" selectable="true"> <representations> <ogre3d mesh="BasicShapeCube.mesh" shadows="off" zUp="true"> <scale x=".001" y=".001" z=".001"/> </ogre3d> </representations> <Components> <ParticleComponent template="Explosion_Anvel"> <positionOffset x="0" y="0" z="0" /> <orientationOffset w="1" x="0" y="0" z="0" /> </ParticleComponent> <ParticleComponent template="smoke2"> <positionOffset x="0" y="0" z="0" /> <orientationOffset w="1" x="0" y="0" z="0" /> </ParticleComponent> </Components> </object>