Difference between revisions of "Particle emitters FCOLLADA extension"

From COLLADA Public Wiki
Jump to: navigation, search
(extensions->extension)
m (None)
Line 5: Line 5:
  
 
===Particle emitter entity===
 
===Particle emitter entity===
This is a non-standard entity type extra emitter type, contained within a <emitter> entity of a <library_emitters> at the <COLLADA> level is used to emit particles.
+
This is a non-standard entity type extra emitter type, contained within a &lt;emitter> entity of a &lt;library_emitters> at the &lt;COLLADA> level is used to emit particles.
  
FCollada currently support only one type of particle emitter: <type_spray>, which covers the large majority of cases. The spray particle emitter may define an area in which the particles are created. The particle emitter has a birth rate and defines how to generate the particles. This information applies to both billboard-style particles and geometry-style particles. See the instance description for more information on billboard-style particles and geometry-style particles, since the emitter instance determines the final look of the emitted particle.
+
FCollada currently support only one type of particle emitter: &lt;type_spray>, which covers the large majority of cases. The spray particle emitter may define an area in which the particles are created. The particle emitter has a birth rate and defines how to generate the particles. This information applies to both billboard-style particles and geometry-style particles. See the instance description for more information on billboard-style particles and geometry-style particles, since the emitter instance determines the final look of the emitted particle.
  
  
Line 13: Line 13:
  
  
====<type_spray>====
+
====&lt;type_spray>====
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
|-
 
|-
 
!width=20%| Element !! Attributes !! Description  
 
!width=20%| Element !! Attributes !! Description  
 
|-
 
|-
| <life> || variance, sid || Contains one floating point value: the average lifetime of emitted particles. The ''variance'' attribute adds randomness. A ''variance'' of zero implies a constant lifetime for all emitted particles. The ''sid'' attribute can be used to animate this parameter.
+
| &lt;life> || variance, sid || Contains one floating point value: the average lifetime of emitted particles. The ''variance'' attribute adds randomness. A ''variance'' of zero implies a constant lifetime for all emitted particles. The ''sid'' attribute can be used to animate this parameter.
 
|-
 
|-
| <size> || variance, sid || Contains one floating-point value: the average size, in world units, of emitted particles. For flake geometries, this implies a scale factor. The ''variance'' attribute adds randomness. The ''sid'' attribute can be used to animate this parameter.
+
| &lt;size> || variance, sid || Contains one floating-point value: the average size, in world units, of emitted particles. For flake geometries, this implies a scale factor. The ''variance'' attribute adds randomness. The ''sid'' attribute can be used to animate this parameter.
 
|-
 
|-
| <speed> || variance, sid || Contains one floating-point value: the average size, in world units, of emitted particles. For flake geometries, this implies a scale factor. The ''variance'' attribute adds randomness. The ''sid'' attribute can be used to animate this parameter.
+
| &lt;speed> || variance, sid || Contains one floating-point value: the average size, in world units, of emitted particles. For flake geometries, this implies a scale factor. The ''variance'' attribute adds randomness. The ''sid'' attribute can be used to animate this parameter.
 
|-
 
|-
| <color> || sid || Contains four floating-point values: one factor for each component of a typical color value. The ''sid'' attribute can be used to animate this parameter.
+
| &lt;color> || sid || Contains four floating-point values: one factor for each component of a typical color value. The ''sid'' attribute can be used to animate this parameter.
 
|-
 
|-
| <color_var> || sid || Contains four floating-point values: one variance for each component of the color value. The ''sid'' attribute can be used to animate this parameter.
+
| &lt;color_var> || sid || Contains four floating-point values: one variance for each component of the color value. The ''sid'' attribute can be used to animate this parameter.
 
|-
 
|-
| <spawn_multiplier> || variance, sid || Contains one floating-point value. The ''variance'' attribute adds randomness. The ''sid'' attribute can be used to animate this parameter.
+
| &lt;spawn_multiplier> || variance, sid || Contains one floating-point value. The ''variance'' attribute adds randomness. The ''sid'' attribute can be used to animate this parameter.
 
|-
 
|-
| <spawn_count> || || Contains one integer value.
+
| &lt;spawn_count> || || Contains one integer value.
 
|-
 
|-
| <spawn_percent> || || Contains one floating-point value.
+
| &lt;spawn_percent> || || Contains one floating-point value.
 
|-
 
|-
| <direction_chaos> || sid || Contains one floating-point value. Adds randomness to the initial velocity of new particles. The standard direction of new particles is given by the orientation of the scene node containing the emitter instance. The ''sid'' attribute can be used to animate this parameter.
+
| &lt;direction_chaos> || sid || Contains one floating-point value. Adds randomness to the initial velocity of new particles. The standard direction of new particles is given by the orientation of the scene node containing the emitter instance. The ''sid'' attribute can be used to animate this parameter.
 
|-
 
|-
| <speed_chaos> || sid || Contains one floating-point value. Adds randomness to the initial speed of new particles. The ''sid'' attribute can be used to animate this parameter.
+
| &lt;speed_chaos> || sid || Contains one floating-point value. Adds randomness to the initial speed of new particles. The ''sid'' attribute can be used to animate this parameter.
 
|-
 
|-
| <birth_rate> || || Contains one floating-point value: the number of particles to emit per seconds. The ''sid'' attribute can be used to animate this parameter.
+
| &lt;birth_rate> || || Contains one floating-point value: the number of particles to emit per seconds. The ''sid'' attribute can be used to animate this parameter.
 
|-
 
|-
| <modifier_list> || || Complex element. Contains a list of complex particle modifiers. More information on this below.
+
| &lt;modifier_list> || || Complex element. Contains a list of complex particle modifiers. More information on this below.
 
|-
 
