ポーズの登録

An Introduction to Blender – Let’s start modelling ~ Part 6 Animation

In this series, I will show a series of tasks to use Blender, create a simple model and upload it to STYLY,  for those who don’t have any experience with modelling.

In the previous article…

In the previous article, I explained how to apply bones to the model.

There are two ways to set bones. Please refer to the following articles.

What to do in this article

In this article, we add animation to the object with bone and upload it to STYLY.

アニメーション

Animation

 

 

Preparations

The name of each bone

You need to rename the bones to upload them to STYLY later. This naming convention also makes the bones easy to handle when adding animation. Double-click the bone name in the Hierarchy to rename it.

You can identify a bone by selecting it in the Edit mode, so select each bone and rename it as shown below.

ボーンの名前

The name of each bone

 

The setting for ‘Master bone’

In the current state, you need to move all the bones when you want to move or rotate the whole character by animation.

Therefore, we create a ‘parent’ bone to put all the bones together as children, which is called ‘Master bone’.

In the Edit mode, select the tip around the centre of the spine and extrude it in the Y direction by pressing the ‘E’ key and then the ‘Y’ key in sequence.

マスターボーンの作成

Create ‘Master bone’

Name it ‘Master’.

名前をMasterにする

Name it ‘Master’

 

①Select the Master bone in the Hierarchy window. ②Select the ‘Bone’ tab. ③ Remove the current parent-child link by pressing the ‘x’ button.

親子を解除

Remove the current parent-child link

 

To make all the bone to be the children of the master bone, select ‘Master’ as the parent of ‘Spine1’ which is the top of the upper-body bone hierarchy, ‘Hip_L’ at the top of the left-leg hierarchy and ‘Hip_R’ at the top of the right-leg hierarchy. It makes all the bones to be the children of ‘Master’, so you can now move them together by moving ‘Master’.

マスターボーンを親に

Set ‘Parent’ to ‘Master’

 

In addition, you can turn bone into stick by selecting the bone and clicking the ‘Stick’ button in the Armature tab. It gives a simple visualization to make the operation easier when adding animation.

スティックを選択

Select ‘Stick’

 

ボーン表示がスティックになる

‘Stick bone’ visualization

 

Let’s make animation

Add animation

Finally, we now start adding animation!

The Timeline for animation is shown in the lower part of the screen.

タイムライン

Timeline

 

Set the sync mode to ‘AV Sync’ to play the animation at the original speed even if some frames are dropped.

AV同期

AV Sync

 

Define each animation such as running, walking, as ‘Action’. We use each ‘Action’ to manage each animation.

Create Actions on the Dope Sheet. You can open the Dope Sheet from the ‘Editor Type’ selector in the bottom-left corner.

画面表示をドープシートに

Switch the Editor Type to ‘Dope Sheet’

 

We set the keyframes by making poses on this Dope Sheet or the Timeline.

① Switch ‘Dope Sheet Mode’ to ‘Action Editor’. ② Click ‘New’.

アクションモードで新規を選択

Click ‘New’ in the ‘Action Editor’ mode

 

As shown in the screenshot below, enter the name in the box(①) and press the ‘F’ button(②) to save the animation.

You can select the created animation from the drop-down menu (③).

新規アニメーションの作成

Create a new animation

 

This time, we create a ‘walking’ animation as an example.

Before making the first pose, set the current frame to 1.

現在のフレームを1フレームに

Set the current frame to 1

 

Select a bone and press ‘Ctrl+Tab’ to go to ‘Pose Mode’. We make a pose by moving the bones in this mode. Since we make a walking motion here, create the pose when walking.

ポーズの作成

Create a pose

 

After making a pose, select all the bones by the ‘A’ key. Then press the ‘I’ key and select ‘LocRot’.

ポーズの登録

Register a pose

 

It inserts a keyframe. The keyframe is added to all the bones in the Dope Sheet and the yellow vertical line appears at the position of the keyframe in the Timeline.

キーフレーム

Keyframe

 

Select a frame a bit ahead to make the next pose.

In the case of walking motion, we need to make a symmetrically opposite pose, so let’s paste the reversed pose of the first one.

Right-click ‘Dope Sheet Summary’ at the top of the keyframe on the Dope Sheet to select it. Note that you need to right-click when selecting and moving a key and left-click when changing the frame position.

After selecting ‘Dope Sheet Summary’, copy it by Ctrl+C, click a frame a bit ahead and press Ctrl+Shift+V.

