Manual/PartVII/Following a Path
Wikipedia,自由的百科全书
Path Animation(路径模式)
(学习过flash的朋友对这种模式应该也很熟悉的,这里的路径模式和flash中的路径大致都是一样的,先建立一个路径,再让物体沿路径运动。但是中间的不同点在于我们在blender中建立一个路径后要同你所要运动的物体与其建立父子关系才可以,并且这里的路径的长度默认为100帧,当然我们也可以对其的长度进行修改,我们将在下面详细说明。)
Relevant to Blender v2.31
A different way to have Objects move in the space is to
constrain them to follow a given path.
When objects need to follow a path, or it is too hard to animate a
special kind of movement with the keyframe method (Think of a planet
following its way around the Sun. Animating that with keyframes is
virtually impossible) curve objects can be used for the 3D display of an animation
path.
If the Curve object contains more than a single continuous curve
only the first curve in the object is then used.
如何建立一个路径:
当一个物体的运动很难以关键帧的方法来实现时,(想象一下如果一个行星沿着太阳运动,我们要多么的麻烦)这时我们应该怎么办呢?在2。31中我们有一种不同于以前的方法来实现一个物体的运动,我们可以强迫它沿着一条我们已经制定好的路径运动。
这里有两种方法来实现这种效果: 老的方法是在2。30版以前用的; 一种是新的方法(其实是定义一个约束因此我们将在约束一章节中详细的说明它). 因此在此我们将详细说明第一种方法:
当将一个物体和一条曲线实现父子关系时,blender会问我们是要让它们实现正常的父子关系(Normal Parent)或者是路径关系(Follow Path)。当我们只是要求实现常规的路径动作时我们可以选择前者,但是当我们要求实现别的动作时则应选择后者,后者将建立一个"Follow Path"约束.这就是我们所要做的.
任何曲线都可以通过设置Animation Buttons 窗口(F7)(The Action Window with Path Buttons.)中的CurvePath 按钮为ON,作为路径。当一个曲线有它的子级物体时,你可以进入Editing Context (F9)中,并且激活Curve and Surface 面板中的CurvePath 按钮,则子物体将会沿着曲线运动。
实现曲线3D的一个好方法是通过设置Curve and Surface 中的3D 按钮,这样的话我们就可以对曲线自由的建立模型。
另外在ADD菜单中有一个比较简单的方法来建立一个路径,就是通过Curve->Path来建立,路径上自动有五个NURBS联接可以随意的设置路径。
设置路径的长度:
正常情况下一个路径是有100帧的,但我们可以通过Num Button ,随意的改变它的长度。
物体沿路径运动的速度是由IPO窗口中一条曲线来控制的.想要看到它,你首先应该在IPO窗口中选择Curve type,这时一个通道:速度(speed)就出现了。在IPO窗口中整个路径是在一个垂直的值0.0到1.0之间变化的,你可以象对其它的IPO曲线一样在这两者之间画出一条曲线,在这里返回和脉冲运动是可以的。对大多数的IPO曲线来说它一定要在从0到1之间的Y值来运动,为了达到这一点,我们可以通过IPO窗口中的Number 菜单(NKEY)来实现。如果IPO曲线被删除了,那么路径的长度就由它的持续时间来确定了,一个线性运动定义了这种情况,速度(SPEED)就是一个控制路径长度的出色的方法,对于time IPO(参见上一章节中的最后一点),路径的长度为1,当time IPO在200帧内值都在0到1之间,则路径的长度为200。利用Curve and Surface 面板中的CurveFollow选项,一个旋转也会给予路径的子物体,因此它们就不变的只是指向路径的方向,运用物体的Anim settings面板(F7)中的"tracking"选项就可以设计你想要的跟踪:
以上真这段的意思大概是讲: 通过在路径的IPO面版的 path 模式下创建一条 speed 的动画曲线,并延长动画曲线来延长路径本身100帧的动画时间.也就是 将100帧按一定比例延长,这会改变物体在路径上的均速运动.
补充: 另一种方法是: 直接在路径的Editing(F9)下的Curve and Surface面板中的PathLen参数上修改路径的动画帧数,这会保持物体在路径上的均速运动.
As for tracking, there are two Path animation methods, the old, pre 2.30
method described here and the new method, which actually defines a constraint,
which will be described in character_constraints.
When parenting an Object to a Curve you will be asked to choose
a Normal Parent or a Follow Path
option. The Former is what you need for conventional Path animation, but
other actions needs to be taken later. The second option creates a
"Follow Path" Constraint, and it is all you need to do.
Any kind of curve can become a path by setting the option CurvePath
Toggle Button in the Animation Buttons window (F7) to ON
(The Action Window with Path Buttons.).
When a Curve has childs it can be turned to a Path by selecting
it, going int the Editing Context (F9) and activating the CurvePath
Toggle button in the Curve and Surface Panel.
Child objects of the Curve will now move along the specified path.
It is a
good idea to set the Curve to 3D via the 3D
Toggle Button of the Curve Edit Buttons so that the paths
can be freely modelled.
Otherwise, in the ADD menu under Curve->Path, there is a primitive
with the correct settings already there. This is a 5th order NURBS
spline, which can be used to create very fluid, continuous movements.
Normally a Path is 100 frames long and it is followed in 100 frames by children.
You can make it longer or shorter by varying the PathLength:
Num Button.
The speed along a path is determined with an appropriate curve in the
IPO Window. To see it, in the IPO Window Header button you must select the Curve
type for the IPO block. A single channel, Speed is there.
The complete path runs in the IPO Window between the
vertical values 0.0 and 1.0. Drawing a curve between these values
links the time to the position on the path. Backward and pulsing
movements are possible with this. For most paths, an IPO Curve
must run exactly between the Y-values 0.0 and 1.0. To achieve this,
use the Number menu (NKEY) in the IPO Window. If the IPO Curve is
deleted, the value of PathLen determines the duration of
the path. A linear movement is defined in this case.
The Speed IPO is a finer way of controlling Path length. The path is long 1 for time IPO,
and if the time IPO goes from 0 to 1 in 200 frames then the path is 200 frames long.
Using the option CurveFollow, in the Curve and Surface
Panel, a rotation is also given to
the Child objects of the path, so that they permanently point in the
direction of the path. Use the "tracking" buttons in the Anim settings
Panel of the Object (F7) context
to specify the effect of the rotation (Tracking Buttons ) as you would do
for Tracking:
TrackX, Y, Z, -X, -Y, -Z 这里定义轴向, 也就是物体被放置在路径上的轴向。UpX, UpY, UpZ 定义哪一个轴指向上方,在物体局部(local) 正 Z 轴方向.如果Track 和 Up 轴向一致, 设置是无效的。.
TrackX, Y, Z, -X, -Y, -Z This specifies the direction axis, i.e. the axis that is placed on the path. UpX, UpY, UpZ Specifies which axis must point 'upwards', in the direction of the (local) positive Z axis. If the Track and the Up axis coincides, it is deactivated.
| Note (注意):
曲线路径涉及到定义"Up"(“向上”)方向,有同样的倾斜曲线问题 。 Curve paths have the same problem of Bevelled curves for what concern the definition of the "Up" direction. |
为了精确地使这些旋转看得见,我们一定使一个子级物体有它自己的旋转。按 Alt-R 清除子级物的旋转数值。也清除这个"Parent Inverse"(父级反转): 使用 Alt-P 。用SHIFT-CTRL-PKEY命令: "Make parent without inverse"( "反转的父级" 这个命令会在父化时将子物体的中心和父物体的中心重合) 去 'parent' (父级化)一个被没有旋转的子级物体到路径对是最好的方法是。现在子级物体直接跳到路径和分配在右方向。3D路径每个顶点也获得一个额外的数值: 'tilt'('倾斜')。在 Edit模式 中使用TKEY 去改变选择顶点的倾斜度,举例来说,如果它在一个滚动的手柄上就可以见到一个子级物体环绕移动 。一个复杂的应用展示了复杂的路径动画。我们想要创建一架战斗机飞入一个峡谷, 紧贴水面飞然后向上飞, 我们的照像机一直跟随它,可能,还有反射在水面上! 因此我们将会需要三个小径。战斗机被Path 1父级化,战斗机将会跟随它飞。
To visualize these rotations precisely, we must make it possible for a
Child to have its own rotations. Erase the Child's rotation with
ALT-R. Also erase the "Parent Inverse": ALT-P.
The best method is to
'parent' an unrotated Child to the path with the command
SHIFT-CTRL-PKEY: "Make parent without inverse". Now the Child jumps
directly to the path and the Child points in the right direction.
3D paths also get an extra value for each vertex: the 'tilt'. This can
be used to specify an axis rotation. Use TKEY in EditMode to change
the tilt of selected vertices in EditMode, e.g. to have a Child move
around as if it were on a roller coaster.
Complex path animation shows a complex application. We
want to make a fighter dive into a canyon, fly next to the water and then rise
again, all this by following it with our camera and, possibly, having
reflection in the water!
To do this we will need three paths.
Path 1 has a fighter parented to it, the fighter will fly following it.
战斗机有一个命名为 'Track'的 Empty 的被Parented(父级化)到strategic(战略的?战略位置,为定位相机目标)位置上。 一台照相机然后Parented(父级化)到另一条的曲线上,Path 2, 和跟随它, 追踪 'Track' Empty。战斗机有一个常量Speed IPO, 照相机没有。它走地很快,然后更慢地, 总是追踪这个 Empty, 也就是战斗机的位置, 因此我们将会看到在战斗机旁边有一个非常流畅的相机运动, 在战斗机前面、侧面、背面, 等等。 (在下面的这些帧里,照相机总是很流畅地锁定着战斗机。.)
The fighter has an Empty named 'Track' Parented to it in a strategic position. A camera is then parented to another curve, Path 2, and follows it, tracking the 'Track' Empty. The Fighter has a constant Speed IPO, the camera has not. It goes faster, then slower, always tracking the Empty, and hence the fighter, so we will have very fluid movements of the camera from Fighter side, to Fighter front, other side, back, etc. (Some frames, the camera fluidly tracking the fighter.)
既然我们想要我们的战斗机飞过一条河,我们就需要建立一个环境贴图让水表面获得倒影。但是考虑到照相机,被用为计算的Empty必须始终在镜面位置。 而且照相机也正沿着路径移动! Path 3 是由于顾及 Path 2 反射到水面而被建立的,复制它, 和在编辑模态中顾及到指针使用 MKEY, 一旦指针在 片面上。用作环境帖贴图计算的empty就被父化到新的路径 ,Path 2 的 Time IPO 被拷贝到Path 3.最终动画中的一帧显示了渲染完成的一帧 。一些粒子系统被用于喷射尾迹。场景中呈现了许多细微的诀窍, 比如粒子作为喷射气流, 雾, 一个包围场景的天空球体纹理等等。
Since we want our fighter to fly over a river, we need to set up an Env Map for the water surface to obtain reflections. But the Empty used for the calculations must be always in specular position with respect to the camera... and the camera is moving along a path! Path 3 is hence created by mirroring path 2 with respect to the water plane, by duplicating it, and using MKEY in Edit Mode with respect to the cursor, once the cursor is on the plane. The Empty for the Env Map calculation is then parented to this new path, and the Time IPO of Path 2 is copied to Path 3. A frame of the final animation. shows a rendered frame. Some particle systems were used for trails. The scene presents many subtle tricks, as particles for the jet streams, fog, a sky sphere encircling the scene and so on.
|





