It is often desirable for animators to have precise control over when the game engine does something, in order to control the look and feel of the game. The Animation Notes system allows this, by forwarding an artist's Notes into HSL, where game logic can respond to the Notes to achieve whatever effect was desired.
Animation Notes (or Track Notes) are embedded as a part of an animation during the export process.
What problem(s) does this solve?
- Provide animators a way to communicate key points in animations to game logic
What problems(s) does this not solve?
- Does not define a structure for Notes as it is still up to your designers, animators and programmers to determine what kinds of things Notes can do.
- Animation Notes are used by Animators to communicate key frames in the animation to the game engine
- Animation Notes are interpreted by HSL Game Logic
- The meaning of all but a few built-in Notes are up to your designers, animators and programmers to define.
Built-in Notes and Note format
HeroEngine automatically generates Notes for the beginning and end of animation sequences.
- *BEGIN generated automatically at the start of an animation
- *END : generated automatically at the end of an animation
- *NOTE <note Text> : All animator-authored Notes will have *NOTE prepended automatically to the text that was exported
The use and design of Notes
Before your animators start tossing in Notes into their animations, it is important that your designers, animators and programmers come together and talk about how and what you want Animation Notes to be able to accomplish. Once your team comes up with the types of things you want to do with Animation Notes, they need to talk about a standard for Notes and plan out the types of Notes that are common to your design.
For example, imagine an animation that does a whirlwind attack with a sword, where the animators would like to have nearby enemies react to being hit, with an impact animation. Your designers might decide that you want nine Animation Notes representing roughly 40 degree arcs, so impacts occur in sync with the clockwise rotation. You might be tempted to add Notes named something like WHIRLWIND 0 DEGREES. However, remember consistency counts when the game programmers have to write the code to actually do something with the Note. It might be better to standardize all of your impacts to work with N arcs and format the names IMPACT ARC 1.
While it is perfectly reasonable to have one-off Animation Notes for special things, creating the structure for reusing Notes in a consistent manner will streamline things and make best use of your programmers' time.
Max supports the concept of Animation Note Tracks, but that functionality does not exist in Maya. Consequently, we created an Animation Sequence Ability called Notes that moves the capabilities into the sequence instead of embedded within the animation file as done in Max. In general, we expect that users will choose to utilize the Animation Panel to create animation notes (though if you are using the Max pipeline you can still add Animation Note Tracks there if you choose).
Creating a Note in Max
- Access the Curve Editor and select the highest object in the hirearchy. In the case of a biped animation, that will be the Bip01 root bone, or if you are adding to a grouped animated asset, you must select the entire group.
- Click on the Tracks menu in the Curve Editor or Dope Sheet(max 8) and select: Tracks--> Note Track--> Add. This will create a Note track in a sub slot of the object selected.
- Switch over to the dope sheet ( Modes--> Dope Sheet ) and find the track you just added.
- Right-click, and choose Add Keys.
- To place keys on the desired frames, simply click in the Note tack space.
- Once the keys are placed, right-click on them to open the popup dialogue and add the Note.
When adding Notes for animations be sure to follow the format designated for that particular action. For example, when adding Notes to a combat animation, most common terms might be: "Swoosh"; "Whoosh", "Impact 1of3"; "Impact 2of3"; etc. Check with the person who will be adding effects and/or sound to get a better idea of exactly what Notes they will need.
Animation Notes in HSL
When HeroEngine encounters an Animation Note, it raises an event on the $BASECHARCONTROL system node in the _onAnimationNote method. By default, the event is then forwarded to the class methods scripts for the animating node in a shared function ProcessAnimNoteForCharacter. That means if you have a system that wishes to respond to Animation Notes for an animating object, you need only GLOM on a class that implements the ProcessAnimNoteForCharacter shared function.
// This shared function is (by default) called on the class method scripts of the animating node // allowing them the opportunity to react to the Animation Notes authored by animators. shared function ProcessAnimNoteForCharacter(actor as NodeRef of Class HBNode, sequence as String, Note as String, time as Float) .
It should be noted that the sequence string passed into this function call has the name of the channel prepended to the name of the sequence, and is separated from it with a colon (:).