|-
| <emit_pos> || || Complex element. Contains the analytical geometry in which particles are created. If this element is missing or empty, all particles are created one point: the world position of the emitter instance. More information on this below.
+
| &lt;emit_pos> || || Complex element. Contains the analytical geometry in which particles are created. If this element is missing or empty, all particles are created one point: the world position of the emitter instance. More information on this below.
 
|-
 
|-
| <emit_orient> || || Complex element. Describes how to orient the initial velocity of new particles. More information of this below.
+
| &lt;emit_orient> || || Complex element. Describes how to orient the initial velocity of new particles. More information of this below.
 
|-
 
|-
 
|}
 
|}
  
  
====<modifier_list>====
+
====&lt;modifier_list>====
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
|-
 
|-
 
!width=20%| Element !! Description  
 
!width=20%| Element !! Description  
 
|-
 
|-
| <rotation_basic> || Contains the parameters for a simple rotation modifier. The particles will rotate around a given axis at an animatable rate.
+
| &lt;rotation_basic> || Contains the parameters for a simple rotation modifier. The particles will rotate around a given axis at an animatable rate.
 
|-
 
|-
| <rotation> || Contains the parameters for a complex rotation modifier. Either or both the velocity and the orientation of particles can be rotated around a given or random axis.
+
| &lt;rotation> || Contains the parameters for a complex rotation modifier. Either or both the velocity and the orientation of particles can be rotated around a given or random axis.
 
|-
 
|-
| <velocity_align> || Contains the parameters for an aligning modifier. The particles will rotate to follow the path of their velocity. This modifier is mutually exclusive with the <rotation> and the <rotation_basic> modifiers.
+
| &lt;velocity_align> || Contains the parameters for an aligning modifier. The particles will rotate to follow the path of their velocity. This modifier is mutually exclusive with the &lt;rotation> and the &lt;rotation_basic> modifiers.
 
|-
 
|-
| <random_offset> || Contains the parameters for a random translation modifier. The particles will translate by a random amount within a given interval, at random times.
+
| &lt;random_offset> || Contains the parameters for a random translation modifier. The particles will translate by a random amount within a given interval, at random times.
 
|-
 
|-
| <random_accel> || Contains the parameters for a random acceleration modifier.
+
| &lt;random_accel> || Contains the parameters for a random acceleration modifier.
 
The particles will accelerate by a random amount within a given interval, at random times.
 
The particles will accelerate by a random amount within a given interval, at random times.
 
|-
 
|-
| <generation_size> || Contains the parameters for a lifetime-based size modifier. The size of each particles will be scaled according to its lifetime and a given factor.
+
| &lt;generation_size> || Contains the parameters for a lifetime-based size modifier. The size of each particles will be scaled according to its lifetime and a given factor.
 
|-
 
|-
| <colour_tint> || Contains the parameters for a particle color modifier. The material of each emitted particles will be blended, according to a given blend mode, with a given animatable color.
+
| &lt;colour_tint> || Contains the parameters for a particle color modifier. The material of each emitted particles will be blended, according to a given blend mode, with a given animatable color.
 
|-
 
|-
 
|}
 
|}
  
  
====<basic_rotation>====
+
====&lt;basic_rotation>====
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
|-
 
|-
 
!width=20%| Element !! Attributes !! Description  
 
!width=20%| Element !! Attributes !! Description  
 
|-
 
|-
| <speed> || sid || Contains one floating point value: the speed at which the particles will rotate around the given axis. The ''sid'' attribute can be used to animate this parameter.
+
| &lt;speed> || sid || Contains one floating point value: the speed at which the particles will rotate around the given axis. The ''sid'' attribute can be used to animate this parameter.
 
|-
 
|-
| <axis> || || Contains three floating point value: the 3D vector around which the particles rotate, in local space.
+
| &lt;axis> || || Contains three floating point value: the 3D vector around which the particles rotate, in local space.
 
|-
 
|-
 
|}
 
|}
  
  
====<rotation>====
+
====&lt;rotation>====
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
|-
 
|-
 
!width=20%| Element !! Attributes !! Description  
 
!width=20%| Element !! Attributes !! Description  
 
|-
 
