Copy model to skeleton-script tutorial

Source: Internet
Author: User

Copy model to skeleton-script tutorial

Run the script. Script content:

Today, we will show you how to copy the model to the skeleton. Before making preparations, we will first match the skeleton model, after that, the bound or transferred model will be split up in the same shape as the number of bones. after the skeleton align is completed, we split the model in situ. Here we separate it for your convenience. For example:

 

When matching the skeleton, you must pay more time to check the joints and the joints of the model. Otherwise, an incorrect calculation will occur during the movement, the skin is inaccurate.

 

 

The split model refers to the area separation to be dispersed by the selected model. This figure looks like a saint-fighters wearing a holy dress.

 

After the scattered model and skeleton are ready, we will copy the model to the skeleton. Here I only use the bipe skeleton, because the bone skeleton is the same as this principle and is easier to operate than the bipe, if you use the bone skeleton, you can also use this method.

 

The next step is to align the separated model with the coordinate of the skeleton. This alignment must be done by setting the model with the skeleton. I am here to separate it for your convenience.

 

After alignment coordinates, collapse the separated model into mesh. It is best to use collapse in the tool panel.

 

After the frame is finished, the skeleton is displayed in the box to facilitate next collection. You can also switch to the grid by pressing the F3 key box. here I use the external box display, select the skeleton to be displayed in the external box, right-click the attribute, and select Show as external box.

 

Bipedpart = 0

Tarmesh = 0

Rolout copies the model to the skeleton roll "copies the model to the skeleton" width: 160 Height: 220

(

Pickbutton btn1 "Pick BIP part" POS: [100] width: Height: 22

Pickbutton btn2 "pick your mesh" POS: [37,99] width: 91 Height: 24

Button btn3 "do it" POS: [45,153] width: 69 Height: 28

On btn1 picked OBJ do

(

Bipedpart = OBJ

Btn1.caption = obj. Name

)

On btn2 picked OBJ do

(Tarmesh = OBJ

Btn2.caption = obj. Name

Resetxform tarmesh

Collapsestack tarmesh

 

)

On btn3 pressed do

(

Tarmesh. parts = bipedpart. Transform. Position

Tartm = tarmesh. Transform

Partp = Bip. gettransform bipedpart # POS

Partr = Bip. gettransform bipedpart # Rotation

Parts = Bip. gettransform bipedpart # Scale

Parts = [parts. Z, parts. Y, parts. x]

Parttm = matrix3 1

Parttm = translate parttm partp

Parttm = rotate parttm partr

Parttm = scale parttm parts

 

Finalparttm = parttm * (inverse tartm)

Tarmesh. Transform = inverse finalparttm

Backtm = finalparttm * tartm

Resetxform tarmesh

Collapsestack tarmesh

 

Bipedpart. baseobject = tarmesh

Tarmesh. Transform = backtm

)

)

Newflovat= newroloutfloater "copy the model to the skeleton-Alpha" 170 230

Addrolout copies the model to the skeleton roll newflovat

 

Point the pick BIP part to be twisted, pick up the skeleton, and then tap the pick your mesh to pick up the model.

Click do it !!! You will find that the header (model) is missing. be afraid that your model has already been copied as a skeleton. If you do not select the show box for selecting the skeleton, you will find that the skeleton is the same as the model.

After you copy all the models, you will find that the models are everywhere on the ground. Haha, you can just delete them'

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.