User Tools

Site Tools


formats:modules:derigxml:xml_rig_file_.rig.xml

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
formats:modules:derigxml:xml_rig_file_.rig.xml [2008/03/21 00:35] dragonlordformats:modules:derigxml:xml_rig_file_.rig.xml [2020/10/26 23:03] (current) – [Sample file] dragonlord
Line 1: Line 1:
-====== Rig File format ====== +{{tag>physics rig fileformat}} 
-The rig file format is recognized by the [[http://dragengine.rptd.ch/module.php?id=8|Rig XML Module]]. The file is an XML file with a simple structure to define a rig to be used for a component. Rigs are used for two different purpose. First they are used to deform a model using bone weighted vertices. Second they are used to define physics properties for a rig or component collider. The bones in the rig file are connected to each other forming a skeleton starting at one or more root bones. Usually only one root bone is used but depenging on the use of the rig more than one root bone can be specified. The bones are stored in the rig file in their relaxed position hence the position where they have no translation, rotation and no scaling relative to the origin of the entire rig. Physics properties can be specified for the entire rig and/or individual bones. Shapes define the individual enclosing shape for the entire rig and/or each individual bone. Shapes can be simple ( one shape ) or complex ( multiple shapes ) in which case the union of the shapes becomes the final shape.+<WRAP youarehere> 
 +[[:start|Start Page]] >> [[:gamedev|Game Development with the Drag[en]gine]] >> **Rig File Format** 
 +</WRAP>
  
 +====== Rig File Format (*.derig) ======
  
 +The rig file format is recognized by the [[http://dragengine.rptd.ch/module.php?id=8|Rig XML Module]]. The file is an XML file with a simple structure to define a rig to be used for a component. Rigs are used for two different purpose. First they are used to deform a model using bone weighted vertices. Second they are used to define physics properties for a rig or component collider. The bones in the rig file are connected to each other forming a skeleton starting at one or more root bones. Usually only one root bone is used but depenging on the use of the rig more than one root bone can be specified. The bones are stored in the rig file in their relaxed position hence the position where they have no translation, rotation and no scaling relative to the origin of the entire rig. Physics properties can be specified for the entire rig and/or individual bones. Shapes define the individual enclosing shape for the entire rig and/or each individual bone. Shapes can be simple ( one shape ) or complex ( multiple shapes ) in which case the union of the shapes becomes the final shape.
  
 +====== Structure ======
  
- 
-====== Structure ====== 
   * rig   * rig
     * comments     * comments
Line 20: Line 23:
       * dynamic       * dynamic
       * parent       * parent
-      * sphere +      * <shapes> 
-        position +    <shapes>
-          * x, y, z +
-        * radius +
-      * box +
-        * position +
-          * x, y, z +
-        * rotation +
-          * x, y, z +
-        * halfExtends +
-          * x, y, z +
-      * cylinder +
-        * position +
-          * x, y, z +
-        * rotation +
-          * x, y, z +
-        * topRadius +
-        * bottomRadius +
-      * capsule +
-        * position +
-          * x, y, z +
-        * rotation +
-          * x, y, z +
-        * topRadius +
-        * bottomRadius+
  
 +Where <shapes> can be:
 +  * sphere
 +    * position
 +      * x, y, z
 +    * radius
 +  * box
 +    * position
 +      * x, y, z
 +    * rotation
 +      * x, y, z
 +    * halfExtends
 +      * x, y, z
 +  * cylinder
 +    * position
 +      * x, y, z
 +    * rotation
 +      * x, y, z
 +    * halfHeight
 +    * topRadius
 +    * bottomRadius
 +    * radius
 +  * capsule
 +    * position
 +      * x, y, z
 +    * rotation
 +      * x, y, z
 +    * halfHeight
 +    * topRadius
 +    * bottomRadius
 +    * radius
  
 ====== Tags ====== ====== Tags ======
 +
 ^Tag^Description^Required^Occurance^Default^ ^Tag^Description^Required^Occurance^Default^
 |rig|Defines the properties of the entire rig.|yes|once|-| |rig|Defines the properties of the entire rig.|yes|once|-|
Line 70: Line 81:
 |cylinder.position|Position of the cylinder shape.|no|once|(0,0,0)| |cylinder.position|Position of the cylinder shape.|no|once|(0,0,0)|
 |cylinder.rotation|Rotation of the cylinder shape. Rotation is counter clockwise for all axes and is measured in degrees.|no|once|(0,0,0)| |cylinder.rotation|Rotation of the cylinder shape. Rotation is counter clockwise for all axes and is measured in degrees.|no|once|(0,0,0)|
 +|cylinder.halfHeight|Half height of the cylinder. This is half the length of the top part of the cylinder to the bottom part.|no|once|0.5|
 |cylinder.topRadius|Radius of the top part of the cylinder.|no|once|0.5| |cylinder.topRadius|Radius of the top part of the cylinder.|no|once|0.5|
 |cylinder.bottomRadius|Radius of the bottom part of the cylinder.|no|once|0.5| |cylinder.bottomRadius|Radius of the bottom part of the cylinder.|no|once|0.5|
Line 76: Line 88:
 |capsule.position|Position of the capsule shape.|no|once|(0,0,0)| |capsule.position|Position of the capsule shape.|no|once|(0,0,0)|
 |capsule.rotation|Rotation of the capsule shape. Rotation is counter clockwise for all axes and is measured in degrees.|no|once|(0,0,0)| |capsule.rotation|Rotation of the capsule shape. Rotation is counter clockwise for all axes and is measured in degrees.|no|once|(0,0,0)|
 +|capsule.halfHeight|Half height of the capsule. This is half the length of the top sphere center of the cylinder to the bottom one.|no|once|0.5|
 |capsule.topRadius|Radius of the top part of the capsule.|no|once|0.5| |capsule.topRadius|Radius of the top part of the capsule.|no|once|0.5|
 |capsule.bottomRadius|Radius of the bottom part of the capsule.|no|once|0.5| |capsule.bottomRadius|Radius of the bottom part of the capsule.|no|once|0.5|
 |capsule.radius|Shortcut to define the top and bottom radius of the capsule to the same value.|no|once|0.5| |capsule.radius|Shortcut to define the top and bottom radius of the capsule to the same value.|no|once|0.5|
 +
  
 ====== Sample file ====== ====== Sample file ======
 +
 <code xml><?xml version="1.0" encoding="ISO-8859-1"?> <code xml><?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE rig SYSTEM "DragengineRig.dtd"> 
 <rig> <rig>
 + <comment>A test rig by RPTD (roland@rptd.ch)</comment>
   
- <author>RPTD (roland@rptd.ch)</author> + <bone> 
-  + <name>rootBone</name> 
- <bone name="origin"+ <position
- <position x="0.0" y="0.0" z="0.0"/> + <x>0</x> <y>0</y> <z>0</z> 
- <rotation x="0.0" y="0.0" z="0.0"/> + </position
- <centralMassPoint x="0.0" y="0.2z="0.0"/>+ <rotation
 + <x>0</x> <y>0</y> <z>0</z> 
 + </rotation
 + <centralMassPoint
 + <x>0</x> <y>0.2</y> <z>0</z> 
 + </centralMassPoint>
  <box>  <box>
- <center x="0.0y="0.0z="0.0"/> + <position> 
- <halfSize x="0.2y="0.4z="0.1"/>+ <x>0</x> <y>0</y> <z>0</z
 + </position> 
 + <halfExtends> 
 + <x>0.2</x> <y>0.4</y> <z>0.1</z> 
 + </halfExtends>
  </box>  </box>
  <mass>5.5</mass>  <mass>5.5</mass>
Line 99: Line 123:
  </bone>  </bone>
   
- <bone name="head"+ <bone
- <position x="0.0" y="0.6z="0.0"/> + <name>childBone</name
- <rotation x="0.0" y="0.0" z="0.0"/> + <parent>rootBone</parent
- <parent>origin</parent+ <position
- <centralMassPoint x="0.0" y="0.75z="0.0"/> + <x>0</x> <y>0.6</y> <z>0</z> 
- <box+ </position
- <center x="0.0y="0.0z="0.0"/> + <rotation
- <halfSize x="0.1" y="0.15" z="0.08"/> + <x>0</x> <y>0</y> <z>0</z
- </box>+ </rotation
 + <centralMassPoint
 + <x>0</x> <y>0.75</y> <z>0</z
 + </centralMassPoint> 
 + <capsule
 + <position> 
 + <x>0</x> <y>0</y> <z>0</z> 
 + </position> 
 + <rotation> 
 + <x>0</x> <y>90</y> <z>0</z> 
 + </rotation> 
 + <halfHeight>0.5</halfHeight
 + <topRadius>0.1</topRadius> 
 + <bottomRadius>0.2</bottomRadius
 + </capsule>
  <mass>2.5</mass>  <mass>2.5</mass>
  <dynamic>true</dynamic>  <dynamic>true</dynamic>
Line 114: Line 152:
 </rig> </rig>
 </code> </code>
- 
-====== Links ====== 
-  * [[gamedev:main|Game Development Informations]] 
-  * [[:start|Main page]] 
formats/modules/derigxml/xml_rig_file_.rig.xml.1206059740.txt.gz · Last modified: 2008/03/21 00:35 by dragonlord