推荐给好友 上一篇 | 下一篇

animation向导

General
An
animation, in Second Life lingo, is a set of intructions that cause an avatar to engage in a sequence of motions.

Custom animations can be created in programs such as Poser, Blender, and others. In 2005, one
resident-made program was relased, called Posemaker(ref-thread). And in 2006, two free ones were released: Avimator (ref-thread) and slat (ref-thread). They can be imported from these programs into Second Life by storing them as Biovision Hierarchy files, which have a file extension of BVH, and using the main menu File > Upload Animation command. There is a L$10 fee for uploading an animation. Animations can be previewed prior to uploading.

Animations can be used in
gestures in Second Life but should not be confused with gestures.

Animations in one's
inventory can be activated by double clicking the animation name in the inventory list or by right-clicking the animation name and selecting Open from the context menu. This will produce a dialog box with the animation name, a field in which to see or enter a description of the animation, and two buttons: "Play in World" and "Play Locally". "Play Locally" will cause the user to see the animation but it will not will be visible to other users. This is useful to make sure the animation is really something you want others to see your avatar doing. "Play in World" will cause the users within visual range to see your avatar perform the animation.

There are many animations available in-
world, both free and for sale. You can get started locating some by pressing the Find button in the bottom of the SL screen, selecting the All tab, and entering "animation" as a search term.

The Basic Knowlege For Creating SL Animations

1. The BVH file
The BVH is the text data that describes each figure part's rotation
? and position? along time.

2. Hip is the top
Hip is the top of the hierarchy construction of figure in BVH. So, if you want to move the whole body, you have to move the hip.

3. Keyframe
Animation is created by keyframe animation. It is an animation technique which builds the frame that sets up the position and rotation angle of the part called a keyframe. A computer carries out a complementary automatic calculation and creates the motions in frames between keyframes. A keyframe is built for every part.

4. The first frame
You can create a stationary posture just by one frame animation. But note that you cannot move the whole body and cannot give the multiple priorities. (*rf. 8. Priority) This is convenient when you want absolutely stiffened posture. But generally, it is known that the first frame of the animation that you created on the tool is used as a reference information of the root part, that is, the hip between BVH and SL. And the first frame's posture itself doesn't appear in world at all. it is recognized as a keyframe only after there is a difference with the position of the part of the 1st frame and a rotation angle after the 2nd frame. So you can also create the stationary posture by two frames, and this would rather make sense. It might be recommended that set at zero on every parts' roatiton and position at the first frame because it is easy to make sure that which parts you moved and give priority. And since this is the pause which opened both hands, if it is going to make a certain realistic pose, a difference with the 1st frame will generate it mostly.This is called the standard or default
T-Pose. But this is trifles. The point is that the second frame becomes the start of SL animation, and it is recognized as a keyframe when a difference with the 1st frame occurs.

5. Spline interpolation
If the tool has the spline interpolation feature, you might be annoyed until you knew how to control it. Use the cutting spline option which must be implemented, such as "
Break spline".

6. Inverse Kinematics
If the tool has the inverse kinematics feature and it turns on, you might be annoyed until you knew how to turn off. Find and learn how to turn on/off.

7. Speed of the animation
The default speed of animation is 30 FPS, that is it takes 1 second to play 30 frames. If you want 10-second aniamtion, you need to create 300 frames. But you may also be able to change FPS value on each tool if it has the feature. And note that SL allows to upload your animation upto 30 seconds.

8. Priority
8-1:
The default built-in animations are always affected your avatar in world. And they have their each priorities on each keyframed parts. Unless you give the higher priority to your animations, your animations will be overriden by them in world. The priority range is from 0 to 4. 4 is the highest priority. See the default built-in animations page to make sure what kind of priority each animation has.
8-2: The prioirty is only given to the whole parts of your avatar at once on the uploading window, but unless you change the part's value a bit even at 1 degree at the latter second frame from the first frame's one, the part wouldn't get the priority because it doesn't set keyframe. If you know this rule, it is rather usuful because you can give two types of priority on an animated figure such as the highest and the lowest by parts.
8-3: The latter playing animation is given priority over the former one when the both priorities are the exact same.

9. Optimization
SL's BVH importer does optimization of animation data prior to upload into SL. Joint rotations with very slight changes from keyframe to keyframe will be interpreted as *not* changing and thus aren't stored. This is done intentionally since custom animation data is stored on our servers and downloaded to each viewer as it is needed in real time, and needs to be fairly terse.
The potential side effect of the optomization is what you have observed; joints with very subtle movement might have their animation data dropped entirely on upload. The threshold formula is complex(at least to my non-programmer eyes) and involves comparing all three axes of data per joint, the distance moved between keyframes, as well as the joint's position in the skeletal hierachy. The design is *supposed* to allow for subtle motion to come through intact, so there may be a couple bugs.---by Xenon Linden

10. Scale of the avatars' parts
There is the difference between the scale
? of the figure's parts on the tool and your avatars in world. Even though you adjust the position of parts on the tool, it will show you incorrect in world. You may see the avatar sitting while hovering or sinking under ground. The hip moves by the absolute value. Meanwhile, your avatar's height depends on how you created. The length of legs is up to avatars. You cannot help but keep in mind how they are suitable for the position and go back to the tool. Then you have to tweak them again while ignoring the shape of figure on the tool.

