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 [2020/03/30 09:57] – [Foreign State] dragonlordgamedev:animators [2024/04/01 15:46] (current) – [Rule] dragonlord
Line 20: Line 20:
  
 ===== Controller ===== ===== Controller =====
-Controllers provide the connection between the animation logic and the animation production. The game developer uses in his game a given set of variables to track the state of an actor for example. The idea is to allow the game developer to map these variables directly to the animation system not having to worry about converting them into whatever system one might use. This is done using the controllers which act as dial knobs the game developer can mock around with like on a mixer. Each controller has a minimum and maximum value. The current value of the controller is always kept inside this boundary. The game developer can set here the limits of the values he uses in his variables. He is not required to normalize or otherwise apply fancy math to the values in his game to match them with the animation system. It's the animator system that adapts to the game developer. Controllers can either clamp or wrap values outside the limits. Clamping is typically used for controllers attached to actions like raising or lowering the head where you want the motion to stop at the extreme points. Wrapping on the other hand is used if the controller is incremented with respect to the elapsed time. Hence using clamping an animation would stop at the end while with wrapping it would loop forever. The game developer is responsible to increment the value of a controller if it is supposed to be driven by the elapsed time. This can be done easily using an increment function which does all the clamping or wrapping for you. In addition controllers can be frozen which prevents their current value from changing. This way the game designer is not required to keep track in his game when to manipulate a controller and when to spare it. On a frozen controller all methods intended to change the value will be silently ignored. It is fully valid to call such methods on a frozen controller. The controller normalizes the current value itself. A particularity about the controllers is that they own in addition to the single value also a 4-component vector value. This value is used by specific rules and is neither clamped nor altered. The order of the controllers is important since they are referenced by their index later on.+Controllers provide the connection between the animation logic and the animation production. The game developer uses in his game a given set of variables to track the state of an actor for example. The idea is to allow the game developer to map these variables directly to the animation system not having to worry about converting them into whatever system one might use. This is done using the controllers which act as dial knobs the game developer can mock around with like on a mixer. 
 + 
 +Each controller has a minimum and maximum value. The current value of the controller is always kept inside this boundary. The game developer can set here the limits of the values he uses in his variables. He is not required to normalize or otherwise apply fancy math to the values in his game to match them with the animation system. It's the animator system that adapts to the game developer. Controllers can either clamp or wrap values outside the limits. 
 + 
 +Clamping is typically used for controllers attached to actions like raising or lowering the head where you want the motion to stop at the extreme points. Wrapping on the other hand is used if the controller is incremented with respect to the elapsed time. Hence using clamping an animation would stop at the end while with wrapping it would loop forever. The game developer is responsible to increment the value of a controller if it is supposed to be driven by the elapsed time. This can be done easily using an increment function which does all the clamping or wrapping for you. 
 + 
 +In addition controllers can be frozen which prevents their current value from changing. This way the game designer is not required to keep track in his game when to manipulate a controller and when to spare it. On a frozen controller all methods intended to change the value will be silently ignored. It is fully valid to call such methods on a frozen controller. The controller normalizes the current value itself. 
 + 
 +A particularity about the controllers is that they own in addition to the single value also a 4-component vector value. This value is used by specific rules and is neither clamped nor altered. 
 + 
 +The order of the controllers is not important since they are referenced by their name later on. It is also possible to refer to them by index for specific use cases.
  
 ===== Link ===== ===== Link =====
-Controllers deliver a linear and normalized value. This is though not always the desired result. For example an animation sequence could be desire to have full influence for a controller value or 0 decreasing linearly down to no influence at the point 0.5  while staying at no influence up to the value 1. Links take on the duty to map controller values to actual weight values which can be consumed by rules later on. A link consist of a piecewise linear curve which maps incoming controller values ( x coordinate ) to weight values ( y coordinate ). Furthermore the source controller is indicated using the index of the controller ( for speed and handling reasons not a pointer ). A link is valid if the source controller is a valid index of a controller otherwise it is an empty link. Vector values of controllers are not altered by the mapping curve in any ways and are handed to the target as they are. The order of links is important since they are referenced by their index later on.+Controllers deliver a linear and normalized value. This is though not always the desired result. For example an animation sequence could be desire to have full influence for a controller value or 0 decreasing linearly down to no influence at the point 0.5  while staying at no influence up to the value 1. Links take on the duty to map controller values to actual weight values which can be consumed by rules later on. 
 + 
 +A link consist of a piecewise linear curve which maps incoming controller values (x coordinate) to weight values (y coordinate). Furthermore the source controller is indicated using the index of the controller (for speed and handling reasons not a pointer). 
 + 
 +A link is valid if the source controller is a valid index of a controller otherwise it is an empty link. 
 + 
 +Vector values of controllers are not altered by the mapping curve in any ways and are handed to the target as they are. The order of links is important since they are referenced by their index later on.
  
 ===== Target ===== ===== Target =====
Line 29: Line 45:
  
 ====== Rule ====== ====== Rule ======
-Rules provide the production rules for an animation. There exist various rules each belonging to one of the three animation types. All rules together have common properties. Each rule can be enabled and disabled individually which allows to modify the animation production process without altering the rules itself ( which is faster ). The result of each rule is blended with the existing animation state using the source and destination blend factor. The rule animation state is multiplied with the source factor and added to the existing animation state multiplied by the destination factor. For both the blend factors there exists an appropriate target. This can be used to alter the influence strength of a rule which is useful to gradually blend in animations ( for example an idle animation or typically used on inverse kinematic rules to avoid jumping ). By default the source factor is set to 1 and the destination factor to 0. A typical setting is 1 for both in which case the animation state of the rule is added to the existing one ( used for doing parametric animation setups ). In addition each rule has a list of bones. This list indicates which bones are affected by this rule and can be used to apply rules only to subsets of a character ( for example torso and legs separately ). If the bone list is empty this equals to the rule influencing all bones. The order of rules is important since they are applied in the order they are specified. The following list contains all existing rules.+Rules provide the production rules for an animation. There exist various rules each belonging to one of the three animation types. All rules together have common properties. 
 + 
 +Each rule can be enabled and disabled individually which allows to modify the animation production process without altering the rules itself (which is faster). 
 + 
 +The result of each rule is blended with the existing animation state using the source and destination blend factor. The rule animation state is multiplied with the source factor and added to the existing animation state multiplied by the destination factor. For both the blend factors there exists an appropriate target. This can be used to alter the influence strength of a rule which is useful to gradually blend in animations (for example an idle animation or typically used on inverse kinematic rules to avoid jumping). By default the source factor is set to 1 and the destination factor to 0. A typical setting is 1 for both in which case the animation state of the rule is added to the existing one (used for doing parametric animation setups). 
 + 
 +Each rule has a list of bones. This list indicates which bones are affected by this rule and can be used to apply rules only to subsets of a character (for example torso and legs separately). If the bone list is empty this equals to the rule influencing all bones. 
 + 
 +Each rule has a list of vertex position sets (aka "blend shapes", "morph shapes" or similar names). This list indicates which vertex position sets are affected by this rule and can be used to apply rules only to subsets of a character (for example certain mouth shapes). If the vertex position set list is empty this equals to the rule influencing all vertex position sets. 
 + 
 +The order of rules is important since they are applied in the order they are specified. The following list contains all existing rules.
  
 ===== Animation ===== ===== Animation =====
gamedev/animators.1585562240.txt.gz · Last modified: 2020/03/30 09:57 by dragonlord