|-
| <flags> || || Contains one masked enumerated type value:
+
| &lt;flags> || || Contains one masked enumerated type value:
<li>USE_DEFINED_AXIS = 2<br>Whether to apply rotations around the given axis, instead of a random axis. <li>FLIP_STARTING_COORDS = 4<br>Whether to randomly multiply the rotation axis by -1.<br>Meant to be used with USE_DEFINED_AXIS. <li>APPLY_WORLD_TRANSFORM = 8 <br>Apply the rotation in world-space instead of rotating in local space.<li>APPLY_TO_ORIENTATION = 16<br>Whether to apply the rotation to the screen-facing of the particles.<li>APPLY_TO_VELOCITY = 32<br>Whether to apply the rotation to the velocity of the particles<br>At least one of APPLY_TO_ORIENTATION and APPLY_TO_VELOCITY should be set.
+
&lt;li>USE_DEFINED_AXIS = 2&lt;br>Whether to apply rotations around the given axis, instead of a random axis. &lt;li>FLIP_STARTING_COORDS = 4&lt;br>Whether to randomly <span class="plainlinks">[http://www.thepiggybackrider.com/ <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;/*CITATION*/">child carrier</span>]</span> multiply the rotation axis by -1.&lt;br>Meant to be used with USE_DEFINED_AXIS. &lt;li>APPLY_WORLD_TRANSFORM = 8 &lt;br>Apply the rotation in world-space instead of rotating in local space.&lt;li>APPLY_TO_ORIENTATION = 16&lt;br>Whether to apply the rotation to the screen-facing of the particles.&lt;li>APPLY_TO_VELOCITY = 32&lt;br>Whether to apply the rotation to the velocity of the particles&lt;br>At least one of APPLY_TO_ORIENTATION and APPLY_TO_VELOCITY should be set.
 
|-
 
|-
| <initial> || sid || Contains one floating point value: the rotation angle to give to newly emitted particles. The ''sid'' attribute can be used to animate this parameter.
+
| &lt;initial> || sid || Contains one floating point value: the rotation angle to give to newly emitted particles. The ''sid'' attribute can be used to animate this parameter.
 
|-
 
|-
| <initial_var> || sid || Contains one floating point value: the variance in rotation angles for newly emitted particles. This parameters defaults to 2*PI, which implies doubly-fully random angles. The ''sid'' attribute can be used to animate this parameter.
+
| &lt;initial_var> || sid || Contains one floating point value: the variance in rotation angles for newly emitted particles. This parameters defaults to 2*PI, which implies doubly-fully random angles. The ''sid'' attribute can be used to animate this parameter.
 
|-
 
|-
| <speed> || sid || Contains one floating point value: the speed at which the particles will rotate around the given axis. The speed is given in rads per seconds. The ''sid'' attribute can be used to animate this parameter.
+
| &lt;speed> || sid || Contains one floating point value: the speed at which the particles will rotate around the given axis. The speed is given in rads per seconds. The ''sid'' attribute can be used to animate this parameter.
 
|-
 
|-
| <speed_var> || sid || Contains one floating point value: the variance in rotation speeds. This parameters defaults to PI. The ''sid'' attribute can be used to animate this parameter.
+
| &lt;speed_var> || sid || Contains one floating point value: the variance in rotation speeds. This parameters defaults to PI. The ''sid'' attribute can be used to animate this parameter.
 
|-
 
|-
| <axis> || sid || Contains three floating point values: the 3D vector around which the particles rotate, in local space. The ''sid'' attribute can be used to animate this parameter.
+
| &lt;axis> || sid || Contains three floating point values: the 3D vector around which the particles rotate, in local space. The ''sid'' attribute can be used to animate this parameter.
 
|-
 
|-
| <axis_var> || sid || Contains one floating point values: the variance in 3D rotation axis. This value is in radians and represent the possible derivation of the rotation axis on the unit sphere. The ''sid'' attribute can be used to animate this parameter. [editor] Is this a square or a circular derivation?
+
| &lt;axis_var> || sid || Contains one floating point values: the variance in 3D rotation axis. This value is in radians and represent the possible derivation of the rotation axis on the unit sphere. The ''sid'' attribute can be used to animate this parameter. [editor] Is this a square or a circular derivation?
 
|-
 
|-
 
|}
 
|}
  
  
====<velocity_align>====
+
====&lt;velocity_align>====
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
|-
 
|-
 
!width=20%| Element !! Attributes !! Description  
 
!width=20%| Element !! Attributes !! Description  
 
|-
 
|-
| <up_axis> || sid || Contains three floating point values: the up vector to completely orient the particles. This 3D vector will be used to generate a roll value, while the direction of the velocity will set the orientation of the particles. The ''sid'' attribute can be used to animate this parameter.
+
| &lt;up_axis> || sid || Contains three floating point values: the up vector to completely orient the particles. This 3D vector will be used to generate a roll value, while the direction of the velocity will set the orientation of the particles. The ''sid'' attribute can be used to animate this parameter.
 
|-
 
|-
 
|}
 
|}
  
  
====<random_offset>====
+
====&lt;random_offset>====
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
|-
 
|-
 
!width=20%| Element !! Attributes !! Description  
 
!width=20%| Element !! Attributes !! Description  
 
|-
 
|-
| <min> || sid || Contains one floating point value: the minimum length of the random displacement of each particles. The ''sid'' attribute can be used to animate this parameter.
+
| &lt;min> || sid || Contains one floating point value: the minimum length of the random displacement of each particles. The ''sid'' attribute can be used to animate this parameter.
 
|-
 
|-
| <max> || sid || Contains one floating point value: the maximum length of the random displacement of each particles. The ''sid'' attribute can be used to animate this parameter.
+
| &lt;max> || sid || Contains one floating point value: the maximum length of the random displacement of each particles. The ''sid'' attribute can be used to animate this parameter.
 
|-
 
|-
| <freq> || sid || Contains one floating point value: the frequency at which to randomly translate each particles. The ''sid'' attribute can be used to animate this parameter.
+
| &lt;freq> || sid || Contains one floating point value: the frequency at which to randomly translate each particles. The ''sid'' attribute can be used to animate this parameter.
 
|-
 
|-
 
|}
 
|}
  
  
====<random_accel>====
+
====&lt;random_accel>====
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
|-
 
|-
 
!width=20%| Element !! Attributes !! Description  
 
!width=20%| Element !! Attributes !! Description  
 
|-
 
|-
| <accel_scale> || sid || Contains one floating point value: the length of the maximum acceleration to randomly set to each particle. The minimum acceleration to randomly set on each particle in always no acceleration. The ''sid'' attribute can be used to animate this parameter.
+
| &lt;accel_scale> || sid || Contains one floating point value: the length of the maximum acceleration to randomly set to each particle. The minimum acceleration to randomly set on each particle in always no acceleration. The ''sid'' attribute can be used to animate this parameter.
 
|-
 
|-
| <accel_freq> || sid || Contains one floating point value: the frequency at which to randomly set each particle's acceleration. The ''sid'' attribute can be used to animate this parameter.
+
| &lt;accel_freq> || sid || Contains one floating point value: the frequency at which to randomly set each particle's acceleration. The ''sid'' attribute can be used to animate this parameter.
 
|-
 
|-
 
|}
 
|}
  
  
====<generation_size>====
+
====&lt;generation_size>====
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
|-
 
|-
 
