Particle forces FCOLLADA extension

From COLLADA Public Wiki
Revision as of 19:51, 6 August 2007 by Glaforte (talk | contribs) (Created page, draft v1)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
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 forces extension

DRAFT v1. This extension describes the additional parameters added to the physics' <force_field> definition, in order to support particle systems.


FCollada currently support five types of particle forces: <force_deflector>, <force_drag>, <force_gravity>, <force_pbomb> and <force_wind>. Each type of force is described in more details in the sub-sections below. Each <force_field> element may contain one or zero force(s). The forces are used to move or accelerate the particles in different fashion, depending on their position and, in some cases, the orientation and position of the force field.


<force_deflector>

Described as a surface, the deflector effectively bounces the particles away. Just like a mesh, the deflector is placed and oriented using the transform of the scene node where the force field is instanced.


Element Attributes Description
<form> Contains one enumerated type with the following token values: PLANAR or SPHERICAL. A PLANAR deflector describes a bounded-plane that the particles cannot traverse. A SPHERICAL deflector describes a sphere that the particles cannot traverse.
<bounce> sid Contains one floating-point value: the bounce factor for particles that hit the deflector. A bounce factor of 1.0 will fully reflect the particle away from the deflector. A bounce factor smaller than 1.0 means that the particle loose some of its force when hitting the deflector. A bounce factor or 0.0 means that the particle sticks to the deflector.
<diameter> sid Contains one floating-point value: the diameter of the sphere. This parameter is only used for the SPHERICAL form. The sid attribute can be used to animate this parameter.
<width> sid Contains one floating-point value: the width of the plane. This parameter is only used for the PLANAR form. The sid attribute can be used to animate this parameter.
<length> sid Contains one floating-point value: the length of the plane. This parameter is only used for the PLANAR form. The sid attribute can be used to animate this parameter.

In local-space, the PLANAR geometry is therefore centered around the origin and has vertices at (+/- width/2, +/- length/2, 0.0). Its normal points in the positive-Z axis.


<force_gravity>

The simplest of the force fields: the gravity force will influence the velocity of particles in order to move them in a specific direction or towards a given point.


Element Attributes Description
<form> Contains one enumerated type with the following token values: PLANAR or SPHERICAL.

PLANAR indicated directional gravity, oriented using the transformation of the force field node. In local-space, the PLANAR gravity points in the positive-Z axis. SPHERICAL gravity is used to accelerate objects towards a given point. The position of the gravity well is the world-space translation of the node where the force field is instanced.

<strength> sid Contains one floating-point value: the constant strength of the gravity force in world units/seconds squared. The sid attribute can be used to animate this parameter.

Example

A gravity force field.

 <library_force_fields>
   <force_field id="Field">
     <asset><units name="meters" meters="1.0"/></asset>
     <technique profile="FCOLLADA">
       <force_gravity>
         <form>PLANAR</form>
         <strength>-9.8</strength>
       </force_gravity>
     </technique>
   </force_field>
 </library_force_fields>