User Tools

Site Tools


tools:rigeditor

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
tools:rigeditor [2008/04/28 00:13] dragonlordtools:rigeditor [2012/12/01 18:02] (current) – removed dragonlord
Line 1: Line 1:
-====== Rig Editor ====== 
-The rig editor allows users to edit the rig resources. Rigs are required for various actions: Components use them to deform a Model, Animators use them to calculate animations and Colliders use them to drive physics. All in all a rig composes of a tree shape list of bones. Every bone has at most one parent. For Components and Animators the bones alone are enough to render and animate characters. The bone setup is best done using a 3D application like Blender3D. The export script produces a *.rig.xml file with the proper bone structure. Colliders on the other hand use more complex informations about a rig like the collision shape of bones as well as physical properties. These shapes and properties are not exported by the export script since they are difficult to create in a 3D application and are tied closely to the physics system of the engine. Therefore an editor exists allowing the editing of shapes and physics properties from rig resources as well as testing them in real time. 
  
-All angles in the editor are measured in degrees. The editor uses a game definition file to locate the rig resources. Place rig resources in the data directory of the game you wish to create or edit resources for. The editor is not going to show you files outside the data directory. Furthermore the rig uses the Rig Modules installed in the game engine to load and save rigs. Therefore you can edit and rig file for any game right of the bat without having to install new modules ( modules are required to be able to load and save at the same time so if it loads in the game you can also save it ). 
- 
-//Rig Editor in action//:\\ 
-{{:tools:rigeditor_action.png|Rig editor in action}} 
- 
-====== Collision Shapes ====== 
-With the editor a user can edit the collision shapes for the entire rig or individual bones. Props having no bones at all use the rig collision shapes. Use the Rig menu to add/remove shapes for the entire rig. Rigs without a bone are best used for rigid objects and props. Characters or machinery with moving parts use bones. Defining a shape for a bone turns this bone into a self sustained physics object during the game. To avoid all limbs or parts of a machine to bounce all around the place use constraints to hold the parts together. Rig shapes always overwrite bone shapes so do not mix them. The properties of the active shape are listed in the "Shape" tab. Physics informations are listed in the "Rig" and "Bone" tab. These properties here are the basic physics properties. The way the engine handles physics the complex and important properties are handles during run time by your game scripts. This gives you full control over the physics. 
- 
-There exist 4 analytic shapes you can use: Sphere, Box, Cylinder and Capsule. See [[gamedev:shapes|Shapes]] for an in depth discussion of the individual shapes. You can add as many shapes as you want to a rig or bone. The final collision shape is the sum of all shapes together ( meaning all the space occupied by any of the defined shapes ). Usually for bones you use only one or two shapes whereas for an entire rig often more than one shape is used. Analytic shapes are very fast but still using only the number of shapes you need to approximate the over all shape well is recommended. 
- 
-The bone structure is showed in the editor using bluish arrows starting at the bone origin and pointing into the Z-Direction of the bone. Shapes are only shown for the selected bones unless you enable the option to show all bones. Rig shapes can also be hidden if required. This avoids cluttering the view and allows to work on individual bone shapes easily and precisely. 
- 
-It is possible to use a triangle mesh as collision mesh instead of an analytic shape. Triangle meshes are though a lot slower than analytic meshes and should only be used if there is no other way. The editor does not support creating triangle meshes to be used as collision meshes. The export script is responsible for this kind of task. 
- 
-====== Constraints ====== 
-Constraints hold individual bones in a given relationship to each other. By default each bone is a collision object on its own which is related to the main collider used in the game but otherwise unbound to all other bones in the same rig. Adding constraints holds together objects and produces a useful rig. The two objects being part of a constraint do not collide with each other anymore. Use the right constraint parameters to produce a correct behavior. Constraints added to a bone constraint this bone to another one you can choose freely. Upon adding a constraint the other bone is assumed to be the parent of the bone you add the constraint to. 
- 
-There exists various different constraints in physics packages. To create a simple to use interface the Drag[en]gine uses only one constraint type the so called 6-Dof Constraint. 6-Dof stands for 6 degrees of freedom. These degrees of freedom are the 3 linear degrees ( translation along X, Y and Z ) and the 3 angular degrees ( rotation around X, Y and Z ). Using this constraint all kinds of rigid constraints can be modeled. Furthermore for a constraint you define the coordinate system to use. This is important for the constraint to work properly. To define the coordinate system you specify the position and rotation. Arrows in the editor show the coordinate system for you. The limits define the type of a degree of freedom. There are three types: locked, limited and free. If the upper and lower limits are the same the degree of freedom is locked. If the upper limit is larger than the lower limit the degree of freedom is limited and prevents the bones to move or rotate outside the given range. If the upper limit is less than the lower limit the degree of freedom is free or unlimited. In this case the bones are free to move or rotate. 
- 
-You can also add constraints for the rig itself. These constraints are not saved along the rig resource and only exist to allow the user to test the rig. For a door for example you can add a rig constraint limiting the door to a world point to test how it would behave in-game afterwards. Rig constraints work the same as bone constraints but the other bone you enter defines at which rig bone you attach the constraint to. 
- 
-Constraints also show only for the selected bones. Again you can choose to show all bone constraints. The rig constraints can also be hidden. This keeps the view clean and easy to work on specific constraints. Constraints are shown as dark purple arrows starting at the origin of their coordinate system pointing to the central mass point of the bone owning the constraint. 
- 
-====== Pushes ====== 
-For simulating the behavior of a rig it is often useful to apply a push to a certain point of a rig to verify the behavior. For this purpose pushes can be added. They are not stored along the rig resource and exist only for testing the rig. Once added you can define the point and direction of a single push including the strength of the push. All these parameters can be set in the "Push" tab. As soon as the simulation starts the push is applied to the rig. 
- 
-Pushes are shown as light green arrows. The push is applied on the tip of the arrow and in the direction of the arrow. 
- 
-====== Simulation ====== 
-The editor allows to simulate the rig using the game engine. Once you start the simulation the physics module takes over and simulated the rig under the influence of gravity. For testing you can specify various properties. For one you can set the gravity of the world. Furthermore you can load a Terrain Mesh and position it around the model. This allows to examine the interaction of the rig with the ground or other constructions. Outside the simulation you can use an animation resource to pose the rig into different frames of an animation. This way you can check the shapes under different conditions. You can edit the shapes any time even in posed mode. Once the simulation starts the current pose is used. This can be used to simulate the physics taking over at different frames of an animation. Once the simulation is stopped the pose right before the simulation started is restored. 
- 
-====== Links ====== 
-  * [[gamedev:main|Game Development Informations]] 
-  * [[:start|Main page]] 
tools/rigeditor.1209341607.txt.gz · Last modified: 2008/04/28 00:13 by dragonlord