Difference between revisions of "Particle emitters FCOLLADA extension"

From COLLADA Public Wiki
Jump to: navigation, search
(Created the page: Draft V1.)
 
(Added emitter instance information.)
Line 2: Line 2:
  
 
== Particle emitters extension ==
 
== Particle emitters extension ==
'''DRAFT v1'''. This extension has two parts: the emitter description and the instance-specific information. The behavior is only loosely defined.
+
'''DRAFT v2'''. This extension has two parts: the emitter description and the instance-specific information. The behavior is only loosely defined.
  
 
===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 <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. We call billboard-style particles, particles and we call geometry-style particles, flake geometry.
+
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.
  
  
Line 13: Line 13:
  
  
 +
====<type_spray>====
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
{| border=1 cellspacing=0 cellpadding=3 align=center
 
|-
 
|-
Line 45: Line 46:
 
|}
 
|}
  
===Example===
+
====Example====
 +
 
 +
A simple, but complete emitter.
 
   <extra type="libraries">
 
   <extra type="libraries">
 
     <technique profile="FCOLLADA">
 
     <technique profile="FCOLLADA">
Line 69: Line 72:
 
     </technique>
 
     </technique>
 
   </extra>
 
   </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>====
 +
{| border=1 cellspacing=0 cellpadding=3 align=center
 +
|-
 +
!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>.
 +
|-
 +
| <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>

Revision as of 22:10, 2 July 2007

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

DRAFT v2. 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 coming (and 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 coming (and below...)

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>