Properties and mechanism automations


Each of Axis' entities has several adjutable values, which represent the basic parameters of the entity. These values are called properties.
A property has a name, a value and a type. The name can be used to easily get access to the property. The value of a property can hold a simple scalar value like integer, floating point or boolean, as well as complex value like a color. It can also hold a reference to an entity.
The big advantage of properties comes when they are used with Mechanisms

The big advantage is that properties can hold not only the same property can hold different types of data like scalar values or color, as well as references to entities. For example, materials often have propertes, which reference a texture. A property may hold a simple scalar value like the intensity of a light source, but it can also hold a reference to a mechanism which produces, say, oscillating value to the light source's intensity.


A mechanism is an entity which, a bit like a function, produces a value. Mechanisms can be used as input to any property of the same type as the mechanism's value.
For example, an entity's property of some scalar value can reference a mechanism, which produces an oscillating result, and thus this entity's property becomes animated. Here are some possible usages of mechanisms:
  • Automating a motion like movement, scaling, rotation
  • Automating visual properties in materials or lights - numeral values, colors, textures
  • Using a mechanism to make some application-internal value available to the scene - an example is the TimeRateMechanism, which gives the application's time rate, and for example, can be used to link the rate of sound to the rate of time, so that sound will drop in frequency when time slows down
  • Making a property automatically reference different entities. For example, suppose a mechanism which accepts a couple of textures and returns one of them depending on time. If a material is set to reference that mechanism, instead of a texture directly, we'd have a material with animated texture
  • Simply using a mechanism as a common value, controlling many entities, for example, the rotation of a volume knob on a radio is directly related to the volume of the radio's broadcast. In this case, a mechanism can be referenced by both a property controlling the rotation of the volume-knob-mesh and a property controlling the volume of the broadcast-sound-emitter

Example: A Radio

Suppose we have a radio with a volume knob and a pitch knob. The rotation of the volume knob is directly related to the radio's broadcast volume and the rotation of the pitch knob is directy related to the broadcast's pitch. Also, there is a lamp, which glows brighter proportionally to the volume.
The relevant entities in this setting are a sound emitter for the broadcast, two transforms for the rotation of each knob and a material for the lamp. To automate the radio, we'll need two mechanisms. One to represent the volume and one to represent the pitch. The volume mechanism is referenced by
  • a rotation property in the volume knob transform
  • the volume property in the sound emitter
  • a property in the lamp material, representing the lamp's intensity
The pitch mechanism is referenced by
  • a rotation property in the pitch knob transform
  • the pitch property in the sound emitter
To make things a bit crazy, we can use an oscillating mechanism for the pitch, to make it constantly change
Automation example Radio

Example: A Projector

Suppose we have a projector, which automatically changes the projected image every several seconds. Also, a sound is played for each image. Kinda like an automated presentation.
The relevant entities in this setting are a material with the projected texture and a sound emitter to play the respective sound.
We'll need one mechanism for producing the correct texture and another one for producing the correct sound.
  • The textures mechanism is fed with all textures that will be displayed and is referenced by the texture property of the material
  • The sounds mechanism is fed with all the sounds that will be played and is referenced by the sound property of the sound emitter
A third mechanism may be used to provide the number of the slide which is currently shown and feed this value to the other two mechanisms.
Automation example Projector

The chief advantage is that the same mechanism can be used anywhere, to control anything through properties. This way a form of linking between logically related entities can be formed.
Axis has a few basic mechanisms and more will be created in future, but in contrast with other entities, mechanisms are in principle meant to be created by the programmer for the specific needs of the application. This simple, yet powerful concept was designed in order to comply with Axis's minimalistic concept

When loading animated models, Axis uses mechanisms to create keyframe animation.