Blender 3D:第四单元:与高级教程起飞
Piston, Rod and Flywheel
::活塞,杆和飞轮

A setup like that shown in
Image 1
is e.g. typical for a steam engine. It is surprisingly difficult to animate this setup, because one has to translate a rotating movement (of the Flywheel) to a horizontal movement (of the Piston). This alone wouldn't be too difficult, but the Rod has to stay attached to the Piston. The shown setup uses three empties and two armatures, each with two bones.
::图1中所示的设置是典型的蒸汽机. 动画这种设置令人惊地难以实现,因为必须将旋转运动 (飞轮) 转换为水平运动 (活塞). 这本身就不太困难,但杆必须保持与活塞相连. 所示的设置使用三个空气和两个具,每个有两个骨头. 图2中所示的机器是典型的蒸汽机,因为它可以在空气中进行转换.
The horizontal direction is the Y-direction, if this is different in your model you have to exchange Y with your horizontal direction.
::如果在你的模型中不同,你必须用你的水平方向来交换Y.
Setup
::设置
-
Use
Ctrl-A
->
Apply scale and rotation
on all mechanical parts in object mode.
::使用Ctrl-A->在对象模式下对所有机械部件应用尺度和旋转.
This will spare you from bad surprises if you rotate the flywheel afterwards.
::如果您在后面转动飞轮, 这样就避免了不好的意外.
We need an object which follows the rotation of the flywheel. We use an Empty, which is parented to a Vertex.
::我们需要一个跟随飞轮旋转的对象. 我们使用一个空的,

-
Change to edit mode of the flywheel. Select a Vertex in the middle of the crank.
::选择一个在曲棍的中间. -
Move the cursor to the Vertex (
Shift-S
->
Cursor->Selection
).
::移动光标到顶点 (转移-S->光标->选择). -
Change to object mode and insert an Empty (
ERotation
).
::切换到对象模式并插入一个空 (旋转).
-
Change back to edit mode of the flywheel. The vertex is probably already selected, now select with
Ctrl-RMB
the Empty and press
Ctrl-P
->
Make vertex parent
(
Image 2
).
::转回滑轮的编辑模式. 顶点可能已经选定,现在使用Ctrl-RMB选择空并按Ctrl-P->使顶点父 (图2).

We need two more Emptys:
::我们需要两个空洞:
-
Place the second Empty (
EGelenk
) in the center of the joint between Rod and Piston.
::将第二个空 (EGelenk) 放置在杆和活塞之间的接头的中心. -
Place the third Empty (
ESteuerung
) near to the joint.
::将第三个空 (ESteuerung) 放在关节附近. -
Now select at first
EGelenk
, than
Shift-RMB
ESteuerung
and parent
EGelenk
to
ESteuerung
with
Ctrl-P
.
::现在首先选择EGelenk,然后使用Ctrl-P将Shift-RMB转换为ESteuerung,然后使用Ctrl-P将母EGelenk转换为ESteuerung.
We're going to insert two armatures, each with two bones. The first armature, helps translate the rotation to a horizontal movement. The second armature drives the Piston and the Rod. The cursor should be positioned at the Empty
ERotation
(like in
Image 3
), else set it there.
::我们将插入两个具,每个具有两个骨头.第一个具,帮助转换旋转到一个水平运动.第二个具驱动活塞和棒.光标应该放在空转 (如图3),否则设置它在那里.
-
Add an armature (
AHelfer
). The root of the first bone (
BHelfer1
) has the same position as
ERotation
, the tip has to be positioned to the Empty
EGelenk
(select Empty first,
Cursor->Selection
, than select bonetip,
Selection->Cursor
).
::添加一个具 (AHelfer).第一个骨头的根 (BHelfer1) 与Erotation的位置相同,尖端必须定位在空 EGelenk (首先选择空,标签->选择,然后选择骨头,选择->标签). -
Extrude another small bone (
BHelfer2
) in horizontal direction.
::在水平方向上挤出另一个小骨头 (BHelfer2).
BHelfer2
is automatically
Child
of
BHelfer1
. The second armature that is driving the movement of piston and rod will be inserted in the opposite direction, i.e. from right to left in our example.
::助手2自动是助手1的子.驱动活塞和杆的第二个具将被插入相反的方向,即从右到左在我们的例子中.
-
Position the cursor on the piston.
::定位指针在上. -
Add an armature (
AGestaenge
).
::添加一个具 (AGestaenge). -
Move the tip of the first bone (
BKolben
) to
EGelenk
.
::将第一骨头的尖端 (BKolben) 移到EGelenk. -
Extrude the first bone and place the tip of the second bone (
BPleuelstange
) to
ERotation
.
::挤出第一个骨头,将第二个骨头的尖端 (BPleuelstange) 放置在转动.
Connecting the two bones will ensure that the rod cannot disconnect from the piston.
::连接两个骨头将确保棒不能脱离活塞.

