Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Parallel

Using the Linden Scripting Language


=======Sidebar=======

Animations are the personality of an avatar. They're the finishing touches after you've gotten your hair, outfit, and body just right. Sure, you could use the standard animations to get your point across, but with patience, software, and a bit of luck, you can bring your favorite real-world movements into your Second Life experience.

The first thing needed is software to create the animation outside of Second Life. There are several free options; for example, Avimator, Slat, DAZ Studio, Blender, and QAvimator, as well as commercial software like Poser, Maya, and Posemaker. Each system has its own advantages, but all make superb animations. SL uses the BVH motion format, so be sure to export this way.

The jargon related to animations is the same regardless of the software. A key frame is a frame in the animation sequence with a specified joint location, and the program will fill in all the frames between key frames to create a smooth motion. A spline is the set of equations the program uses to generate this smooth motion; if you find that your animation is moving past the key frame or in other odd ways, breaking the spline on the key frames often fixes the problem. Inverse kinematics (IK) is an option that allows you to move the entire arm or leg by moving the hand or foot along the three axes, but if you turn this option on and off, it is important to check your key-frame splines again. Playing with IK can create amazing motions, but it can also have difficult-to-predict consequences, so always save before changing the IK settings.

Now that you have the software, check that the avatar loaded into it is compatible with SL. SL cannot accept information from finger, toe, genitalia, or facial joints, so you may have to use an imported or outdated avatar. You can also edit the key frames after creating the animation to delete the information from these joints.

Let's animate! All joints used in your animation must be in a different position between the first frame and the second frame. The second frame is the first frame you will see in SL, and a good first frame often twists the avatar into a ball. If you want to exclude a body part from the animation so that only part of the SL movements are overridden, the excluded joints should be in the same position in both the first and second frames.

In the second frame, the avatar should be in the starting pose for the animation. Depending on your software, each joint can be dragged by the mouse into position or selected and then moved through parameter dials. The next key frames will be the different poses your avatar will move through to complete the animation. Remember that humans rarely coordinate moves precisely, so when moving your avatar from one pose to another, set different body parts to arrive in the target pose a few seconds within one another.

There are a few different ways you can end your animation. The most common way is with the same pose as the second frame (allowing for a seamless loop to be uploaded), or in a unique pose from which the avatar will shift back into normal SL animations. You may also create an animation with a beginning animation, a section with matching key frames at each end that can be used as a loop, and a leading-out animation. If you plan on creating this type of animation, write down the numbers the loop begins and ends at.

Once you have your animation done, export it as a BVH motion and log into SL. SL's uploading process allows you to finish customizing the animation. Here you set a priority level for your animation. The higher the number, the higher the priority. The default animations are a two, so to completely override the SL default, upload a three or four.

Timing your loop can make or break an animation. Avoid a jerky animation with a bit of math. Each end of the looped section should have the exact same key frame, and dividing the key-frame number by the total number of frames will give you the in and out percents within a degree or two. Preview the animation a few times from different in and out percents to check the loop, and don't be afraid to make the matching key frames into two or three static frames to give yourself more leeway.

Hand poses and facial expressions can be set at this stage, and beyond that, ease-in and ease-out settings define how fast your avatar will transition between animations. Now you can upload and begin testing your animation. The test server is a great place to practice. There you won't have to spend your hard earned Lindens getting that hand motion just right.

There are some limits. Subtle movements aren't always picked up by SL, and animations are limited to 30 seconds. While you can upload an animation with 60 frames per second, users will likely only see between 15 and 20 frames per second, so animations are often best in this range. Full-body movements must come from the hip joint, not the body joint, and smaller- or larger-than-normal avatars will require custom animations to maintain the motion. The fastest way to get used to the quirks of the system is to dive right in and start testing it out for yourself. In no time, your avatar will be able to do your favorite dance move or develop a signature walk or strut as unique as the rest of you.

--Kiari Lefay and Leslie Havens ===========================================


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.