A composition in Smode is an animated, dynamic and interactive image. There are some standard ways to introduce the third parameter in the equation, interaction.
Indeed, a composition can be though of like an image that has a range of possible looks. This is especially useful for situations where the creator wants to deliver a product that is tunable, allowing adaptation to the situation (the staging of a show, an experience interacting with the user, etc.).
Parameters are there just for that purpose. Indeed, you can choose to expose certain parameters of your elements, effects, and more to the user. Those exposed parameters are stored in a Parameter bank.
A parameter bank is a small interface offering controls over your composition.
To expose a parameter, you can right click any parameter of an element and use the command Expose as [...] parameter (... being the type of the parameter).
Here, we expose a Percentage parameter (the opacity of a layer).
When exposing the parameter, Smode will automatically create the parameter bank if it does not exist.
Changing the value of that exposed parameter will change the value of its target. It's as simple as that !
In that state, the parameter bank is a useful creation tool. Indeed, you can expose the activation of key elements and modifiers in your scene. Leaving all those variables at the top of the tree, they are always accessible. You can then use it to activate / deactivate quickly part of your compo's tree while working.
You can turn off edition mode on the Parameters bank. You will see that the parameters are directly accessible in the Parameters editor, if the bank is selected.
Imagine that you have an unbounded parameter, like the resolution of a generated mesh. You can expose that parameter to the user, but what happens when, using the parameter bank, the user sets that one parameter too high ? The compo starts to seriously lag.
There is a solution to offer you more control over your parameters. You can bound unbounded parameters if you expose them as a percentage parameter. When you right click a parameter, if the right clicked parameter is not a percentage, two versions of the command will be shown to you. The first one forces exposition as percentage parameter, while the second simply exposes the parameter without altering its type. In the following example, we right clicked an Angle:
And here we exposed the parameter two times, once as a Percentage parameter, and then as an Angle parameter.
As-is, the percentage parameter has no effect. If you try to change it, nothing will happen to the target parameter. Exposition as percentage uses an internal function to remap the values from the percentage to the target type. You can see that function in the element tree by expanding the target of the parameter.
That function has, by default, the same two values at its start and end. That is why using the exposed percentage parameter seems to have no effect.
By selecting the percentage parameter in the element tree, the function inside will be selected in the Functions editor (in the center-bottom of the main window). You can then select any of the two keyframes and you will see their identical values.
Let's switch to curve view: you can see that the line between the two keys is flat. Changing the position of the ruler does nothing. But what you can do now is to add points, change their interpolations and update their positions. You can through that define the minimum and maximum values that you desire, and disallow making your compo lag by setting it too high. You have full control over every possible value the target of that parameter can take.
If you want to control two target parameters with one exposed parameter, you can do it by using the Connect to command, accessible via right-clicking a parameter.
You can also do that by drag and dropping an element onto an exposed parameter. A menu will then ask you what variable of the dropped element you want to connect to it.
The Parameter bank at the root of your compo defines the exposed controls of that compo. Those controls become the parameters of the document itself. You can see that just by looking at the document in the file table. Those parameters are listed as children.
When referencing the compo somewhere else (in another compo, in a project, ect), your exposed parameters will be accessible within the parameters of the referenced document.
That turns compos into self-contained dynamic image generators.