Unity3d 2D bone animation plug-in Puppet2D use 1, unity3dpuppet2d

Source: Internet
Author: User

Unity3d 2D bone animation plug-in Puppet2D use 1, unity3dpuppet2d

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/forum.php? Mod = guide & view = my


Cocos2d developers all know that Cocostudio is one of the animation editing components. Skeleton animation provides excellent performance for game development, sometimes compared with sequential frame animation.

Powerful unity3d can also be used to develop 2D games and implement animation through sequential frames. There is still no 2d bone animation editing function.

Recently, a third-party plug-in has been developed to implement this function for unity. That is Puppet2D.


Walkthrough

Introduction:

This is a quick walkthrough of how to use Puppet2D to set a role animation. First, open a new scenario and click the 2D button in the Scene view. You can find window> Puppet2D in the menu at the top of the window.


Createthe Character:

On the Project panel, you will find the Puppet2D role genie in the puppet2d/Textures/PuppetMan folder. Expand it and drag each body part to the scene view to arrange them, so it looks like an image bellow. (Move the z component to make the arm and leg appear in the correct draw order)


CreateLayers:

Now we want to place the role on the locked layer, so we should not inadvertently choose it as the bone we draw. To select the drop-down menu on the right top of the layer screen, edit the layer and enter Character in the free layer slot. Lock the layer, select all genie in your scenario, and select the Character from the layer drop-down list in the checker.


Now we can create bones skeleton and control sortinglayer to control the sorting layer. In the top Layer drop-down list, add two sort layers-A Bones and a Controls. Now, we are ready to remove the bones.

BoneCreation:


First, set Bones in the bone layer to Puppet2D window. Click "CreateBone Tool" to start the Tool. Now, you can click to draw the bone in the Scene view. Start from the buttocks and give him several spine and head bones, right-click to end the current bone. Click the spine joint at the top and start to draw the left arm, elbow, hand, right-click the bone to end. Now make the same right arm. Click the left mouse button on the hip bone to draw the thigh and knee, right-click the foot, and repeat the other leg. Click "Finish Bone" to exit Bone creation.

Now we should name all the bones to make things clear. Your hierarchy is as follows:


RiggingSetup:Operation settings


The control we want to create now can be used to create role animation.

First select control in the drop-down list, so control to create "Controls" on the sorting layer ".

Select handL bone and click "CreateIK Control ". This will create an animation for easy manual control. Repeat this operation for handR, footL, and footR.

Next we need to create a body Control ---- select the buttocks, and then click "CreateParent Control ". This allows a control to move and rotate the hips.

To create a spine controls spine Control, select the spine and click "CreateOrient Control ". If you notice that we have global control in our heierachy-this is the parent level of all controls. Select spine_CTRL_GRP and drag it to hip_CTRL. Next, select the header and click Create Orient Control ". Select head_CTRL_GRP and drag it to spine_CTRL.


Skinning:

Control the bones we need to add to the role. There are two ways to do this ------ parent genie joint and skin:

Parenting:

In hierarchy, select PuppetMan_armBottom, PuppetMan_armTopand, PuppetMan_gunTop, and all bones. Click "Parent Objects to bones ".

Skin Binding:

Skin body parts of the bones, we first need to convert them into a mesh that can replace the skin. To do this, select the remaining Mesh and click "Convert Sprites to Mesh ".. Select them and add them to the Character layer.

Now select legL, kneeL, footL, hip, spine and PuppetMan_body_GEO and click "Bind smooth Skin ".

Selecthip, legR, kneeR, footR and PuppetMan_leg_GEO and click "Bind smooth Skin ".

Select Spine, armR, elbowR, handR and PuppetMan_armR_GEO and click "Bind smooth Skin ".

Select Spine, head and PuppetMan_head_GEO and click "Bind smooth Skin ".

FinalSetup

It is almost ready for animation processing. But first, we need to clear scene and fix some skin weights.

In hierarchy, drag the buttocks and all the grids to Global_CTRL. Now, select global control and turn it on and off to refresh it. Now you can turn visibility on the bones ------- because you don't need to see the character they want to perform animation processing.

Try moving the circular control ------ there may be weighted questions like footarea. To fix the issue, select PuppetMan_leg_GEO and PuppetMan_body_GEO, and click "Edit skin weights ". Note the small vertex handle that appears. Select them and you will see that you can change the weight in the inspector. If you want to Update multiple Weights at a time, click Update Skin Weights in inspector.

Once you have adjusted them to your satisfaction, click the vertex handle to be deleted in "FinishEdit Skin Weights.

The current v should be ready for animation processing.

 

Animating:


The animation Puppet2D character works in the same way in all animations in Unity. Select Global_CTRL to create a new clip in the animation window. Move control and set key frames wherever you like ---- happy animation!

Related Article

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.