11. Facial and Hands morph
Unfortunately, you cannot customize these animations. You can just select the built-in ones and add them to your animation on the uploading window. You can also evoke the built-in facial aniamtions by script. But speaking of hands morph, it is glitchy. It won't continue and sometimes may not appear at all. Don't expect the fingers' moving so much.

12. Uploading window
1. Name: Your animation file's name.
2. Description: You can write something here as a note.
3. Priority: The range is 0-4. 4 is the highest value.
4. Preview while: You can select several stats to make sure your animation while playing.
5. Loop: Click and put the check mark here to get the looping animation. It is used when you create a statinary pose.
6. Im(%) & Out(%): You can select the range where you want to loop your animation in the whole frames. Note, it starts from the first frame first, and then loops. So when you set 100% in the both fields, you can get the animation that it starts moving and stops with the stationary pose at the last frame.
7. Hand Pose: You can select and add one of the several hand morphs to your aniamtion here.
8. Expression: You can select and add one of the several facial morphs to your aniamtion here.
9. Ease In(sec) & Ease Out(sec): You can delay to start and stop your animaton. It moves smoothly to start and stop the animation during delaying. So if you create a stationary pose and set any delaying value here, you can get the animation that it moves to the pose and then releases smoothly.
10. Play & Stop buttons: You can play your animation to make sure before uploading here.
11. Pose screen: Just click and drag up-down on the screen, the camera moves zoom in/out. Drag left-right, the camera turns around the figure. PRESS/HOLD CTRL+SHIFT+ALT and drag, the camera moves in all directions.

