Thư viện tri thức trực tuyến
Kho tài liệu với 50,000+ tài liệu học thuật
© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

Creating 3D Game Art for the iPhone with Unity Part 7 pps
Nội dung xem thử
Mô tả chi tiết
FIG 6.45 In This Image, the Highlighted Areas Are the Keyframes that Were Created by Duplicating the Previous Keyframe.
Make Sure Frame Range Is Set Correctly
Number one and the most obvious is that you’ll need to make sure that you
set the End Range for the animation. If your animation is 27 frames long, then
be sure that the End Range is 27. For cyclic animations, you can set the clips
to loop in the FBX Import Settings as shown in Fig. 6.46. If you leave extra
frames in the loop, the animation will appear to pause before the loop cycles
effectively breaking the loop.
FIG 6.46 You Can Set the Loop Mode for Animations in the FBX Import Settings.
Baking Keys
When exporting animation data from a 3D program such as Blender into
Unity iOS, you may need to bake the keyframes so that the animation is
150
Creating 3D Game Art for the iPhone with Unity
FIG 6.47 By Sampling the Keyframes, You Will Bake the Curve, Which Puts a Keyframed Value on Each Frame.
interpolated correctly. If you find that your animation data doesn’t seem to
be translating correctly in Unity iOS and this will typically happen when using
IK, you can choose to bake the animation values to a key on each frame.
Essentially, this is taking the interpolation out of the animation curve by placing an exact keyed value at each frame in the animation. If you’re using native
formats from 3D applications such as .ma, .c4d, and .max, you can actually
bake animations in Unity iOS by checking the Bake Animations options in the
Importer Settings. An animation bake step happens during export from your
3D tool to the FBX format. When importing objects into Unity iOS using a 3D
tool’s native format, Unity iOS is actually opening the application behind the
scenes and exporting an FBX file. However, the FBX exporter in Blender doesn’t
have an option for baking animation, so you can bake the F-Curves in Blender
before exporting the FBX file. The quickest way is from the DopeSheet Editor.
First, hit the A key to select all of the keyframes and then choose Sample
Keyframes from the Key menu or press Shift + O. Sampling the keyframes will
bake the curves and place a key on each frame as shown in Fig. 6.47.
151
Animation Using Blender