当前位置:网站首页>Animation_ IK overview
Animation_ IK overview
2022-07-03 08:25:00 【_ lazycat】
0. Write it at the front
This article is a collection of personal learning notes , If there is a mistake , I hope you can point out .
1. TwoBoneIK
Limit IK The bone chain of can only have 2 Root bone and a joint (2 Not available above root ), Under such restrictions , Geometry (TwoBoneIK) Is the best solution .
Solver goals : Calculate the angle of each joint through the cosine theorem
1. Derivation process
2. Exclude the situation that the target cannot be reached
|L1-L2|≤LT≤L1+L2
among L1 and L2 Is the length of two bones ,LT yes Target To Base Distance of
The two distances must satisfy the above inequality
3. Feasible solution is not unique
A two-dimensional : Two solutions can be found , And it is symmetrical with respect to the vector pointing to the target position of the starting joint point . You can exclude an illegal solution by constraining the rotation angle of the joint .
The three dimensional : In order to ( The vector from the starting joint point to the target position ) Is the feasible solution on the specific circle of the axis , There are countless solutions .UE4 Is to specify a reference plane through the outside , To determine a unique solution .
4.UE4 Of TwoBoneIK
( The picture is quoted from references [1])
- Effector Location: designated Target Location
- DistDir: Point from the starting position Target Vector of position , And you can get the length directly dist
- Joint Target Location: A vertex of external input , Is the key , It is used to fix the parameters of one solution among countless solutions in three-dimensional space .
- JointBlendDir: be located Joint Target Location( Specify a point ),RootPos( Joint starting point ) and EffectorLocation( Destination ) A plane composed of three points , And perpendicular to DistDir Unit vector .
Because the end position and start position are fixed , Just ask for the position of the middle joint
cos(y) = (a^2 + dist^2 - b^2) / (2 * a * dist); ===>> Cosine theorem finds the rotation angle of the first joint , That is to say cos(θ1-θr)
f = a * sin(y); ===>> seek f The length of , Used to calculate the projection distance later
ProjDist = FMath::Sqrt(a^2 - f^2); ===>> Pythagorean theorem a stay DistDir Projection distance on
OutJointPos = RootPos + (ProjDist *DistDir) + (f * JointBlendDir); ===>> Finally, add the position of the starting point of the joint through the vector , Get the final required position of the middle joint .
2. FABRIK
FABRIK: Forward and backward arrival IK(Forward and Backward Reaching Inverse Kinematics)
Support multiple bones IK, But it mainly controls the position of bones , Not responsible for controlling the rotation of bones
By traversing the bone chain forward and backward, the position of the bone converges to the solution ( Maybe not the best , Determined by the number of iterations and accuracy )
1. Solution idea
- First calculate the length of the whole bone chain , Judge whether the target point can be reached , If you can't reach , Requires the root bone to move .
- Start with the end bone , Take down the bones directly , Put the end effector in Target Target location , And both ends of this bone , And the ends of the remaining bones with Target The connecting line of should be in the same straight line .
- Remove the remaining bones in turn , And in accordance with the 1 Rules to place the removed bones .
- When 1~2 After all the steps are executed ( This is the forward traversal arrival (Forward Reaching)), To the original Target The position is the starting position of the bone chain , primary Base Set to Target Location , Re execution 1~2 Step , This is the backward traversal arrival (Backward Reaching)
- repeat 1~3 Step , Until the end effector reaches a certain threshold of the target point , Or the number of iterations (UE4 The default is 10) stop it .
, All the way to Root node
- Then start the cycle from the first node
4. Jacobia IK
TODO
5. Fullbody IK
TODO
6. Reference material
[1] https://zhuanlan.zhihu.com/p/41425611
[2] https://blog.csdn.net/noahzuo/article/details/80188366
边栏推荐
- VIM learning notes from introduction to silk skating
- Base64 and base64url
- Jupyter remote server configuration and server startup
- Xlua task list youyou
- KunlunBase MeetUP 等您来!
- Simply start with the essence and principle of SOM neural network
- Easy touch plug-in
- 数据分析练习题
- Solution détaillée de toutes les formules de fonction de transfert (fonction d'activation) du réseau neuronal MATLAB
- Introduction to Base64 coding
猜你喜欢
简易入手《SOM神经网络》的本质与原理
Base64编码简介
C language - Introduction - essence Edition - take you into programming (I)
Editor Extensions
Easy touch plug-in
P1596 [USACO10OCT]Lake Counting S
How to establish rectangular coordinate system in space
Shader foundation 01
Un système de gestion de centre commercial pour la conception de cours de technologie d'application de base de données
Unity change default editor
随机推荐
Unity4.3.1 engine source code compilation process
C language - Introduction - essence Edition - take you into programming (I)
Abstract classes and interfaces
Chocolate installation
Pit & ADB wireless debugging of vivo real machine debugging
Mall management system of database application technology course design
P2622 light off problem II (state compression search)
Introduction to Base64 coding
What does (+) in Oracle mean
Unity change default editor
unity2019_ Input management
Xlua task list youyou
Conversion between string and int types in golang
String class
Simply start with the essence and principle of SOM neural network
redis集群系列四
UE4 plug in development
Youyou1 of xlua knapsack system
Un système de gestion de centre commercial pour la conception de cours de technologie d'application de base de données
Ilruntime learning - start from scratch