!width=20%| Element !! Attributes !! Description  
 
!width=20%| Element !! Attributes !! Description  
 
|-
 
|-
| <size> || sid || Contains one floating point value: the size factor for the particles. The ''sid'' attribute can be used to animate this parameter. [editor] Not sure what formula is implied here.  
+
| &lt;size> || sid || Contains one floating point value: the size factor for the particles. The ''sid'' attribute can be used to animate this parameter. [editor] Not sure what formula is implied here.  
 
|-
 
|-
 
|}
 
|}
  
  
====<colour_tint>====
+
====&lt;colour_tint>====
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
|-
 
|-
 
!width=20%| Element !! Attributes !! Description  
 
!width=20%| Element !! Attributes !! Description  
 
|-
 
|-
| <color> || sid || Contains four floating point values: four factors to apply to the final color component channels, in the typical COLLADA order: Red, Green, Blue and Alpha. The ''sid'' attribute can be used to animate this parameter.
+
| &lt;color> || sid || Contains four floating point values: four factors to apply to the final color component channels, in the typical COLLADA order: Red, Green, Blue and Alpha. The ''sid'' attribute can be used to animate this parameter.
 
|-
 
|-
| <blend_mode> || || Contains an enumerated type value: it indicates how to apply the color factors: ''multiply'', ''add'' and ''substract'' are self-explanatory. A value of ''set'' will replace the material color value by the color factors.
+
| &lt;blend_mode> || || Contains an enumerated type value: it indicates how to apply the color factors: ''multiply'', ''add'' and ''substract'' are self-explanatory. A value of ''set'' will replace the material color value by the color factors.
 
|-
 
|-
 
|}
 
|}
  
  
====<emit_orient>====
+
====&lt;emit_orient>====
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
|-
 
|-
 
!width=20%| Element !! Attributes !! Description  
 
!width=20%| Element !! Attributes !! Description  
 
|-
 
|-
| <area> || || Complex element. Emits particles out of a 3D quad.
+
| &lt;area> || || Complex element. Emits particles out of a 3D quad.
 
|-
 
|-
| <box> || || Complex element. Emits particles inside an axis-aligned box.
+
| &lt;box> || || Complex element. Emits particles inside an axis-aligned box.
 
|-
 
|-
| <sphere> || || Complex element. Emits particles inside a shell.
+
| &lt;sphere> || || Complex element. Emits particles inside a shell.
 
|-
 
|-
| <object> || url || Complex element. Emits particles at the vertices of a referenced mesh. The ''url'' attribute is used to identify the geometry definition to emit from. As with morph controllers, the vertices of the geometry are necessary and sufficient.
+
| &lt;object> || url || Complex element. Emits particles at the vertices of a referenced mesh. The ''url'' attribute is used to identify the geometry definition to emit from. As with morph controllers, the vertices of the geometry are necessary and sufficient.
 
|-
 
|-
 
|}
 
|}
  
  
====<emit_pos><area>====
+
====&lt;emit_pos>&lt;area>====
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
|-
 
|-
 
!width=20%| Element !! Attributes !! Description  
 
!width=20%| Element !! Attributes !! Description  
 
|-
 
|-
| <width> || sid || Contains one floating point value: the width of the emitting 3D quad. This parameter is animatable using the ''sid'' attribute.
+
| &lt;width> || sid || Contains one floating point value: the width of the emitting 3D quad. This parameter is animatable using the ''sid'' attribute.
 
|-
 
|-
| <length> || sid || Contains one floating point value: the length of the emitting 3D quad. This parameter is animatable using the ''sid'' attribute.
+
| &lt;length> || sid || Contains one floating point value: the length of the emitting 3D quad. This parameter is animatable using the ''sid'' attribute.
 
|-
 
|-
 
| || || The emitting quad is axis-aligned and is defined by the following min/max coordinates: (-width/2, 0, -length/2) and (width/2, 0, length/2). Its default orientation is along the positive Y axis. The probability of emission is uniformly distributed inside the 3D quad.
 
| || || The emitting quad is axis-aligned and is defined by the following min/max coordinates: (-width/2, 0, -length/2) and (width/2, 0, length/2). Its default orientation is along the positive Y axis. The probability of emission is uniformly distributed inside the 3D quad.
Line 195: Line 195:
  
  
====<emit_pos><box>====
+
====&lt;emit_pos>&lt;box>====
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
|-
 
|-
 
!width=20%| Element !! Attributes !! Description  
 
!width=20%| Element !! Attributes !! Description  
 
|-
 
|-
| <width> || sid || Contains one floating point value: the width of the emitting axis-aligned box. This parameter is animatable using the ''sid'' attribute.
+
| &lt;width> || sid || Contains one floating point value: the width of the emitting axis-aligned box. This parameter is animatable using the ''sid'' attribute.
 
|-
 
|-
| <length> || sid || Contains one floating point value: the length of the emitting axis-aligned box. This parameter is animatable using the ''sid'' attribute.
+
| &lt;length> || sid || Contains one floating point value: the length of the emitting axis-aligned box. This parameter is animatable using the ''sid'' attribute.
 
|-
 
|-
| <height> || sid || Contains one floating point value: the height of the emitting axis-aligned box. This parameter is animatable using the ''sid'' attribute.
+
| &lt;height> || sid || Contains one floating point value: the height of the emitting axis-aligned box. This parameter is animatable using the ''sid'' attribute.
 
|-
 
|-
 
| || || The emitting axis-aligned box is defined by the following min/max coordinates: (-width/2, -height/2, -length/2) and (width/2, height/2, -length/2). The probability of emission is uniformly distributed inside the 3D quad.
 
