Physics material OpenCOLLADA extension

From COLLADA Public Wiki
Jump to: navigation, search
Extension information
This article is part of the COLLADA extensions directory
Adding to the extensions directory

<physics_material>/<extra>/<technique profile="PhysX_3.x"> Element

Specification Version: 1.4.1
Category: (Physics) Physics Model

Introduction

When 2 Physics objects collide, engine must determine what are the material properties involved in that collision. COLLADA does not specify how to choose properties between the two involved materials.
PhysX supports different ways to combine two sets of material parameters: mul, min, max, or average.
Related Elements
Affected Parent element(s) <physics_material>
Extra and/or Technique <extra>/<technique profile=”PhysX_3.x”>
Child elements See following section
Child Elements
Name Description Default Occurrences
<px_material> Extension’s root element. N/A 0 or 1

Child Elements for px_material

Child elements must appear in the following order if present:
Name Description Default Occurrences
<friction_combine_mode> Specifies how to combine material frictions. Can be one of AVERAGE, MIN, MULTIPLY, MAX. AVERAGE 0 or 1
<restitution_combine_mode> Specifies how to combine material restitutions. Can be one of AVERAGE, MIN, MULTIPLY, MAX. AVERAGE 0 or 1

Example

   <physics_material id="pCube2RigidBody1_material" name=”optional”>
       <technique_common>
           <restitution>0.6</restitution>
           <dynamic_friction>0.2</dynamic_friction>
           <static_friction>0.2</static_friction>
       </technique_common>
       <extra>
           <technique profile="PhysX_3.x">
               <px_material>
                   <friction_combine_mode>AVERAGE</friction_combine_mode>
                   <restitution_combine_mode>MIN</restitution_combine_mode>
               </px_material>
           </technique>
       </extra>
   </physics_material>