User Tools

Site Tools


formats:modules:derigxml:xml_rig_file_.rig.xml

This is an old revision of the document!


Table of Contents

The rig file format is recognized by the 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

  • rig
    • comments
    • bone
      • name
      • position
        • x, y, z
      • rotation
        • x, y, z
      • centralMassPoint
        • x, y, z
      • mass
      • dynamic
      • parent
      • <shapes>
    • <shapes>

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

TagDescriptionRequiredOccuranceDefault
rigDefines the properties of the entire rig.yesonce-
commentsComments about the file, the author, credits and other things.noonce<empty>
boneDefines a bone in the rig. Order is not important since the engine determines the correct links between the rig bones. Just do never produce loops as this is going to make the file fail upon loading.nomultiple-
bone.nameDefines the unique name of the bone. Has to be the first tag.yesonce-
positionDefines the position of a bone.noonce(0,0,0)
x,y,zDefines the x, y or z value of various vector type tags.noonce-
rotationDefines the rotation of a bone. Rotation is counter clockwise for all axes and is measured in degrees.noonce(0,0,0)
centralMassPointDefines the location of the central mass point of the the rig or bone.noonce(0,0,0)
massDefines the mass in kg of the entire rig or a bone.noonce0
dynamicDefines if the rig or bone is kinematic or dynamic. If dynamic it is subject to physics simulation. If kinematic it is driven by user specified linear and angular velocities. Kinematic is best used for rigs which have animations applied. Value is “true” if dynamic behavior is required or “false” otherwise.nooncefalse
parentDefines the parent bone. If empty the bone has no parent. Otherwise the name of a bone has to be specified. Do not create loops or the loading fails.noonce<empty>
sphereDefines a sphere shape.nomultiple-
sphere.positionPosition of the sphere shape.noonce(0,0,0)
sphere.radiusRadius of the sphere shape.noonce1
boxDefines a box shape.nomultiple-
box.positionPosition of the box shape.noonce(0,0,0)
box.rotationRotation of the shape. Rotation is counter clockwise for all axes and is measured in degrees.noonce(0,0,0)
box.halfExtendsHalf extends of the box shape. This is not the entire size of the box but half the size.noonce(0.5,0.5,0.5)
cylinderDefines a cylinder shape. The cylinder is oriented along the Y axis and has a top and a bottom radius. For a uniform cylinder both are the same.nomultiple-
cylinder.positionPosition of the cylinder shape.noonce(0,0,0)
cylinder.rotationRotation of the cylinder shape. Rotation is counter clockwise for all axes and is measured in degrees.noonce(0,0,0)
cylinder.halfHeightHalf height of the cylinder. This is half the length of the top part of the cylinder to the bottom part.noonce0.5
cylinder.topRadiusRadius of the top part of the cylinder.noonce0.5
cylinder.bottomRadiusRadius of the bottom part of the cylinder.noonce0.5
cylinder.radiusShortcut to define the top and bottom radius of the cylinder to the same value.noonce0.5
capsuleDefines a capsule shape. The capsule is oriented along the Y axis and has a top and a bottom radius. For a uniform capsule both are the same.nomultiple-
capsule.positionPosition of the capsule shape.noonce(0,0,0)
capsule.rotationRotation of the capsule shape. Rotation is counter clockwise for all axes and is measured in degrees.noonce(0,0,0)
capsule.halfHeightHalf height of the capsule. This is half the length of the top sphere center of the cylinder to the bottom one.noonce0.5
capsule.topRadiusRadius of the top part of the capsule.noonce0.5
capsule.bottomRadiusRadius of the bottom part of the capsule.noonce0.5
capsule.radiusShortcut to define the top and bottom radius of the capsule to the same value.noonce0.5

Sample file

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE rig SYSTEM "DragengineRig.dtd">
<rig>
	<comment>A test rig by RPTD (roland@rptd.ch)</comment>
 
	<bone>
		<name>rootBone</name>
		<position>
			<x>0</x> <y>0</y> <z>0</z>
		</position>
		<rotation>
			<x>0</x> <y>0</y> <z>0</z>
		</rotation>
		<centralMassPoint>
			<x>0</x> <y>0.2</y> <z>0</z>
		</centralMassPoint>
		<box>
			<position>
				<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>
		<mass>5.5</mass>
		<dynamic>true</dynamic>
	</bone>
 
	<bone>
		<name>childBone</name>
		<parent>rootBone</parent>
		<position>
			<x>0</x> <y>0.6</y> <z>0</z>
		</position>
		<rotation>
			<x>0</x> <y>0</y> <z>0</z>
		</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>
		<dynamic>true</dynamic>
	</bone>
 
</rig>
You could leave a comment if you were logged in.
formats/modules/derigxml/xml_rig_file_.rig.xml.1557354731.txt.gz · Last modified: 2019/05/08 22:32 by dragonlord