Basic training 2 and unity3dpuppet2d of the Unity3d 2D bone animation plug-in Puppet2D

Source: Internet
Author: User

Basic training 2 and unity3dpuppet2d of the Unity3d 2D bone animation plug-in Puppet2D

Hello everyone, I am Sun Guangdong. Reprinted please indicate the source: http://blog.csdn.net/u010019717

More comprehensive content please see my game pretty cool address: http://www.unitymanual.com/space-uid-18602.html

6. MESH CREATION

Skinning allows a single object to be affected by more than one bone. To do this, the genie needs to be converted to a grid.

Select an genie, and then we will go to the Skinning panel.

First look at the Type of Mesh option 0 ~ 3. The larger the value, the more intensive the grid is.

7. BIND SMOOTH SKIN

Prepare the following in advance:


This section is based on the previous Mesh Creation.

After the Mesh is generated, select all and click Bind Smooth Skin to Bind it. The two bones will affect the genie. For example, we have made a rotation.

If we do not need this relationship, we want to release it. It is very easy. In Hierachy, we only click this genie and click the BindSmooth Skin button again. In the displayed dialog box, we select, detach.

8. FFDs (free formdeformation)

Select an genie first, then we will go to the Skinning panel, click the Create FFD Tool button, and then we will start to Create a circle.

Create FFD Tool-start creating FFDControls

Left Click-draw FFD Controls

Hold Shift or Ctrl-move selected FFDControl

Right Click-Close Current FFD loop andstart creating a new loop

Press Enter/Click "Finish FFD"-Finishescreating FFD


After that, we drag a point (each point is a control) to see the deformation.

Now let's create the skeleton.

After the event, we select all the bones and elves and click the BindSmooth Skin button on the Skinning panel. Now we may not want to change the results of one of the bones, that is, the deformation is too much. What should we do. Adjust the FFD control.

Select one of them and set the Weight variable in the script to a greater value. Then observe the phenomenon.

Clear the scenario and select the genie.

Make the following content: outer, eye, eyelid, and Spline control with 6 bones.

We can change the points enclosed by the eyes to make the eyes become deformed.

 


Select All Spline-controlled bones and Genie, and click the Bind Smooth Skin button on the Skinning panel.

Then, when we adjust the control, if some deformation is not satisfactory, we can select the nearby FFD control and adjust the Weight.

Drag the skeleton controlled by Spline to global control Global_CTRL. In the drag-and-drop wizard, select this wizard and click Convert Spriteto Mesh in the Skining panel to generate the Mesh.


In the Scene panel, move the mouse to select all (do not do it in Hierachy) including the new genie, But remove the camera. On the Skinning panel, select Num Skin Bones number 4 (FFD) and click the button. Bind Smooth Skin. In this way, these two genie (Mesh) are combined. We are at the FFD point of the dynamic outsourcing. The deformation of these two genie is one degree.

9. SAVE/load poses (not introduced)

You can save the pose and load them.

 

10. BAKE ANIMATION

Open the scenario puppet2DDemo.

Then, click Bake Animation on the panel. An animation is generated in the following folder:


Drag the animation to the animation panel, right-click it, and select it as the default. Then, delete the original puppet2d_shoot animation. You will also disable the Puppet2d global Contrl. cs script.

Move the key frame in the Animation window and you will see:

 


It indicates that these will be used as the bone rather than the Key Frame Animation on the control.

Then we delete all the controls except global control.

We enable the Puppet2d global Contrl. cs script and select Flip. The role is reversed and the animation is followed. This is sometimes necessary.

11. GLOBAL CONTROL

There is nothing to say, mainly the Puppet2D_GlobalControl.cs script. You can test each parameter.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.