| || || The emitting axis-aligned box is defined by the following min/max coordinates: (-width/2, -height/2, -length/2) and (width/2, height/2, -length/2). The probability of emission is uniformly distributed inside the 3D quad.
Line 211: Line 211:
  
  
====<emit_pos><sphere>====
+
====&lt;emit_pos>&lt;sphere>====
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
|-
 
|-
 
!width=20%| Element !! Attributes !! Description  
 
!width=20%| Element !! Attributes !! Description  
 
|-
 
|-
| <min_radius> || sid || Contains one floating point value: the radius of the inner sphere surface of the shell. This parameter is animatable using the ''sid'' attribute.
+
| &lt;min_radius> || sid || Contains one floating point value: the radius of the inner sphere surface of the shell. This parameter is animatable using the ''sid'' attribute.
 
|-
 
|-
| <max_radius> || sid || Contains one floating point value: the radius of the outer sphere surface of the shell. This parameter is animatable using the ''sid'' attribute.
+
| &lt;max_radius> || sid || Contains one floating point value: the radius of the outer sphere surface of the shell. This parameter is animatable using the ''sid'' attribute.
 
|-
 
|-
 
| || || It may be easier to think that particle emission occurs within a distance interval from the emitter instance, than to imagine the shell. The emission of particles is equally likely for each value within the distance interval. This means that the probability of emission is more dense towards the inner sphere surface of the shell.
 
| || || It may be easier to think that particle emission occurs within a distance interval from the emitter instance, than to imagine the shell. The emission of particles is equally likely for each value within the distance interval. This means that the probability of emission is more dense towards the inner sphere surface of the shell.
Line 225: Line 225:
  
  
====<emit_pos><object>====
+
====&lt;emit_pos>&lt;object>====
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
|-
 
|-
 
!width=20%| Element !! Attributes !! Description  
 
!width=20%| Element !! Attributes !! Description  
 
|-
 
|-
| <regular> || || Reserved for future expansion. Currently always contains the string "1".
+
| &lt;regular> || || Reserved for future expansion. Currently always contains the string "1".
 
|-
 
|-
 
|}
 
|}
Line 236: Line 236:
  
  
====<emit_orient>====
+
====&lt;emit_orient>====
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
|-
 
|-
 
!width=20%| Element !! Attributes !! Description  
 
!width=20%| Element !! Attributes !! Description  
 
|-
 
|-
| <sphere> || Complex element. Orients particles using a section of the unit sphere.
+
| &lt;sphere> || Complex element. Orients particles using a section of the unit sphere.
 
|-
 
|-
| <match_emitter> || Complex element. Orients particles along the instant velocity of the emitter instance.
+
| &lt;match_emitter> || Complex element. Orients particles along the instant velocity of the emitter instance.
 
|-
 
|-
 
|}
 
|}
Line 250: Line 250:
  
 
A simple, but complete emitter.
 
A simple, but complete emitter.
   <extra type="libraries">
+
   &lt;extra type="libraries">
     <technique profile="FCOLLADA">
+
     &lt;technique profile="FCOLLADA">
       <library_emitters>
+
       &lt;library_emitters>
         <emitter id="Emitter">
+
         &lt;emitter id="Emitter">
           <type_spray>
+
           &lt;type_spray>
             <life variance="0">1</life>
+
             &lt;life variance="0">1&lt;/life>
             <size variance="0">1</size>
+
             &lt;size variance="0">1&lt;/size>
             <speed variance="0">1</speed>
+
             &lt;speed variance="0">1&lt;/speed>
             <color>1 1 1 1</color>
+
             &lt;color>1 1 1 1&lt;/color>
             <color_var>0 0 0 0</color_var>
+
             &lt;color_var>0 0 0 0&lt;/color_var>
             <spawn_multiplier variance="0">1</spawn_multiplier>
+
             &lt;spawn_multiplier variance="0">1&lt;/spawn_multiplier>
             <spawn_on_death>1</spawn_on_death>
+
             &lt;spawn_on_death>1&lt;/spawn_on_death>
             <spawn_count>1</spawn_count>
+
             &lt;spawn_count>1&lt;/spawn_count>
             <spawn_percent>0.5</spawn_percent>
+
             &lt;spawn_percent>0.5&lt;/spawn_percent>
             <direction_chaos>0</direction_chaos>
+
             &lt;direction_chaos>0&lt;/direction_chaos>
             <speed_chaos>0</speed_chaos>
+
             &lt;speed_chaos>0&lt;/speed_chaos>
             <birth_rate>10</birth_rate>
+
             &lt;birth_rate>10&lt;/birth_rate>
             <modifier_list/>
+
             &lt;modifier_list/>
           </type_spray>
+
           &lt;/type_spray>
         </emitter>
+
         &lt;/emitter>
       </library_emitters>
+
       &lt;/library_emitters>
     </technique>
+
     &lt;/technique>
   </extra>
+
   &lt;/extra>
  
 
An emitter with a modifier and a complex emission area.
 
An emitter with a modifier and a complex emission area.
   <emitter id="Emitter1">
+
   &lt;emitter id="Emitter1">
     <type_spray>
+
     &lt;type_spray>
       <life1</life>
+
       &lt;life1&lt;/life>
       <color>1 1 1 1</color>
+
       &lt;color>1 1 1 1&lt;/color>
       <modifier_list>
+
       &lt;modifier_list>
         <colour_tint>
+
         &lt;colour_tint>
           <blend_mode>set</blend_mode>
+
           &lt;blend_mode>set&lt;/blend_mode>
           <color>1 1 1 1</color>
+
           &lt;color>1 1 1 1&lt;/color>
         </colour_tint>
+
         &lt;/colour_tint>
       </modifier_list>
+
       &lt;/modifier_list>
       <emit_pos>
+
       &lt;emit_pos>
         <area>
+
         &lt;area>
           <width>10</width>
+
           &lt;width>10&lt;/width>
           <length>10</length>
+
           &lt;length>10&lt;/length>
         </area>
+
         &lt;/area>
       </emit_pos>
+
       &lt;/emit_pos>
     </type_spray>
+
     &lt;/type_spray>
   </emitter>
+
   &lt;/emitter>
  
 
===Particle emitter instance===
 
===Particle emitter instance===
Particle emitters are a non-standard entity type. Therefore, they are not contained directly under the <node> element. For more information on how to include the <instance_emitter> element in the scene graph, see [[Extra entity instances FCOLLADA extension]].
+
Particle emitters are a non-standard entity type. Therefore, they are not contained directly under the &lt;node> element. For more information on how to include the &lt;instance_emitter> element in the scene graph, see [[Extra entity instances FCOLLADA extension]].
  
  
It is the particle emitter instance that will determine the final look and behavior of the emitted particles. There are two types of emitted particles: billboards and geometries. In the case of billboards, they should all start as camera-facing, but a rotation may be appllied to them by the particle emitter. In the case of geometry particles - also called flake geometries - you can imagine that a list of <instance_geometry> is added to the node where the emitter instance belongs.
+
It is the particle emitter instance that will determine the final look and behavior of the emitted particles. There are two types of emitted particles: billboards and geometries. In the case of billboards, they should all start as camera-facing, but a rotation may be appllied to them by the particle emitter. In the case of geometry particles - also called flake geometries - you can imagine that a list of &lt;instance_geometry> is added to the node where the emitter instance belongs.
  
  
====<emitter_instance>====
+
====&lt;emitter_instance>====
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
|-
 
|-
 
!width=20%| Element !! Attributes !! Description  
 
!width=20%| Element !! Attributes !! Description  
 
|-
 
|-
| <flake_geometry> || || Complex element. Implies that the emitter instance emits geometry-style particles. This element contains may contain only one child: <instance_geometry>. See the COLLADA specification for more information on <instance_geometry>.
+
| &lt;flake_geometry> || || Complex element. Implies that the emitter instance emits geometry-style particles. This element contains may contain only one child: &lt;instance_geometry>. See the COLLADA specification for more information on &lt;instance_geometry>.
 
|-
 
|-
| <sprite> || || Complex element. Implies that the emitter instance emits billboard-style particles. This element may contain only one child: <instance_material>. See the COLLADA specification for more information on <instance_material>.
+
| &lt;sprite> || || Complex element. Implies that the emitter instance emits billboard-style particles. This element may contain only one child: &lt;instance_material>. See the COLLADA specification for more information on &lt;instance_material>.
 
|-
 
|-
 
|}
 
|}
Line 315: Line 315:
  
 
====Example====
 
====Example====
     <node id="some_node" type="NODE">
+
     &lt;node id="some_node" type="NODE">
       <extra type="instances">
+
       &lt;extra type="instances">
         <technique profile="FCOLLADA">
+
         &lt;technique profile="FCOLLADA">
           <instance_emitter url="#Emitter">
+
           &lt;instance_emitter url="#Emitter">
             <flake_geometry>
+
             &lt;flake_geometry>
               <instance_geometry url="#small_mesh">
+
               &lt;instance_geometry url="#small_mesh">
                 <bind_material>
+
                 &lt;bind_material>
                   <technique_common>
+
                   &lt;technique_common>
                     <instance_material symbol="polygons1" target="#material1"/>
+
                     &lt;instance_material symbol="polygons1" target="#material1"/>
                   </technique_common>
+
                   &lt;/technique_common>
                 </bind_material>
+
                 &lt;/bind_material>
               </instance_geometry>
+
               &lt;/instance_geometry>
             </flake_geometry>
+
             &lt;/flake_geometry>
           </instance_emitter>
+
           &lt;/instance_emitter>
         </technique>
+
         &lt;/technique>
       </extra>
+
       &lt;/extra>
     </node>
+
     &lt;/node>
  
  
     <instance_emitter url="#Emitter">
+
     &lt;instance_emitter url="#Emitter">
       <sprite>
+
       &lt;sprite>
         <instance_material target="#small_mesh">
+
         &lt;instance_material target="#small_mesh">
       </sprite>
+
       &lt;/sprite>
     </instance_emitter>
+
     &lt;/instance_emitter>

Revision as of 06:10, 26 September 2011

Extension information
  • Purpose: unstated
  • Company(s): [[Feeling Software]]
  • Product(s): [[FCollada]]
  • Last updated: unstated
  • Contact for technical issues:
This article is part of the COLLADA extensions directory
Adding to the extensions directory

Particle emitters extension

This extension has two parts: the emitter description and the instance-specific information. The behavior is only loosely defined.

Particle emitter entity

This is a non-standard entity type extra emitter type, contained within a <emitter> entity of a <library_emitters> at the <COLLADA> level is used to emit particles.

FCollada currently support only one type of particle emitter: <type_spray>, which covers the large majority of cases. The spray particle emitter may define an area in which the particles are created. The particle emitter has a birth rate and defines how to generate the particles. This information applies to both billboard-style particles and geometry-style particles. See the instance description for more information on billboard-style particles and geometry-style particles, since the emitter instance determines the final look of the emitted particle.


Emitted particles are created with a linear velocity, which may be zero and may be modified by forces. See Particle forces FCOLLADA extension for more information on forces. Emitted particles have a material, an independent color, a lifetime and a scale factor. The color and scale factors may change according to the lifetime of the particle.


<type_spray>

