Book Image

JMonkeyEngine 3.0 Cookbook

By : Rickard Eden
Book Image

JMonkeyEngine 3.0 Cookbook

By: Rickard Eden

Overview of this book

Table of Contents (17 chapters)
jMonkeyEngine 3.0 Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a subanimation


In this recipe, we're going to use SceneComposer to create subanimations. As the name implies, they're derived from an animation. Subanimations can be a good way to squeeze some extra out of stock models that don't have the exact animations you want, or if the modeler has gone home for the day. In this particular application, we'll prepare for the next recipe, which is about lip syncing. The Extract sub animation window in SDK looks, as shown in the following screenshot:

Getting ready

The biggest caveat when creating subanimations is that the jMonkeyEngine API uses relative time when interacting with models, while subanimations are created on a frame basis. So, the easiest way to find out which frames to extract is to open the model in an external editor and look at it in parallel.

How to do it...

Extracting a subanimation can be done by performing the following steps:

  1. With the model opened in the Scene Composer, we expand AnimControl.

  2. Now, we can see all the animations...