Now we're going to add the "logic".
::现在我们要加上"逻辑".

-
Add a
Copy Location
constraint to
BHelfer1
which points to
ERotation
. To do this change to the pose mode of the armature
AHelfer
and select
BHelfer1
. In the
Constraints
panel click
Add Constraint->Copy Location
and type
ERotation
into the
Ob:
field.
::在BHelfer1中添加一个复制位置约束,该约束指向ERotation.为了进行此更改,请选择BHelfer1. 在约束面板中,单击Add Constraint->Copy Location,然后在Ob:字段中输入ERotation. -
BHelfer1
needs a second constraint:
Track To
to
EGelenk
(
Image 5
).
::需要第二个限制:从To到EGelenk的轨道 (图5).
Now the root of the bone
BHelfer1
follows the rotation of the Flywheel. Its tip follows the joint, but with slight deviations upwards and downwards. The position of
BHelfer2
governs the horizontal position of the Piston. We just have to "extract" the horizontal position, for that we're going to use a
CopyLocation
constraint, but only in Y-direction. There is no offset for a copy location constraint - else we could have done with one empty less.
::现在,BHelfer1骨的根跟随飞轮的旋转.它的尖端跟随关节,但稍微偏离向上和向下.BHelfer2的位置控制着活塞的水平位置.我们只需要"提取"水平位置,为此我们将使用CopyLocation约束,但只在Y方向.对于复制位置约束没有偏移 - - 否则我们可以用一个空的减少.

-
ESteuerung
gets a
CopyLocation
constraint in Y-direction to
AHelfer
->
BHelfer2
. You have to inactivate X and Z (
Image 6
).
::通过ESteuerung,在Y方向上获得CopyLocation约束,即AHelfer->BHelfer2. 您必须禁用X和Z (图 6). -
Make
ESteuerung
the parent of
AGestaenge
.
::让ESteuerung成为AGestaenge的母公司.
The armature
AGestaenge
gets its horizontal movement from
BHelfer2
via
ESteuerung
.
::装甲 AGestaenge 获得了从BHelfer2通过ESteuerung的水平运动.
Nearly finished:
::几乎完成:
-
Give
BPleuelstange
a
Track To
constraint to
ERotation
.
::给BPleuelstange一个轨道以限制旋转. -
Parent the piston and the rod (the meshobjects) to their bones.
::通过和棒 (meshobjects) 进行骨.
Overview about the relations between armature bones and objects
::关于具骨与物体之间的关系的概述

-
Schwungrad
is vertex parent of
ERotation
.
::斯文格拉德是E旋转的顶点父. -
BHelfer1
has a
Copy Location X/Y/Z
constraint to
ERotation
.
::帮助者1有一个复制位置X/Y/Z的限制, -
BHelfer1
has a
Track To
Constraint to
EGelenk
.
::帮助1号有线路限制到EGelenk. -
ESteuerung
has a
Copy Location Y
constraint to
BHelfer2
.
::对于BHelfer2,ESteuerung有一个复制位置Y约束. -
ESteuerung
is parent of
AGestaenge
.
::斯泰朗是AGestaenge的母公司. -
ESteuerung
is parent of
EGelenk
.
::斯泰朗是EGelenk的母公司. -
BPleuelstange
has a
Track To
constraint to
ERotation
.
::杆有一个轨道对轮的约束. -
BKolben
is parent of
Kolben
.
::科尔本是科尔本的父母. -
BPleuelstange
is parent of
Pleuelstange
.
::普勒尔斯坦格是普勒尔斯坦格的母公司.
The Parent-Child relations between the bones are inserted automatically through extruding, you have to insert the other relations yourself.
::骨之间的亲子关系是通过挤出自动插入的,你必须自己插入其他关系.
Finishing Touches
::最后的修饰
-
Animate the rotation of the flywheel.
::动化飞轮的旋转.
The driving object is the flywheel, all the other movements are synchronized with its rotation.
::其他所有运动都同步于它的旋转.
If you've done everything right, your animation should look like in
Image 8
.
::如果您的动画是正确的, 应该看起来像图8中的动画.

Links
::链接
The German original of this tutorial (same author)
::本教程的德语原版 (同一个作者)
Another method using constraint system
::使用约束系统的另一种方法