Unity awesome plug-in Final IK

What’s the use of this plug-in

animations in general games are performed by loading a skeletal animation. The action is adjusted by the animator in the 3D software to adjust the skeleton of the character at different time postures, to generate continuous animations, or to capture actions, record human actions, and finally import.

into the game engine.

Although the production process of these two methods is different, there is no big difference for the game engine in the end – the actions of the two methods are fixed and can not be changed. but in the game, this type of bone animation often can not meet the needs, such as an animation of picking up props on the ground. In the game, props are not necessarily on the ground, but on the table, At this time, we need a new method to drive the bones of the whole body to complete the “picking up” action. and this will use the final IK plug-in. this plug-in

In addition, for the combination of objects without bones, such as the mechanical arm, it can also achieve very natural action.

Why use this plug-in:

compared with unity’s own IK system, final IK is more convenient and widely used. There are many situational applications, such as action system for interacting with objects

with this plug-in, you can use a small amount of fixed animation, and on this basis, fuse IK actions to make a variety of interactive actions

FPS game is very useful for making RPG.

VR game is also a very interesting application direction: today’s first person VR game basically has no body, only one hand. If the positioning information of VR handle and VR glasses is used to drive the whole body skeleton of the players in the game, it can almost synchronize the actions of the players in reality. Once it is realized, it will greatly improve the sense of substitution

Final IK details:

1. Aim IK: set a goal, and the end of the joint always faces the goal. It is generally used to face the head

Steps:

a. Add an aim empty object at the model head node and reset it

b. Add aim IK component to the model, and fill in aim transform and 4 joints from root spine to head (weight can be set)

c. Create a target directly in front of your face

d. Add an empty object pin to the model, and the position is consistent with the target

e. Add aim boxing script to target with model object and pin as parameters

f. Moving the target after running, the face of the model drives the upper body and always faces the target

2. Biped IK: one more head IK control than unity’s own IK

3. Full body biped IK: the enhanced version above controls more parts (elbow, shoulder, waist, knee, crotch, etc.)

Steps:

a. Add the component script to the model

b. Fill in root node

c. If you want to control an IK, you need to increase the weight. At run time, a cubic controller appears, through which you can control the corresponding IK

d. Script control:

public FullBodyBipedIK ik;

public FullBodyBipedEffector effector;// Enumerate variables, choose by yourself

ik.solver.leftHandEffector.position = leftHandTarget.position;

//Assign a position to the right hand IK control point, that is, let the right hand move to the specified point

ik.solver.GetEffector(effector).position = target.position;

//Assign a target to a given location

4. Limb IK: three points, connecting three bones, the end point driving two bones, pay attention to add bend goal to control the direction of contraction

5. Ccdik: the enhanced version of limb IK, which can connect multiple bones, and can be used to make tail, rope, mechanical arm, etc

Fabrik: similar to ccdik, but more flexible. It can be used to make steel bars, tree trunks, etc

7. Ground fbbik: IK effect of humanoid model moving on various terrain

Steps:

a. Add the component to the model

b. Parameter filling model object

c. Add rigid body and Collider to the model

d. After running, the mesh of the foot of the model will fit the terrain (the sole of the foot will remain flat, but it will tilt differently according to the terrain)

e. Only need walking animation, you can present the animation effect of walking on various terrain (stairs, slopes)

8. Ground IK: the effect is the same as above, the model with unknown number of feet can be used, and the number of feet can be customized

Steps:

a. Add limb IK to each leg of the model, and fill in the bone parameters from the root of the leg to the foot

b. Add grounderik components to the model and fill in all legs, model mesh objects, and character controller objects

c. User defined walking controller can walk on any terrain after running

9. Interaction system: interaction system, which can obtain the specified IK and control it, showing the effect of opposite movement

Steps:

a. Create an empty object box and add an interaction object script

b. Capture the palm bone, add the induction target script, set the parameters and rotate the palm angle, which is the placement angle when touching the object plane

c. Add the palm under the box

d. Add interaction system to model

e. Add control script:

interactionSystem.StartInteraction(FullBodyBipedEffector.RightHand, box, bool);

//Execution events

10. Lookatik: make the model face a certain point, which is better than aim IK as the head orientation, and it is easy to use with biped IK

Steps:

a. Add lookatik component to model

b. Add head

c. Add spine from root to neck

d. Operation

11. Analysis of various examples:

a. Boxing: there is a special fbik boxing script control, the weight of the hand changes with the curve, the bottom is at the time of closing the fist, and the peak is at the time of hitting the target

b. Handshake, push-pull, pick: use interaction system

c. Driving: special fbik driving rig script control

d. Robot feet: apply angle and joint limits

e. Hit and fly effect: holding a long stick and waving the target, you can hit and fly the target; Two scripts applied to motion antibody

f. Kissing: there is a special kissing rig script

g. Push wall: special touch walls script

this article shares WeChat’s official account – Unity3D game development essence course dry cargo (u3dnotes).

Similar Posts: