This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
gamedev:deigde:editors:rig [2019/05/08 22:28] – dragonlord | gamedev:deigde:editors:rig [2020/04/04 15:40] – [Push] dragonlord | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{tag>deigde | + | {{tag>igde editor rig collision}} |
<WRAP youarehere> | <WRAP youarehere> | ||
- | [[: | + | [[: |
</ | </ | ||
- | ====== Rig Editor ====== | + | ====== |
- | The rig editor allows to create rig resources for your game. Rigs are used for [[gamedev: | + | |
+ | The rig editor allows to create rig resources for your game (*.derig or else depending on used modules). Rigs are used for [[gamedev: | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Rigs can contain these elements: | ||
+ | * Rig shapes (entire rig) | ||
+ | * Bone shapes (bone only) | ||
+ | * Bone constraints (between bones) | ||
+ | |||
+ | Rigs can be used in different configurations depending on what kind of [[gamedev: | ||
+ | |||
+ | Using //Volume Colliders// only rig shapes can be used. //Rig Colliders// or //Component Colliders// bone shapes and constraints can be used too. | ||
+ | |||
+ | If any bone shapes are present all bones without a shape do not collide and rig shapes are ignored if present. | ||
+ | |||
+ | If no bones have shapes the rig shapes are used for the entire rig. | ||
+ | |||
+ | In paticular this means a rig without any shapes is a //Ghost Rig// colliding with nothing unless //Model Collision// is enabled. | ||
+ | |||
+ | The editor window composes of the preview area and the properties panel on the left side. | ||
+ | |||
+ | ====== Preview Window ====== | ||
+ | |||
+ | The preview window shows the preview of the rig. See [[gamedev: | ||
+ | |||
+ | In addition to the regular 3d-view navigation you can activate **Physics Simulation** by pressing < | ||
+ | |||
+ | ====== Rig ====== | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | The **Root Bone** defines the bone to synchronize with the object position and orientation. This is required for rigs used with physical simulation. If missing the object position and orientation is not synchronized to any bones which causes bones to move all over the place potentially far away from the object position. For kinematic or static rigs the root bone is not used. | ||
+ | |||
+ | The **CMP** parameter defines the //Central Mass Point// of the entire rig. This is used only for rigs without any bone shapes. | ||
+ | |||
+ | If **Model Collision** is enabled all shapes (rig and bone ones) are ignored and the **Model** resource assigned to the collider is used as collision shape. This works only for //Component Colliders// with a // | ||
+ | <WRAP center round important 60%> | ||
+ | It is tempting to use model collision as default but it is discouraged. Model collision is usually complex to calculate causing performance drops if used heavily. Try using //Shapes// whenever possible to get the best performance. If you have to use //Convex Decomposition Tools// and assign them as //Hull Shapes//. This is way faster and more stable than model collisions. | ||
+ | </ | ||
+ | |||
+ | If **Dynamic** is enabled the rig can be used for physical simulation. If this parameter is disabled colliders using this rig will always be animated kinematic even if set to dynamic. | ||
+ | |||
+ | <WRAP clear/> | ||
+ | |||
+ | ====== Bone ====== | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Shows parameters of the selected bone. To select bones switch to the //Bone// selection mode in the //Edit// menu. | ||
+ | |||
+ | The **Name** is the unique name of the bone. //Model//, // | ||
+ | |||
+ | The **Parent** is the name of the parent bone. Bone loops are not allowed since bones are organized in a tree like structure. Root bones have no parent. Multiple root bones are possible but for physical simulation only one can be assigned as the rig root bone. | ||
+ | |||
+ | The **Position** and **Rotation** are relative to the parent bone or the rig if no parent bone is set. | ||
+ | |||
+ | The **CMP** is the //Central Mass Point// of the rig. | ||
+ | |||
+ | The **Mass** parameter defines the mass in kg of the bone and all the matter connected to it. All bone mass summed together is the rig mass and thus the collider mass. | ||
+ | <WRAP center round tip 60%> | ||
+ | The best workflow is to set the mass of the bones using a virtual mass like "1 unit" or "5 units" | ||
+ | </ | ||
+ | <WRAP center round tip 60%> | ||
+ | If you do not want to figure out individual bone mass for the first step you can use //Bone -> Mass from Volume// menu command. This will calculate bone volumes from the //Model// resources. You can then specify a scaling factor. The mass assigned to the bone is the calculated volume times this factor. | ||
+ | </ | ||
+ | |||
+ | Activate the **Dynamic** parameter if this bone has to be simulated using physics. This parameter has no effect if the rig itself is not set dynamic. Dynamic and non-dynamic bones can be combined in the same rig. Be careful using non-dynamic bones parented to dynamic bones. The results might not be what you expect. Using dynamic bones on non-dynamic parents is usually safe to do. | ||
+ | <WRAP clear/> | ||
+ | |||
+ | ====== Shape ====== | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Each bone can have one or more [[gamedev: | ||
+ | |||
+ | The content of the panel depends on the [[gamedev: | ||
+ | |||
+ | The **Parent** is read-only and shows the parent bone of the shape. If this value is empty the shape belongs to the rig itself. | ||
+ | |||
+ | The **Property** parameter allows to assign a game specific custom property value to the bone shape. This can be used to add per-shape information which can be used during collisions. | ||
+ | <WRAP center round tip 60%> | ||
+ | Although this field can contain any kind of value it is recommended to store here a game specific // | ||
+ | </ | ||
+ | <WRAP clear/> | ||
+ | |||
+ | ====== Constraints ====== | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Each bone can have one or more // | ||
+ | |||
+ | <WRAP center round tip 60%> | ||
+ | You can also add constraints to rig. These are only for testing purpose for example to simulate a game script adding a run-time constraint to a rig. This can be used for example to test hinging a door to the game world. | ||
+ | </ | ||
+ | |||
+ | |||
+ | // | ||
+ | |||
+ | The **Parent** is read-only and shows the parent bone of the constraint. If this value is empty the constraint belongs to the rig itself. | ||
+ | |||
+ | The **Target** parameter set the target bone of the constraint. If this value is empty the constraint is attached to the game world. | ||
+ | |||
+ | The **Position** and **Rotation** parameter define the position and orientation of the // | ||
+ | |||
+ | The **Offset** parameter defines an optional offset applied to the // | ||
+ | |||
+ | |||
+ | //**DOF Linear/ | ||
+ | |||
+ | Defines the linear and angular //Degrees of freedom// for each axis. | ||
+ | |||
+ | The **Range** parameter defines the //Minimum// and //Maximum// value allowed for the degree of freedom. If the maximum value is equal or less than the minimum value the degree of freedom is locked. | ||
+ | |||
+ | The **Friction** parameter defines the //Friction Forces// in //Nm//. The first value is the **Static Friction Force**. This is the threshold force before the constraint starts moving. Once moving this force is not more applied. The second value is the **Kinematic Friction Force**. This force is applied only if the constraint is moving. | ||
+ | |||
+ | The **Stiffness** parameter defines the //Spring Stiffness// in //Nm//. A value of 0 disabled spring behavior. Values larger 0 apply a retraction force towards the original position depending on the displacement of the constraint from the center position. | ||
+ | |||
+ | |||
+ | // | ||
+ | |||
+ | Applies **Linear**, **Angular** or **Sprint** damping to the forces acting on the constraint. Damping is a percentage value indicating how much force is destroyed by the damping. A value of 0 applies no damping while a value of 1 destroys all energy literally preventing constraint from moving at all. | ||
+ | |||
+ | |||
+ | // | ||
+ | |||
+ | If **Use Rope Physics** is enabled the physics module treats the constraint as a //Rope Constraint// | ||
+ | |||
+ | |||
+ | // | ||
+ | |||
+ | The **Breaking** parameter defines the amount of impulse (Ns) that has to apply on a constraint before it breaks. A broken constraint is disabled and can be enabled again. If the value is zero the constraint never breaks. | ||
+ | <WRAP clear/> | ||
+ | |||
+ | ====== Push ====== | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | You can add //Pushes// to simulate impulses applied to a rig at the beginning of // | ||
+ | |||
+ | The **Type** parameter indicates what kind of push to apply. Supported are **Simple Push** and **Explosion**. Simple push applies a single impulse to the rig at the start of a simulation run. Explosion push applies a bunch of impulse at the same time spread along a cone. | ||
+ | |||
+ | The **Position** and **Orientation** define the position where the push is applied and the direction of the push. | ||
+ | |||
+ | The **Impulse** defines the amount of impulse in Ns to apply. If explosion type is used the impulse is evenly distributed across all applied impulses. | ||
+ | |||
+ | The **Ray Count** defines the count of rays to use for explosion type push. | ||
+ | |||
+ | The **Cone Angle** defines the angle in degrees of the cone to use for explosion type push. Rays are evenly distributed across the cone. | ||
+ | <WRAP clear/> | ||
+ | |||
+ | ====== View ====== | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | The **Resources** panel defines the **Model**, **Skin** and **Animation** resource to use to preview the rig. Without a model no // | ||
+ | |||
+ | The **Animation Move** panel defines the animation move to play. Requires an // | ||
+ | |||
+ | The **Physics** panel defines the **World Gravity** and **Local Gravity** to use. World gravity applies to the bones in the rig while local gravity applies to the preview component itself. The **Slowmotion** parameters defines the update speed of the simulation and allows to examine physical behavior in closer detail to spot problems. | ||
+ | |||
+ | The **Sky** panel defines the **Sky** resource to use in the preview view. | ||
+ | |||
+ | The **Environment Object** panel defines the **Object Class** to use as environment the rig is previewed in. | ||
+ | |||
+ | The **Camera** panel shows the parameters of the camera in the preview view. The values can be manually edited. | ||
+ | |||
+ | The **Camera Attaching** panel allows to attach the preview view camera to bones in the rig. | ||
+ | <WRAP clear/> | ||
===== Preview Video ===== | ===== Preview Video ===== | ||
https:// | https:// |