Difference between revisions of "Animation"

From Second Life Wiki
Jump to navigation Jump to search
m (mintor formatting)
 
(25 intermediate revisions by 12 users not shown)
Line 1: Line 1:
<div class="titlebar">An animation, in Second Life lingo, is a set of instructions that cause an avatar to engage in a sequence of motions.<br /><br />
{{Help|Glossary=*}}
Custom animations can be created in programs such as Poser, Blender, and others. In 2005, one resident-made program was relased, called [http://caladan.nanosoft.ca/c4/software/posemaker.php Posemaker]([http://forums.secondlife.com/showthread.php?t=44734 ref-thread]). And in 2006, two free ones were released: [http://www.avimator.com/ Avimator] ([http://forums.secondlife.com/showthread.php?t=81886 ref-thread]) and [http://sourceforge.net/projects/free-bvh-editor slat] ([http://forums.secondlife.com/showthread.php?t=83702 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 &gt; Upload Animation''' command. There is a L$10 fee for uploading an animation. Animations can be previewed prior to uploading.<br /><br />
{{Otheruses4‎|animations|[[LSL]] related information about animations|:Category:LSL Animation}}
Animations can be used in gestures in Second Life but should not be confused with gestures.<br /><br />
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 Residents. 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 Residents within visual range to see your avatar perform the animation.<br /><br />
There are many animations available inworld, both free and for sale. You can get started locating some by pressing the '''Search''' button in the bottom of the SL screen, selecting the '''All''' tab, and entering "animation" as a search term.<br /><br /></div>


=== Basic Knowlege For Creating SL Animations ===
An animation, in Second Life lingo, is a set of instructions that cause an [[avatar]] to engage in a sequence of motions.
You can use animations to make your avatar clap their hands, dance, blow someone a kiss (or slap them), and much more.


'''1. The BVH file'''<br />The BVH is the text data that describes each figure part's rotation and position along a timeline.<br /><br />'''2. Hip is the top'''<br />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.<br /><br />'''3. Keyframe'''<br />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.<br /><br />'''4. The first frame'''<br />You can create a stationary posture just by one frame animation, but note that you cannot move the whole body and cannot assign multiple priorities. This is convenient when you want an absolutely stiffened posture. The first frame of the animation that you created is used as reference information for the root part (hip) between BVH and SL. The first frame's posture doesn't appear inworld at all, but is recognized as a keyframe. Inworld animation only occurs after there is a difference from the position of the first frame and a rotation angle. Therefore, a stationary pose is actually composed to two separate frames. It is a good idea to set at zero on every parts' roatiton and position at the firstframe (a "T" pose) because it makes it easier to keep track of which parts you moved.  To recap: The first frame of an animation is a reference frame and is not shown inworld; any deviation from the first frame, however, will be interpreted as an avatar animation.<br /><br />'''5. Spline interpolation'''<br />If the tool has a spline interpolation feature, you may encounter some frustration until you knew how to control it. Use the cutting spline option which must be implemented, such as "[http://forums.secondlife.com/attachment.php?attachmentid=21043 Break spline]".<br /><br />'''6. [http://en.wikipedia.org/wiki/Inverse_kinematics Inverse Kinematics]'''<br />If the tool has the inverse kinematics feature and it turns on, you might find it frustrating until you knew how to turn it off. Find and learn how to turn on/off.<br /><br />'''7. Speed of the animation'''<br />The default speed of animation is 30 FPS, that is it takes 1 second toplay 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 up to 30 seconds.<br /><br />'''8. Priority'''<br />8-1: [http://wiki.secondlife.com/wiki/Internal_Animations The default built-in animations] are always available to your avatar inworld. They have their priorities on each keyframed part. Unless you give a higher priority to your animations, your animations will be overriden by them inworld. Priorities range from 0 to 4. 4 is the highest priority. See [http://wiki.secondlife.com/wiki/Internal_Animations the default built-in animations] page to make sure what kind of priority each animation has.<br />8-2: Animation priority is only given the whole avatar, and it set in the uploading window. However, unless you alter each individual part of an avatar in your animation, some parts may be overridden by default animations (breathing, walking, etc.)<br />8-3: A later playing animation is given priority over the former one when the both priorities are the exact same.<br /><br />'''9. Optimization'''<br />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.<br />The potential side effect of the optimization is what you have observed; joints with very subtle movement might have their animation data dropped entirely on upload. The threshold formula is complex, 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.<br /><br />'''10. Scale of the avatars' parts'''<br />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 may 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 avatar. You cannot help but keep in mind how they are suitablefor the position and go back to the tool. Then you have to tweak them again while ignoring the shape of figure on the tool.<br /><br />'''11. Facial and Hands morph'''<br />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 animtions by script.<br /><br />'''12. Uploading window'''<br />1. Name: Your animation file's name.<br />2. Description: You can write something here as a note.<br />3. Priority: The range is 0-4. 4 is the highest value.<br />4. Preview while: You can select several stats to make sure your animation while playing.<br />5. Loop: Click and put the check mark here to get the looping animation. It is used when you create a stationary pose.<br />6. In(%) &amp; Out(%): You can select the range where you want to loopyour 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.<br />7. Hand Pose: You can select and add one of the several hand morphs to your animation here.<br />8. Expression: You can select and add one of the several facial morphs to your animation here.<br />9. Ease In(sec) &amp; 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.<br />10. Play &amp; Stop buttons: You can play your animation to make sure before uploading here.<br />11. Pose screen: Just click and drag up-down on the screen, the cameramoves 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.<br /><br />
== See Also ==
 
* [[How to create animations]]
=== Creating Animations ===
* [[Video Tutorial/Creating & uploading animations]]
 
* [[Internal Animations]]
''This addition to the Wiki is very Poser-5/6 centric.''<br />
* [[Animation Priority]]
 
* [http://community.secondlife.com/t5/English-Knowledge-Base/tkb-p/English_KB%40tkb Knowledge Base] articles:
* 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 [http://www.e-frontier.com/go/downloads Updates &amp; Documentations].
** [http://community.secondlife.com/t5/English-Knowledge-Base/Animation-guide/ta-p/700027 Animation Guide]
 
** [http://community.secondlife.com/t5/English-Knowledge-Base/Uploading-assets/ta-p/700165#Section_.3 Uploading  animations]
==== Setting up Poser ====
 
<br />First, you will want to get the Poser characters from [http://secondlife.com/community/avatar.php 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.<br /><br />On the '''POSE''' tab screen of Poser, you should usually open the following windows. They are under the pull-down '''Window''' menu:<br /><br />'''Parameter Dials'''<nowiki>: You can move or rotate the selected part by using these dials or inputting digits directly after clicking the value text.</nowiki><br />'''Animation Palette'''<nowiki>: You can add and edit the whole frames and keyframes on each part. And you can play and make sure your animation from here.</nowiki><br /><br />Now you can see mainly three windows, the Preview in where the SL figure you added is, the '''Parameter Dials''' and the '''Animation Palette'''.<br />On the '''Animation Palette''',you'll find all parts' name of the figure on the left side of thewindow. Green dots means keyframes. You are sure to see them on thefirst frame. You can click and select any frame and add keyframe bypressing (plus) button where is upper side of the window. You canalso delete it by - (minus) button. Click any frame and drag cursor,you can select multiple frames of parts.<br />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.<br />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.<br /><br />
 
==== Creating a sitting pose ====
 
<br />1. Input the value "2" in the right side field of "Of" where is theright top of the Animation Palette window to set up two frames as thewhole frame.<br />2. Make sure when you select the second value of any part on theAnimation Palette or input the value "2" in the field between "Frame:"and "Of", it turns to be "Frame: 00002 Of 00002". This second framebecomes the starting animation in SL.<br />3. Make sure you turn off Inverse Kinematics on the both of legs whereis under pull-down "Figure" menu to move the whole body freely.<br />4. Select Hip. You can select it by clicking the figure's hip directlyon Preview window or clicking the second frame of Hip on the AnimationPalette.<br /><br />'''Note1: Hip is the top of the hierarchy construction of figure inSL(bvh). And "Body" and "CenterOfMass" parts aren't translated intoBVH, so that they won't show any movement in world at all. What isworse that when you touch them, you'll be confused a lot because thegap of Poser and SL becomes large. You'd better not to move the both"Body" and "CenterOfMass".'''<br /><br />5. Input "-0.4" in the field of "move down-up" on the Parameter Dials window.<br />6. Select Left Thigh and input "-90" in the xRotate field on the Parameter Dials window.<br />7. Select Left Shin and input "90" in the xRotate field on the Parameter Dials window.<br />8. Select Left Foot and input "1" in the xRotate field on the ParameterDials window not to be overridden. (rf. Priority of The Basic Knowledge)<br />9. Using "Symmetry" where is under the pull-down "Figure" menu and copyleft legs to right legs. The dialog box doesn't matter which you selectbecause you're using symmetric scale parts figure.<br />10. Save this file as a Poser file (pz3) because you might change this later.<br />11. Select "Export/BVH motion..." under the pull-down "File" menu. Andselect "Scale automatically" on the dialog box before creating BVH file.<br /><br />
 
==== Uploading your animation ====
 
<br />1. Select "Uplaod Animation" under the pull-down "File" menu where is the top of screen in world.<br />2. Select your BVH file which you created.<br />3. The uploading window opens. You have to set the followings on the window.<br />Priority: "4" (rf. Priority of The Basic Knowledge)<br />4. Insert the check mark next to "Loop" by clicking. Pose is just the looping animation of the second frame.<br />5. "In(%)" &amp; "Out(%)" are from where start and to where end to playyour animation in the whole frame. Now this doesn't matter because youcreated just one frame.<br />6. "Pose Hand" &amp; "Expression" are options. They are hand and face morph.<br />7. In "Ease In(sec)" &amp; "Ease Out(sec)", you can add time dilationto 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.<br />8. Press Play button and make sure how your animation is. You canselect "Preview while" pull-down menu, such as walking, sitting and soon.<br /><br />'''Note2: You'll find the upper body moves while walking. It is becauseyou didn't move them at all on Poser and the priority is set at thelowest.''' (rf. Priority of The Basic Knowledge)<br /><br />9. Press "Upload(L$10)" button and get your animation.<br /><br />'''Note3: You may see the avatar sitting while hovering or sinkingunder ground. The hip moves by the absolute value. Meanwhile, youravatar's height depends on how you created. The length of legs is up toavatars. Keep in mind how it is suitable for the height and go back toPoser. Then you have to recreate again while ignoring the shape offigure on Poser.'''<br /><br />
 
===== The simple spinning the whole body animation to know about the priority. =====
 
<br />1. Set the whole frames at 30 frames.<br />2. Just create a keyframe on the hip at the 2nd frame. It becomes the 1st frame of animation in world.<br />3. Make sure you turn off Inverse Kinematics on the both legs.<br />4. Select the last frame and input value 360 in the "spin right-left" field on the Parameter Dials.<br />5. You can see your proper aniamtion on Poser.<br />6. Uplodad your animation with setting Priority at 4 and Loop on.<br /><br />Now, you'll find your animation odd. It spins but the head is doing areverse rotating and looks in the state of still seeing the front. Itis because the default built-in standing animation has the priority onits neck and head parts. You didn't move those parts in the process ofcreating it above and those parts are set at the lowest priority. Theyare overridden by the default standing animation.<br /><br />Solution<br />Set the neck of the xRotate at 1(degree) and the head of the xRotate at -1(degree) on Poser.<br /><br />
 
==== The usage of Inverse Kinematics ====
 
<br />Inverse Kinematics is one of the most useful tool to create animation.<br />Let's learn how to use while you actually create animations. This sample is "Push-ups animation".<br /><br />The female figure is used in this animation.<br />1. Prepare 30 frames as the whole frame and select the 2nd frame to start to create your animation.<br />2. Make sure you turn off Inverse Kinematics on all of the parts.<br />3. Select Hip and input "90" in the "pitch up - down" field.<br />4. You'd better see your figure from the side by Camera Control.<br />5. Input "-0.4" in the "move up-down" field.<br />6. Select Left Thigh and input "-20" in the "xRotate" field for its tiptoe to reach the floor.<br />7. Control camera and see your figure from the front.<br />8. Select Left Collar and input "-20" in the "forward - back" field.<br />9. Select Left Shoulder and input "-60" in the "reach down - up" field.<br />10. Select Left Forearm and input "-5" in the "bend front - back" field.<br />11. Control camera and see your figure from the side again.<br />12. Select Left Hand and input "90" in the "bend front - back" field.<br />13. Now that you see the hand is floating from the floor a bit, selectAbdomen and input "15" in the "bend back - forward" field.<br />14. Select Chest and input "-10" in the "bend back -forward" field.<br />15. And "-10" in the "bend up - down" field of both Neck and Head.<br />16. Use "Symmetry" and copy the left side body to the right side one.<br />17. '''Now turn on Inverse Kinematics on all of arms and legs.'''<br />18. Select Hip and go to the 15th frame.<br />19. Input "-0.7" in the "move down - up" field.<br />20. You see legs and arms are also bent.<br />21. Input "0.03" in the "move backwards - forwards" field to unbend legs.<br />22. Select Abdomen and input "-5" in the "move back - forward" field.<br />23. Input "-20" in the "back - forward" field of Chest, "bend up - down" field of Neck and Head.<br />24. Select and copy Hip, Abdomen, Chest, Neck and Head at the second frame to the last frame.<br />25. Go back to the second frame and break spline on those five keyframes.<br />26. Delete the unnecessary camera's keyframes.<br />27. Play your animation.<br />28. You may make sure its legs movement is a little bit odd.<br />29. Select Hip and go to the 8th frame, and input "0.03" in the "move backwards - forwards" field to unbend legs.<br />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.<br />31. Now you can see your figure do push-ups well on Poser. And you aresure to notice that you can make an animation with tweaking just a fewparts of keyframes.<br />32. Save it as the pz3 and export it into BVH. Upload it in world while Priority at 4 and Loop on.<br /><br />'''Note that you may find this animation look bad for your Avatar inworld, such as hands are floting, legs are shivering. It is the exactscale issue. Try to change to several sizes' avatar and make sure it.'''

Latest revision as of 10:14, 14 February 2012