I am trying to learn jMonkeyEngine3 and am about half-way through the tutorials. In the Animation Tutorial it says:
The [Animation] controller object gives you access to the available animation sequences.
The provided code example is:
private AnimChannel channel;
private AnimControl control;
public void simpleInitApp() {
...
/* Load the animation controls, listen to animation events,
* create an animation channel, and bring the model in its default position. */
control = player.getControl(AnimControl.class);
control.addListener(this);
channel = control.createChannel();
channel.setAnim("stand");
...
}
So it appears that you register specific 3D models with a respective AnimationControl
instance, and then that AnimationControl
acts as an API for driving animations of those models.
Where I’m struggling with is this line here:
channel.setAnim("stand");
Where is the "stand"
animation defined? Is this something that you define in, say, Blender (or whatever modeling tool you’re using)? Meaning, would the 3D artist define an animation in the modeling tool for a specific model, and then assign it a string label “stand”? And then, subsequently, that “stand” label is embedded somewhere in the 3D model file, and jME3’s internal guts negotiate the file format to read the list of available animations for that particular model?
Is this basically what’s happening, or is it something else entirely? In other words, in order for setAnim("stand")
to do something meaningful, “stand” has to be a defined animation somewhere. Where/how?