User Tools

Site Tools


gamedev:animators

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
gamedev:animators [2019/05/08 22:14] dragonlordgamedev:animators [2020/03/30 09:57] (current) – [Foreign State] dragonlord
Line 1: Line 1:
 {{tag>animator animation}} {{tag>animator animation}}
 <WRAP youarehere> <WRAP youarehere>
-[[:start|Start Page]] >> [[gamedev:main|Game Development with the Drag[en]gine]] >> **Animators and Animation**+[[:start|Start Page]] >> [[:gamedev|Game Development with the Drag[en]gine]] >> **Animators and Animation**
 </WRAP> </WRAP>
  
Line 37: Line 37:
 The animation difference rule works similar to the animation rule in that it takes frames from an animation sequence. The difference is that two frames are queried at the same time and the difference between both becomes the result of the rule. This can be used to apply an animation relative to the existing one ( for example a turret motion ). For both frames the move name and the time can be specified. The same rules apply as for the animation rule. Care has to be taken to not obtain zero quaternions which happens if both frames have the same orientation. Usually this rule is used with the source and destination blending factors 1 and 1 to add the difference to the existing animation. In this case zero quaternions are no problem. For both the leading ( the frame to take the difference from ) and the reference ( the frame to subtract from the former ) frame time there exists a target which behaves as the one in the animation rule. The animation difference rule works similar to the animation rule in that it takes frames from an animation sequence. The difference is that two frames are queried at the same time and the difference between both becomes the result of the rule. This can be used to apply an animation relative to the existing one ( for example a turret motion ). For both frames the move name and the time can be specified. The same rules apply as for the animation rule. Care has to be taken to not obtain zero quaternions which happens if both frames have the same orientation. Usually this rule is used with the source and destination blending factors 1 and 1 to add the difference to the existing animation. In this case zero quaternions are no problem. For both the leading ( the frame to take the difference from ) and the reference ( the frame to subtract from the former ) frame time there exists a target which behaves as the one in the animation rule.
  
-===== Bone Rotator ===== +===== Animation Select ===== 
-The bone rotator rule is a procedural rule which allows to rotate bones relative to a coordinate frame. This is useful to apply motions like turning the head or torso left and right ( or up and down works too depending on the character ). A minimum and maximum orientation in Euler angles has to be provided. The rotation target value determines the orientation to be picked with 0 retrieving the minimum orientation and 1 the maximum orientation ( with all other values a linear blend between the two ). By default the rotation takes place around the center of each bone ( each bone is operated on individually and independent of all others ) with the orientation of the coordinate frame equal to the one of the component. This simply rotates the bones around their position relative to the component. If bone local rotation is disabled the bones are rotated around the component center instead. Since the rotation is specified in non-clamped Euler angles you can specify rotations outside the 90 degree range without obtaining strange results.+The animation select rule works similar to the animation rule in that it takes frames from an animation sequence. The difference is that a list of animation sequences can be defined. Using the select target one animation sequence is selected from the list. 0 target value picks the first entry in the list. 1 target value picks the last entry in the list. All other entries in the list are linearly mapped. Only one animation sequence is picked. To blend multiple animation sequences use group rule with animation rules as children.haves as the one in the animation rule. 
 + 
 +===== Bone Transformator ===== 
 +The bone transformat rule is a procedural rule which allows to transform bones relative to a coordinate frame. This is useful to apply motions like turning the head or torso left and right (or up and down works too depending on the character). A minimum and maximum translation, orientation in Euler angles or scaling has to be provided. The position, rotation and size target value determines the transformation to be picked with 0 retrieving the minimum orientation and 1 the maximum orientation (with all other values a linear blend between the two). By default the transformation takes place around the center of each bone (each bone is operated on individually and independent of all others) with the orientation of the coordinate frame equal to the one of the component. This simply transforms  the bones around their position relative to the component. If bone local is disabled the bones are transformed around the component center instead. Since the rotation is specified in non-clamped Euler angles you can specify rotations outside the 90 degree range without obtaining strange results.
  
 ===== Inverse Kinematic ===== ===== Inverse Kinematic =====
Line 51: Line 54:
 ===== Foreign State ===== ===== Foreign State =====
 The foreign state rule applies the state of a specific bone to the influenced bones. This can be used to transfer a state from one bone to another. Typically these are bones which are not animated otherwise as for example attachments on clothing which are applied to an actor and should animate reasonably with it. You can determine relative to which coordinate system ( bone or component ) the state is obtained and and applied. It is possible to mix those ( for example obtaining the state relative to the component but applying it relative the the bone local coordinate system for the target bones ) but usually for both component space is used. You can specify for each attribute individually a scaling factor with which the incoming bone state is first multiplied. This scaling factor also owns a target for each attribute. Scaling can be used to weight multiple bones into a new one. For example if you have an attachment which is located halfway between two animated bones you can use two foreign state rules one for each bone scaling them by 0.5 and adding the result to obtain the final bone position. Each attribute can be enabled separately which prevents altering the appropriate attribute. The foreign state rule applies the state of a specific bone to the influenced bones. This can be used to transfer a state from one bone to another. Typically these are bones which are not animated otherwise as for example attachments on clothing which are applied to an actor and should animate reasonably with it. You can determine relative to which coordinate system ( bone or component ) the state is obtained and and applied. It is possible to mix those ( for example obtaining the state relative to the component but applying it relative the the bone local coordinate system for the target bones ) but usually for both component space is used. You can specify for each attribute individually a scaling factor with which the incoming bone state is first multiplied. This scaling factor also owns a target for each attribute. Scaling can be used to weight multiple bones into a new one. For example if you have an attachment which is located halfway between two animated bones you can use two foreign state rules one for each bone scaling them by 0.5 and adding the result to obtain the final bone position. Each attribute can be enabled separately which prevents altering the appropriate attribute.
 +
 +===== Group =====
 +The group rule applies a list of child rules. The rules can be applied using all or select mode. In all mode all rules are applied similar to how animation rules are applied in general. If the select mode is used the select target picks two children rules and blends between them linearly. A target value of 0 picks the first rule. A target value of 1 picks the last rule. All other rules are mapped linearly across the range from 0 to 1. If you want to seamlessly blend back to the first rule when approaching a target value of 1 you have to duplicate the first rule as last rule.
 +
 +===== Sub Animator =====
 +The sub animator rule applies an animator file as if the content of the file is present instead of the sub animator rule. This allows to reuse animators and simplifies creating complex animation systems. By default controllers of the sub animator are matched by name against the controllers of this animator. The controller value and vector are copied unmodified to the sub animator before running. Optionally you can define manual mapping replacing the default one.
 +
 +===== Track To =====
 +The track to rule adjusts the orientation of the affected bones to point towards a target bone.
 +
 +===== Limit =====
 +The limit rule clamps the position, orientation and scale parameters of affected bones to predefined ranges.
 +
gamedev/animators.txt · Last modified: 2020/03/30 09:57 by dragonlord