Creating Animations
This addition to the Wiki is very Poser-5/6 centric.
  • The default Poser 6 has a lot of bugs including bvh exporting. You have to get the latest updated patch, SR2 or at least SR1 from Updates & Documentations.
    Setting up Poser
    First, you will want to get the Poser characters from here. The ZIP file includes a BVH of the "default pose". Be sure to have that where you can find it easily. There are directions in the ZIP file for installing the characters so you can use them on Poser.

    On the POSE tab screen of Poser, you should usually open the following windows. They are under the pull-down "Window" menu.
    Parameter Dials: You can move or rotate the selected part by using these dials or inputting digits directly after clicking the value text.
    Animation Palette: You can add and edit the whole frames and keyframes on each part. And you can play and make sure your animation from here.
    Now you can see mainly three windows, the Preview in where the SL figure you added is, the Parameter Dials and the Animation Palette.
    On the Animation Palette, you'll find all parts' name of the figure on the left side of the window. Green dots means keyframes. You are sure to see them on the first frame. You can click and select any frame and add keyframe by pressing + (plus) button where is upper side of the window. You can also delete it by - (minus) button. Click any frame and drag cursor, you can select multiple frames of parts.
    You see "Play range" on the bottom of the Animation Palette. Tweak the range from the second frame to the end to play and make sure your animation without the first frame pose.
    Select Preference where you'll find under the left side pull-down "Poser6" menu. Choose "Meters" as Display Units in the Interface tab on the General Preferences window instead of "Feet" because SL uses meters as unit. Then select "Launch to previous state" in the Launch Behavior section and press "OK". Now you can get this state whenever you start Poser.

    Creating a sitting pose
    1. Input the value "2" in the right side field of "Of" where is the right top of the Animation Palette window to set up two frames as the whole frame.
    2. Make sure when you select the second value of any part on the Animation Palette or input the value "2" in the field between "Frame:" and "Of", it turns to be "Frame: 00002 Of 00002". This second frame becomes the starting animation in SL.
    3. Make sure you turn off Inverse Kinematics on the both of legs where is under pull-down "Figure" menu to move the whole body freely.
    4. Select Hip. You can select it by clicking the figure's hip directly on Preview window or clicking the second frame of Hip on the Animation Palette.

    Note1: Hip is the top of the hierarchy construction of figure in SL(bvh). And "Body" and "CenterOfMass" parts aren't translated into BVH, so that they won't show any movement in world at all. What is worse that when you touch them, you'll be confused a lot because the gap of Poser and SL becomes large. You'd better not to move the both "Body" and "CenterOfMass".

    5. Input "-0.4" in the field of "move down-up" on the Parameter Dials window.
    6. Select Left Thigh and input "-90" in the xRotate field on the Parameter Dials window.
    7. Select Left Shin and input "90" in the xRotate field on the Parameter Dials window.
    8. Select Left Foot and input "1" in the xRotate field on the Parameter Dials window not to be overridden. (rf. Priority of The Basic Knowledge)
    9. Using "Symmetry" where is under the pull-down "Figure" menu and copy left legs to right legs. The dialog box doesn't matter which you select because you're using symmetric scale parts figure.
    10. Save this file as a Poser file (pz3) because you might change this later.
    11. Select "Export/BVH motion..." under the pull-down "File" menu. And select "Scale automatically" on the dialog box before creating BVH file.

    Uploading your animation
    1. Select "Uplaod Animation" under the pull-down "File" menu where is the top of screen in world.
    2. Select your BVH file which you created.
    3. The uploading window opens. You have to set the followings on the window.
    Priority: "4" (rf. Priority of The Basic Knowledge)
    4. Insert the check mark next to "Loop" by clicking. Pose is just the looping animation of the second frame.
    5. "In(%)" & "Out(%)" are from where start and to where end to play your animation in the whole frame. Now this doesn't matter because you created just one frame.
    6. "Pose Hand" & "Expression" are options. They are hand and face morph.
    7. In "Ease In(sec)" & "Ease Out(sec)", you can add time dilation to play and stop your animation. If you put "1"(sec) in "Ease In(sec)" field, the avatar will take 1 sec to sit while morphing.
    8. Press Play button and make sure how your animation is. You can select "Preview while" pull-down menu, such as walking, sitting and so on.

    Note2: You'll find the upper body moves while walking. It is because you didn't move them at all on Poser and the priority is set at the lowest. (rf. Priority of The Basic Knowledge)

    9. Press "Upload(L$10)" button and get your animation.

    Note3: You may see the avatar sitting while hovering or sinking under ground. The hip moves by the absolute value. Meanwhile, your avatar's height depends on how you created. The length of legs is up to avatars. Keep in mind how it is suitable for the height and go back to Poser. Then you have to recreate again while ignoring the shape of figure on Poser.

    The simple spinning the whole body animation to know about the priority.
    1. Set the whole frames at 30 frames.
    2. Just create a keyframe on the hip at the 2nd frame. It becomes the 1st frame of animation in world.
    3. Make sure you turn off Inverse Kinematics on the both legs.
    4. Select the last frame and input value 360 in the "spin right-left" field on the Parameter Dials.
    5. You can see your proper aniamtion on Poser.
    6. Uplodad your animation with setting Priority at 4 and Loop on.

    Now, you'll find your animation odd. It spins but the head is doing a reverse rotating and looks in the state of still seeing the front. It is because the default built-in standing animation has the priority on its neck and head parts. You didn't move those parts in the process of creating it above and those parts are set at the lowest priority. They are overridden by the default standing animation.

    Solution
    Set the neck of the xRotate at 1(degree) and the head of the xRotate at -1(degree) on Poser.

    The usage of Inverse Kinematics
    Inverse Kinematics is one of the most useful tool to create animation.
    Let's learn how to use while you actually create animations. This sample is "Push-ups animation".

    The female figure is used in this animation.
    1. Prepare 30 frames as the whole frame and select the 2nd frame to start to create your animation.
    2. Make sure you turn off Inverse Kinematics on all of the parts.
    3. Select Hip and input "90" in the "pitch up - down" field.
    4. You'd better see your figure from the side by Camera Control.
    5. Input "-0.4" in the "move up-down" field.
    6. Select Left Thigh and input "-20" in the "xRotate" field for its tiptoe to reach the floor.
    7. Control camera and see your figure from the front.
    8. Select Left Collar and input "-20" in the "forward - back" field.
    9. Select Left Shoulder and input "-60" in the "reach down - up" field.
    10. Select Left Forearm and input "-5" in the "bend front - back" field.
    11. Control camera and see your figure from the side again.
    12. Select Left Hand and input "90" in the "bend front - back" field.
    13. Now that you see the hand is floating from the floor a bit, select Abdomen and input "15" in the "bend back - forward" field.
    14. Select Chest and input "-10" in the "bend back -forward" field.
    15. And "-10" in the "bend up - down" field of both Neck and Head.
    16. Use "Symmetry" and copy the left side body to the right side one.
    17. Now turn on Inverse Kinematics on all of arms and legs.
    18. Select Hip and go to the 15th frame.
    19. Input "-0.7" in the "move down - up" field.
    20. You see legs and arms are also bent.
    21. Input "0.03" in the "move backwards - forwards" field to unbend legs.
    22. Select Abdomen and input "-5" in the "move back - forward" field.
    23. Input "-20" in the "back - forward" field of Chest, "bend up - down" field of Neck and Head.
    24. Select and copy Hip, Abdomen, Chest, Neck and Head at the second frame to the last frame.
    25. Go back to the second frame and break spline on those five keyframes.
    26. Delete the unnecessary camera's keyframes.
    27. Play your animation.
    28. You may make sure its legs movement is a little bit odd.
    29. Select Hip and go to the 8th frame, and input "0.03" in the "move backwards - forwards" field to unbend legs.
    30. Go to the 23th frame, and input "0.03" in the "move backwards - forwards" field to shift the median point to forward a tad.
    31. Now you can see your figure do push-ups well on Poser. And you are sure to notice that you can make an animation with tweaking just a few parts of keyframes.
    32. Save it as the pz3 and export it into BVH. Upload it in world while Priority at 4 and Loop on.

    Note that you may find this animation look bad for your Avatar in world, such as hands are floting, legs are shivering. It is the exact scale issue. Try to change to several sizes' avatar and make sure it.





    TAG: animation
     

    评分:0

    我来说两句

    seccode