Element Attributes Description
<life> variance, sid Contains one floating point value: the average lifetime of emitted particles. The variance attribute adds randomness. A variance of zero implies a constant lifetime for all emitted particles. The sid attribute can be used to animate this parameter.
<size> variance, sid Contains one floating-point value: the average size, in world units, of emitted particles. For flake geometries, this implies a scale factor. The variance attribute adds randomness. The sid attribute can be used to animate this parameter.
<speed> variance, sid Contains one floating-point value: the average size, in world units, of emitted particles. For flake geometries, this implies a scale factor. The variance attribute adds randomness. The sid attribute can be used to animate this parameter.
<color> sid Contains four floating-point values: one factor for each component of a typical color value. The sid attribute can be used to animate this parameter.
<color_var> sid Contains four floating-point values: one variance for each component of the color value. The sid attribute can be used to animate this parameter.
<spawn_multiplier> variance, sid Contains one floating-point value. The variance attribute adds randomness. The sid attribute can be used to animate this parameter.
<spawn_count> Contains one integer value.
<spawn_percent> Contains one floating-point value.
<direction_chaos> sid Contains one floating-point value. Adds randomness to the initial velocity of new particles. The standard direction of new particles is given by the orientation of the scene node containing the emitter instance. The sid attribute can be used to animate this parameter.
<speed_chaos> sid Contains one floating-point value. Adds randomness to the initial speed of new particles. The sid attribute can be used to animate this parameter.
<birth_rate> Contains one floating-point value: the number of particles to emit per seconds. The sid attribute can be used to animate this parameter.
<modifier_list> Complex element. Contains a list of complex particle modifiers. More information on this below.
<emit_pos> Complex element. Contains the analytical geometry in which particles are created. If this element is missing or empty, all particles are created one point: the world position of the emitter instance. More information on this below.
<emit_orient> Complex element. Describes how to orient the initial velocity of new particles. More information of this below.


<modifier_list>

Element Description
<rotation_basic> Contains the parameters for a simple rotation modifier. The particles will rotate around a given axis at an animatable rate.
<rotation> Contains the parameters for a complex rotation modifier. Either or both the velocity and the orientation of particles can be rotated around a given or random axis.
<velocity_align> Contains the parameters for an aligning modifier. The particles will rotate to follow the path of their velocity. This modifier is mutually exclusive with the <rotation> and the <rotation_basic> modifiers.
<random_offset> Contains the parameters for a random translation modifier. The particles will translate by a random amount within a given interval, at random times.
<random_accel> Contains the parameters for a random acceleration modifier.

The particles will accelerate by a random amount within a given interval, at random times.

<generation_size> Contains the parameters for a lifetime-based size modifier. The size of each particles will be scaled according to its lifetime and a given factor.
<colour_tint> Contains the parameters for a particle color modifier. The material of each emitted particles will be blended, according to a given blend mode, with a given animatable color.


<basic_rotation>

Element Attributes Description
<speed> sid Contains one floating point value: the speed at which the particles will rotate around the given axis. The sid attribute can be used to animate this parameter.
<axis> Contains three floating point value: the 3D vector around which the particles rotate, in local space.


<rotation>

Element Attributes Description
<flags> Contains one masked enumerated type value:

<li>USE_DEFINED_AXIS = 2<br>Whether to apply rotations around the given axis, instead of a random axis. <li>FLIP_STARTING_COORDS = 4<br>Whether to randomly child carrier multiply the rotation axis by -1.<br>Meant to be used with USE_DEFINED_AXIS. <li>APPLY_WORLD_TRANSFORM = 8 <br>Apply the rotation in world-space instead of rotating in local space.<li>APPLY_TO_ORIENTATION = 16<br>Whether to apply the rotation to the screen-facing of the particles.<li>APPLY_TO_VELOCITY = 32<br>Whether to apply the rotation to the velocity of the particles<br>At least one of APPLY_TO_ORIENTATION and APPLY_TO_VELOCITY should be set.

<initial> sid Contains one floating point value: the rotation angle to give to newly emitted particles. The sid attribute can be used to animate this parameter.
<initial_var> sid Contains one floating point value: the variance in rotation angles for newly emitted particles. This parameters defaults to 2*PI, which implies doubly-fully random angles. The sid attribute can be used to animate this parameter.
<speed> sid Contains one floating point value: the speed at which the particles will rotate around the given axis. The speed is given in rads per seconds. The sid attribute can be used to animate this parameter.
<speed_var> sid Contains one floating point value: the variance in rotation speeds. This parameters defaults to PI. The sid attribute can be used to animate this parameter.
<axis> sid Contains three floating point values: the 3D vector around which the particles rotate, in local space. The sid attribute can be used to animate this parameter.
<axis_var> sid Contains one floating point values: the variance in 3D rotation axis. This value is in radians and represent the possible derivation of the rotation axis on the unit sphere. The sid attribute can be used to animate this parameter. [editor] Is this a square or a circular derivation?


<velocity_align>

Element Attributes Description
<up_axis> sid Contains three floating point values: the up vector to completely orient the particles. This 3D vector will be used to generate a roll value, while the direction of the velocity will set the orientation of the particles. The sid attribute can be used to animate this parameter.


<random_offset>

Element Attributes Description
<min> sid Contains one floating point value: the minimum length of the random displacement of each particles. The sid attribute can be used to animate this parameter.
<max> sid Contains one floating point value: the maximum length of the random displacement of each particles. The sid attribute can be used to animate this parameter.
<freq> sid Contains one floating point value: the frequency at which to randomly translate each particles. The sid attribute can be used to animate this parameter.


<random_accel>

Element Attributes Description
<accel_scale> sid Contains one floating point value: the length of the maximum acceleration to randomly set to each particle. The minimum acceleration to randomly set on each particle in always no acceleration. The sid attribute can be used to animate this parameter.
<accel_freq> sid Contains one floating point value: the frequency at which to randomly set each particle's acceleration. The sid attribute can be used to animate this parameter.


<generation_size>