It inserts a key with the reversed pose.

ポーズの反転

Reverse the pose

 

 

Then, copy and paste the first pose at a frame further ahead. Since we don’t need to reverse the pose this time, just paste it by Ctrl+V.

Go back to the Timeline, set ‘End Frame’ to the frame with the last pose.

終了フレームの設定

Set the last frame

Let’s play it then.

アニメーションの確認

Check the animation

 

Check the animation. If you found something wrong, try adding more keyframes between the existing keyframes to refine the movement or moving the keyframes to adjust the speed so that you make the animation look good enough to convince yourself!

If you want to add a new action, exit the Edit mode by pressing the ‘x’ button next to the Action name and then press ‘New’ to create a new Action.

アクションの追加

Exit the Edit mode and add an Action

 

Upload the model to STYLY

Export the model

Let’s export the model with animation to STYLY.

Since I couldn’t make the animation working when I imported the model from Bender to STYLY directly, we need to import it via Unity.

Firstly, export the model from Blender.

Select the bone and mesh and click ‘File > Export > FBX’.

In the setting window, check ‘Selected Objects’ and select ‘Armature’, ‘Mesh’ and ‘Other’ (You can select them all by clicking them with the shift key held down).

書き出し設定

The setting to export FBX

 

On the ‘Animation’ tab, you may leave all the boxes checked.

アニメーションタブの設定

The settings on the Animation tab

 

Then, enter the filename and export.

 

Process in Unity

Next, open Unity. You should use Unity2017.4.

Import Unity plugin for STYLY.

You can download it from:

After importing, the window shown below appears. Enter the E-mail address and the API key.

メールアドレスとAPIキーの入力

Enter the E-mail address and the API key

 

Put the model exported earlier in the ‘Assets’ folder and then place it in the scene.

モデルをシーンに配置

Place the model in the scene

 

Select the model file in ‘Assets’ and click the ‘Rig’ tab in the Inspector. Then, change ‘Animation Type’ to ‘Humanoid‘ and click ‘Configure…’.

Humanoidにする

Change ‘Animation Type’ to Humanoid

 

It brings the scene to check the bone. If you found everything coloured in green, it would mean all the bones are set correctly. So, click ‘Done’ to go back to the original scene.

ボーンの確認

Check the bone

If you found some parts coloured in red, you need to set them again. In some cases, you can fix them just by rotating them in Unity, so please look into the error messages. I heard that incorrect bone names would cause an error.

 

After going back to the original scene, drag the animation of the object in ‘Asset’ into the object placed in the scene.

アニメーションをドラッグアンドドロップ

Drag the animation into the scene

Select ‘Windows > Animator’ from the top menu to open Animator. Now you should find the animation you just dragged into the scene (the orange one below).

Animatorウィンドウ

Animator window

If its name was left blank, set the name in the Hierarchy view.

If you want to make the transition from the animation you just placed to the other animation you created, drag it into this Animator window, right-click on the first animation and select ‘Make Transition‘ to connect to the next animation with the arrow.

 

Since we are making a walking animation this time, I will explain how to loop the animation.

Click the ‘Edit’ button on the Inspector of the animation in the object under the ‘Assets’ folder.

Editをクリック

Click the ‘Edit’ button

 

Then, the Inspect changes to the state to edit that animation, so check the ‘Loop Time‘ box and click ‘Apply‘.

Loop Timeにチェック

Check the ‘Loop Time’ box

Play the animation to check if it loops. If it doesn’t loop, it might have not been set correctly, for example, the ‘Looptime’ not being checked. So please press ‘Edit’ again to check.

 

Once it’s done, drag the object in the Hierarchy window into ‘Assets’ to convert it into a reusable asset, which is called ‘Prefab‘.

 
プレハブ化

Create a Prefab

 

Right-click the Prefab in ‘Assets’ and select ‘STYLY > Upload prefab or scene to STYLY‘. It starts uploading it to STYLY. When it’s completed successfully, the window with the message, ‘Upload Succeeded’, appears.

Go to STYLY and select ‘Assets > 3D Model > My Models’. Now you should find the object with animation uploaded earlier.

Place it in the scene. It looks nice, doesn’t it? (Actually, just the head appears on the floor because it’s too big…lol)

完成!!!

Completed!

 

That is all!

Please watch ‘Vtuber’ video by this panda (the name is ‘Pants-da’)!