利用者:Koilz/13.03.05 wiki - doc 2.6 driven shapekey

提供: wiki
移動先: 案内検索

First you will require a mesh and something to drive the shapekey.

Here im using a Mesh 'Cube' extruded two times, and an Armature 'Armature' with two bones 'Bone' and 'Bone.001'.

doc_driven_shapekey_00.PNG

First select the Cube in Object_Mode. In the Properties->Object_Modifiers Editor Add_Modifier Armature.

doc_driven_shapekey_01.PNG

Select the Armature 'Armature'.

doc_driven_shapekey_02.PNG

Go to the Properties->Object_Data Editor, add two Vertex_Groups.

Rename them 'Bone' and 'Bone.001'.

doc_driven_shapekey_03.PNG

Change the Object_Mode to Edit_Mode.

Select the 'Cube' Vertices you want to Assign to the Vertex_Group 'Bone', then press Assign.

doc_driven_shapekey_04.PNG

Do the same for 'Bone.001'.

doc_driven_shapekey_05.PNG

Go to Object_Mode, select Atmature, then select Pose Mode.

doc_driven_shapekey_06.PNG

Check that the Vertices are following the Bones correctly by rotating (R) then right clicking to cancel.

You can enable X-Ray mode so you can see the Bones in Solid_Shading.

doc_driven_shapekey_07.PNG

Time to add a Shape_Key.

Select 'Cube', go to the Properties->Object_Data Editor.

Add two Shape_keys.

doc_driven_shapekey_08.PNG

Rename 'Key 1' to 'deform90p'.

doc_driven_shapekey_09.PNG

Select 'Bone.001', in Properties->Object_Data, select XYZ_Euler Rotation Mode.

Check the axis which is being rotated (Ctrl+R).

doc_driven_shapekey_09r.PNG

Select the 'Cube', in Properties->Object_Modifiers, enable Use_modifier_in_edit_mode and Apply_modifier_to_editing_cage.

doc_driven_shapekey_10.PNG

In Properties->Object_Data, enable Apply_shape_keys_in_edit_mode.

doc_driven_shapekey_11.PNG

Time to edit the Shape_Key.

With the Shape_Key selected 'deform90p' and Value set to 1.0, go into Edit_Mode.

Move the 'Cube' Vertices where you want them.

doc_driven_shapekey_12.PNG

Go into Object_Mode, by setting the Shape_Key Value you can see the Vertices move.

doc_driven_shapekey_13.PNG

Time to add a Driver.

Armature.Bone.001 Bone is going to Drive the Cube.deform90p Shape_Key.

Right click the Shape_key Value and select Add_Driver.

doc_driven_shapekey_14.PNG
doc_driven_shapekey_15.PNG

Change the Editor Properties to Graph_Editor.

Press 'N' to bring up View Properties.

Select Drivers Mode.

Click select the Shape_key (red box).

Mode

Change Drivers->Scripted_Expression to Sum_Values.

Change Drivers->Ob/Bone to 'Armature'.

Change Drivers->Bone to 'Bone.001'.

Change Drivers->Type to X_Rotation.

Driver settings

Remove the Modifier in Modifiers.

Remove modifier

Hold Ctrl then left click to add to FCurve points.

You can pan with MMB and resize with Ctrl+MMB.

FCurve

Auto_Snap->No_Auto-Snap.

Key->Handle_Type->Vector.

Key->Interpolation_Mode->Linear.

Enable Drivers->Show_Debug_Info, this the Bone.001 X_Rotation.

Driver value

Its 1.57, 0.00 to 1.57, and the shape_key is 0.00 to 1.00.

FCurve 0.0 0.0
FCurve 1.50 1.00
Test
Fcurve Details