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, "fps" which always contains the framerate of the scene 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. Properties regarding viewport clipping. The coordinates are relative to the scene coordinate system. They are addressable from expressions as layer.[id].clip.[property]. The X position within the scene coordinate system to clip the upper left corner. Can be an expression. The Y position within the scene coordinate system to clip the upper left corner. Can be an expression. The X position within the scene coordinate system to clip the lower right corner. Can be an expression. The Y position within the scene coordinate system to clip the lower right corner. 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. The contrast of the layer. Can be an expression. The saturation of the layer. Can be an expression. The brightness of the layer. Can be an expression. Properties regarding level adjustments. They are addressable from expressions as layer.[id].level.[property]. The minimum input level of the layer. Can be an expression. The maximum input level of the layer. Can be an expression. The gamma correction of the layer. Can be an expression. The minimum output level of the layer. Can be an expression. The maximum output level 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 to suppress spill by within 0.0-180.0. It works by taking all hue values within +- this value from target_hue and clamps it to either target_hue - this value or target_hue + this value depending on which side it is closest to. Can be an expression. Controls how much saturation should be kept on colors affected by spill_suppress within 0.0-1.0. Full saturation may not always be desirable to be kept on suppressed colors. Can be an expression. The audio volume of the layer. 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 actual value to animate to can itself be an expression. 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. Tasks are scheduled to happen whenever a certain condition arises. Use the at attribute to let the condition be that the timeline arrives at a specific frame or the when attribute to specify a custom bool expression that when becomes true triggers the task. Performs the equivalent of an AMCP CALL on the specified layer. See the producer documentation for the possible arguments. Trigger the CALL when the timeline gets to this specific frame. Trigger the CALL when the specified bool expression becomes true. The producer on this layer will receive the CALL. Performs the equivalent of a CG PLAY on the specified layer. Trigger the CG PLAY when the timeline gets to this specific frame. Trigger the CG PLAY when the specified bool expression becomes true. The CG producer on this layer will receive the CG PLAY. Performs the equivalent of a CG STOP on the specified layer. Trigger the CG STOP when the timeline gets to this specific frame. Trigger the CG STOP when the specified bool expression becomes true. The CG producer on this layer will receive the CG STOP. Performs the equivalent of a CG NEXT on the specified layer. Trigger the CG NEXT when the timeline gets to this specific frame. Trigger the CG NEXT when the specified bool expression becomes true. The CG producer on this layer will receive the CG NEXT. Performs the equivalent of a CG INVOKE on the specified layer with the specified label. Trigger the CG INVOKE when the timeline gets to this specific frame. Trigger the CG INVOKE when the specified bool expression becomes true. The CG producer on this layer will receive the CG INVOKE. The label that will be invoked. Makes the scene go to a specific start mark given a specific condition becoming true. Go to the start mark when the specified bool expression becomes true. The label of the start mark that the scene should go to.