Previewing animations and characters for Sandbox

The character editor is a very powerful tool and is one of the numerous subsystems within sandbox. We have already used some of its basic features, and now it's time to explore a few of the advanced features and their uses as they relate to animated characters.

Getting ready

Open Sandbox and also the character editor. Then open the SDK sample character Objects/Characters/neutral_male/sdk_character_male_v2.cdf.

How to do it...

As we saw in the previous chapter, you can easily play animations on characters through the character editor:

  1. To play an animation for a currently loaded model, simply browse to the animation name and click it and the character will immediately start the animation.
  2. For this example, start the animation _Relaxed_Run under the _Relaxed folder.
    How to do it...
  3. You will notice the LMG icon located beside the animation name. These will be discussed later. It is, however, important to know that LMGs are sets of animations which are procedurally blended between.
  4. Ensure that Animation Driven Motion is set to true.
  5. Adjust the first slider in the blend space control to -1.
    How to do it...
  6. You will notice that the character slows down and blends naturally between a fast and slow run. The other sliders control the rotation and the incline.
  7. Reset all the sliders to 0.
  8. Now, we will play an animation in a different layer on the same character. This can be useful for upper body-only animations, which we will create in a recipe.
  9. While the character is playing the _Relaxed_Run LMG animation, change the Layer property to Secondary.1.
    How to do it...
  10. Next, select the animation under the throw folder throw_leftarm_UB_01.
  11. You will see that the character begins to play both animations. The second animation is being played on the second layer in a layered fashion.

    Note

    Layer zero is the primary-layer. Usually it contains the base full body animation. All animation in layer zero must be set to full body animations.

How it works...

The animation system in the CryENGINE is a combination of a variety of existing skeleton animation technologies, including playback and blending of animation data, as well as IK-based pose-modifications. Procedural algorithms such as CCD-IK, analytic IK, example-based IK, or physical simulations are sometimes used to augment pre-authored animations.

  • The Character Editor allows character, artists, and animators to see all of these systems interacting with their content and thus, they are able to modify the content quickly and preview it to ensure its quality.
  • We explored the layer system which allows us to apply an animation to only a few selected bones, rather than to the whole skeleton.
  • The Layer System can support up to 16 virtual layers. Layered Animations are all applied at the same time onto a character.
  • This system was designed mainly for mechanical objects (such as weapons, vehicles, and so on). However, in some cases it can be used on humans as well. Human animations in a game often consist of a base animation (standing, walking, and running) and a number of modified derivatives (looking around, aiming with a gun, and reloading a gun).
  • Combining animations is equally useful for animating characters that have a large variety of equipment or weapons, while reusing basic cycles such as walks and runs.

There's more...

You will find it useful to search and filter animations as well as know the different types of animation assets. You can find out more about these topics in the following sections.

Animation driven motion

This flag is set per character instance. Set this flag which will then extract the real movement (translation and rotation per frame) of the character from the locomotion animation file and pass this information to the game-code to move the character in the world. This feature requires specifically authored motion-assets with a locomotion locator. A locomotionlocator describes the logical movement of the motionclip in the simplest way.

Searching and filtering animations

Searching and filtering animationsanimationanimation driven motion flag

Using the filter in the animation list is a good technique to quickly find particular animations. There is also a history window, which you can use to quickly move between recently played animations.

Types of animation assets

Animation assets will be tagged with a certain icon depending on the type of content.

Types of animation assets

See also

  • It is important that you have animations to work with. Refer to the Creating animation for your character recipe mentioned earlier in this chapter
  • To create upper body animations refer to the next recipe in this chapter
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.44.229