Animation system and characters

Wikis > Game engine manual > Animation system and characters

Refer to the import page for details on importing animation in the first place; this page discusses animation once it’s within Nebula.


Animation system: components

All user-created keyframe animation is brought into Nebula as skeletal animation clips. For details on creation and import, see the FBX pipeline page. (Animations can also be created through vertex shaders (such as the Foliage shader) and by simulating physics, but that is discussed elsewhere.)

The basis of the animation system, then, is the Character node which contains the skeleton and associated Animation Clips. Clips, in turn, can contain Event markers at specific times which can be used to trigger events (through scripting, for instance). Skinned to the skeleton can be any number of Skin meshes whose visibility can be turned on and off. This constitutes the graphics model but, of itself, it will not actually play any animations in the game.

In order to play animations, you’ll need to place a Game Entity that uses an animated model as its graphics mesh. The Player Game Entity, for instance, provides a ready preset for most standard game character actions based on player input. You can also trigger animations on any Game Entity (with an animated graphics mesh) by scripting:

playanimclip(<entityID>, “<string Clip name>”, <float LoopCount (-1: infinity)> , <bool animationQueue>)

You can also control which Skins are visible through scripting:

setskinvisible(<entityID>, “<skin_name>”, <bool true/false>)




The Player Game Entity

To create a player character with basic third-person functionality, you can place a Player Game Entity into your level. Reviewing its Blueprint, you can see it consists of the following Properties (whose settings you can edit in the Level Editor):

  • GraphicsFeature:Input Property – enables the entity to receive input from a player.
  • GraphicsFeature:ChaseCameraProperty – defines how the camera follows the entity
  • GraphicsFeature:ActorGraphicsProperty – defines what model to use for graphics and animations.
  • PhysicsFeature:ActorPhysicsProperty – defines physics properties, among them how quickly the entity moves and how high it can jump
  • GraphicsFeature:AnimationControlProperty – defines which animations should be used for certain character animation
  • ScriptingFeature:ScriptingProperty – allows you to attach scripts to the game entity

If you have a new character model with animations you wish to use, this is simple enough:

  • Edit the ActorGraphicsProperty to change the graphics mesh used
  • Update all the AnimationControlProperty’s references to the new model’s animation clips
  • Adjust the ActorPhysicsProperty to set an appropriate speed (RelVelocity setting – around 500 is usually a good starting point), jump height, etc
  • You may also want to adjust the ChaseCameraProperty to control the way the game camera works
  • Once you’re satisfied, you can save your new Player entity as a Template with the “Create template from selection” option in the Level Editor’s Game menu. This way, you can reuse your player in other levels easily.


Skip to toolbar