Element Attributes Description
<size> sid Contains one floating point value: the size factor for the particles. The sid attribute can be used to animate this parameter. [editor] Not sure what formula is implied here.


<colour_tint>

Element Attributes Description
<color> sid Contains four floating point values: four factors to apply to the final color component channels, in the typical COLLADA order: Red, Green, Blue and Alpha. The sid attribute can be used to animate this parameter.
<blend_mode> Contains an enumerated type value: it indicates how to apply the color factors: multiply, add and substract are self-explanatory. A value of set will replace the material color value by the color factors.


<emit_orient>

Element Attributes Description
<area> Complex element. Emits particles out of a 3D quad.
<box> Complex element. Emits particles inside an axis-aligned box.
<sphere> Complex element. Emits particles inside a shell.
<object> url Complex element. Emits particles at the vertices of a referenced mesh. The url attribute is used to identify the geometry definition to emit from. As with morph controllers, the vertices of the geometry are necessary and sufficient.


<emit_pos><area>

Element Attributes Description
<width> sid Contains one floating point value: the width of the emitting 3D quad. This parameter is animatable using the sid attribute.
<length> sid Contains one floating point value: the length of the emitting 3D quad. This parameter is animatable using the sid attribute.
The emitting quad is axis-aligned and is defined by the following min/max coordinates: (-width/2, 0, -length/2) and (width/2, 0, length/2). Its default orientation is along the positive Y axis. The probability of emission is uniformly distributed inside the 3D quad.


<emit_pos><box>

Element Attributes Description
<width> sid Contains one floating point value: the width of the emitting axis-aligned box. This parameter is animatable using the sid attribute.
<length> sid Contains one floating point value: the length of the emitting axis-aligned box. This parameter is animatable using the sid attribute.
<height> sid Contains one floating point value: the height of the emitting axis-aligned box. This parameter is animatable using the sid attribute.
The emitting axis-aligned box is defined by the following min/max coordinates: (-width/2, -height/2, -length/2) and (width/2, height/2, -length/2). The probability of emission is uniformly distributed inside the 3D quad.


<emit_pos><sphere>

Element Attributes Description
<min_radius> sid Contains one floating point value: the radius of the inner sphere surface of the shell. This parameter is animatable using the sid attribute.
<max_radius> sid Contains one floating point value: the radius of the outer sphere surface of the shell. This parameter is animatable using the sid attribute.
It may be easier to think that particle emission occurs within a distance interval from the emitter instance, than to imagine the shell. The emission of particles is equally likely for each value within the distance interval. This means that the probability of emission is more dense towards the inner sphere surface of the shell.


<emit_pos><object>

Element Attributes Description
<regular> Reserved for future expansion. Currently always contains the string "1".


<emit_orient>

Element Attributes Description
<sphere> Complex element. Orients particles using a section of the unit sphere.
<match_emitter> Complex element. Orients particles along the instant velocity of the emitter instance.

Example

A simple, but complete emitter.

 <extra type="libraries">
   <technique profile="FCOLLADA">
     <library_emitters>
       <emitter id="Emitter">
         <type_spray>
           <life variance="0">1</life>
           <size variance="0">1</size>
           <speed variance="0">1</speed>
           <color>1 1 1 1</color>
           <color_var>0 0 0 0</color_var>
           <spawn_multiplier variance="0">1</spawn_multiplier>
           <spawn_on_death>1</spawn_on_death>
           <spawn_count>1</spawn_count>
           <spawn_percent>0.5</spawn_percent>
           <direction_chaos>0</direction_chaos>
           <speed_chaos>0</speed_chaos>
           <birth_rate>10</birth_rate>
           <modifier_list/>
         </type_spray>
       </emitter>
     </library_emitters>
   </technique>
 </extra>

An emitter with a modifier and a complex emission area.

 <emitter id="Emitter1">
   <type_spray>
     <life1</life>
     <color>1 1 1 1</color>
     <modifier_list>
       <colour_tint>
         <blend_mode>set</blend_mode>
         <color>1 1 1 1</color>
       </colour_tint>
     </modifier_list>
     <emit_pos>
       <area>
         <width>10</width>
         <length>10</length>
       </area>
     </emit_pos>
   </type_spray>
 </emitter>

Particle emitter instance

Particle emitters are a non-standard entity type. Therefore, they are not contained directly under the <node> element. For more information on how to include the <instance_emitter> element in the scene graph, see Extra entity instances FCOLLADA extension.


It is the particle emitter instance that will determine the final look and behavior of the emitted particles. There are two types of emitted particles: billboards and geometries. In the case of billboards, they should all start as camera-facing, but a rotation may be appllied to them by the particle emitter. In the case of geometry particles - also called flake geometries - you can imagine that a list of <instance_geometry> is added to the node where the emitter instance belongs.


<emitter_instance>

Element Attributes Description
<flake_geometry> Complex element. Implies that the emitter instance emits geometry-style particles. This element contains may contain only one child: <instance_geometry>. See the COLLADA specification for more information on <instance_geometry>.
<sprite> Complex element. Implies that the emitter instance emits billboard-style particles. This element may contain only one child: <instance_material>. See the COLLADA specification for more information on <instance_material>.


Example

   <node id="some_node" type="NODE">
     <extra type="instances">
       <technique profile="FCOLLADA">
         <instance_emitter url="#Emitter">
           <flake_geometry>
             <instance_geometry url="#small_mesh">
               <bind_material>
                 <technique_common>
                   <instance_material symbol="polygons1" target="#material1"/>
                 </technique_common>
               </bind_material>
             </instance_geometry>
           </flake_geometry>
         </instance_emitter>
       </technique>
     </extra>
   </node>


   <instance_emitter url="#Emitter">
      <sprite>
        <instance_material target="#small_mesh">
      </sprite>
   </instance_emitter>