Variables are the core of the scene producer realtime animation possibilities. In this section the user defined variables are specified. Public variables are accessible as CG parameters and by the parent scene when nested inside another. There are some variables that are always defined like "frame" which stores the number of frames that have gone by since the scene producer started, "mouse_x" and "mouse_y" which reflect the X and Y position of the mouse at all times relative to the scene coordinate system (requires interaction aware consumer like screen_consumer), "timeline_frame" which differs from "frame" in that it can rewind and jump, depending on where the timeline is at the moment and "scene_width" and "scene_height" which contains the dimensions of the scene coordinate system. A scene variable can be referenced in expressions. It is defined under variable.[id] unless it is public because then it is in the global namespace [id]. Could be a constant or an expression. An expression is written as ${expr}. Must be parseable/resolved as the type specified. The unique variable name. Will be exposed as [id] if the variable is public or variable.[id] otherwise. The variable type. The value/expression of the variable must be parseable/resolvable as/to this type. Whether the variable should be accessible from outside the scene or not. Public variables can be accessed via CG UPDATE, CG ADD and as layer.[layerid].parameter.[id] when nested inside another scene. The layers of the scene. The layers defined first will be above the ones defined after. All properties of each layer are addressable from expressions as layer.[id].[property]. The same syntax as in AMCP after for example PLAY 1-10. Cannot be an expression. Hides the layer if true. Can be an expression. The X coordinate of the layer in the scene coordinate system. Can be an expression. The Y coordinate of the layer in the scene coordinate system. Can be an expression. The width of the layer. Is by default calculated by the producer itself but can be overridden. Can be an expression. The height of the layer. Is by default calculated by the producer itself but can be overridden. Can be an expression. The X anchor within the layer coordinate system where position and rotation are done relative to/around. Can be an expression. The Y anchor within the layer coordinate system where position and rotation are done relative to/around. Can be an expression. The rotation of the layer around anchor_x/anchor_y expressed in degrees. Can be an expression. The X position within the layer coordinate system to crop the upper left corner. Can be an expression. The Y position within the layer coordinate system to crop the upper left corner. Can be an expression. The X position within the layer coordinate system to crop the lower right corner. Can be an expression. The Y position within the layer coordinate system to crop the lower right corner. Can be an expression. The X position within the layer coordinate system to corner pin the upper left corner. Can be an expression. The Y position within the layer coordinate system to corner pin the upper left corner. Can be an expression. The X position within the layer coordinate system to corner pin the upper right corner. Can be an expression. The Y position within the layer coordinate system to corner pin the upper right corner. Can be an expression. The X position within the layer coordinate system to corner pin the lower right corner. Can be an expression. The Y position within the layer coordinate system to corner pin the lower right corner. Can be an expression. The X position within the layer coordinate system to corner pin the lower left corner. Can be an expression. The Y position within the layer coordinate system to corner pin the lower left corner. Can be an expression. Properties regarding image adjustments. They are addressable from expressions as layer.[id].adjustment.[property]. The opacity of the layer. Can be an expression. If true causes the layer to key the layer above. Can be an expression. Whether to enable mipmapping on the layer or not. Can be an expression. The blend mode to use. Can be an expression. Whether to enable chroma keying on the layer or not. Can be an expression. The degrees within 0-360 of the hue window centrum of the color to key. Can be an expression. How wide within 0.0-1.0 the hue window of the color to key should be. Can be an expression. The minimum saturation within 0.0-1.0 of the color to key. Can be an expression. The minimum brightness within 0.0-1.0 of the color to key. Can be an expression. How soft the chroma key window should be within 0.0-1.0. Can be an expression. How much of the chroma fringing should be left within 0.0-1.0. Values below 1.0 gradually replaces the fringe with a gray scale and more transparent equivalent. Can be an expression. Defined how dark the spill replacement gray scale should be. The default is 2.0 but can be anywhere between 0.0 and up. Can be an expression. A producer can expose variables that can be referenced from the scene. The element names used here should reflect the name of the parameter that should be set. Even if a parameter is not defined here they can still be accessed by other expressions under layer.[id].parameter.[variable]. If a scene producer is nested inside a scene producer its variables marked public will be available. If a text producer exposes "text", "tracking", "current_bearing_y" and "current_protrude_under_y" Marks are placed on specific timeline frames and marks start of animation sequences, stop of animation sequence and removal of the entire scene. They affect what happens when CG PLAY, CG STOP, CG INVOKE and CG NEXT are sent via AMCP. One of the mark types is "start" which marks the start of a named animation. There is an implicit start mark at frame 0 called "intro" which is started when CG PLAY is executed. The "intro" animation can be defined at another frame if desired. There is another start mark that should be called "outro" which is coupled to CG STOP. Any other start mark is used with CG INVOKE. Another mark type is "stop" which makes the timeline stop when reached. The only thing that can make the timeline move again is a CG NEXT, CG STOP or a CG INVOKE. The "jump_to" mark type tells the timeline to jump to another "start" whenever reached, enabling the possibility of creating animation loops. The last mark type is "remove" with the only purpose of completely stopping rendering when reached. It is used instead of "stop" to mark the end of the "outro" animation. Note that a "stop" or "jump_to" can be on the same frame as a "start" for example on end of intro and start of outro. There will be no conflict in this case when outro is started. The timeline frame to place the mark at. The type of mark. "start" marks the start of an animation sequence. "stop" means that any animation should stop at the marked frame. "jump_to" means that the entire timeline should jump to the mentioned start label whenever the frame is encountered. "remove" is usually the end of the "outro" animation and causes the scene to stop rendering completely. Is only used for "start" and "jump_to" marks and defines the name of the animation for "start" and the destination start for "jump_to". Each variable/layer property may be manipulated by a timeline to animate the value based on keyframes. The timelines are collectively moved forward in time based on the marks section and the CG command interaction from the outside. A timeline manipulates only one variable/layer property. The position on the timeline at any given time is globally controlled via the marks of the scene, so all timelines are always at the same frame as each other. If the variable/layer property is already bound to an expression it will be overridden by the timeline. Currently only number variables/layer properties are supported on timelines. Each keyframe specifies a value that the variable should have at a specific timeline frame. The value can be either immediately changed if no easing is specified, otherwise it is animated to the value with the given easing curve. The frame to place the keyframe at. If omitted there will be no animation but an immediate value change instead. The variable/layer property to manipulate. If it already has an expression the expression will be overridden.