Function that maps a number (percentage, time, etc.) to a value
Function edition is a very important process to master. It is used in many aspects of Smode: animation (cues and timelines), parameters exposition, mesh generation and more.
A function relates an input and an output. Those can be anything (change a position in function of time, change a color in function of the depth in a 3D scene, etc.). Functions end up being at the heart of a lot of things in Smode.
Here is an introduction to each function type you'll find inside of Smode, go inside the specified topics of the documentation for further informations.
But, you can also use functions in masks, like in the following example.
Here, a vertical linear mask (going from point A to B along the Y axis) is used as input to a sinus function.
That sinus function allows us to make the simple linear mask 'wavy'. By changing the number of repetitions, we can define the number of waves.
Functions like that allow for a very quick result, and can be used in a lot of different scenarios in Smode. Their combinations can be very powerful and productive.
Functions always work the same and are part of a tons of layers / modifiers / tools of Smode. Each time you see a function inside an Element parameters, you can be sure that any function can be plugged in.
For instance in Function Cue :
If you want to change the function type, just click here (on the Function Type selector):
Some useful keys : -Ctrl+click : new point -Alt+click on an existing point : change interpolation - U : Change view between Curves / Track - F : Center view on selection
-Middle click : translate view -Mousewheel : Zoom in editor -Shift+mousewheel : Zoom horizontally in editor -Ctrl+mousewheel : Zoom vertically in editor
A parametric function is controlled through its parameters only. There is no edition by mouse in this one. The most important parameter is the Shape Type. It is the first parameter you'll see.
That is where you'll find all your regular functions (square / sinus / triangle / linear / Sine / noise / white noise / bounce / elastic etc.) To change the curve selection just click on the part circled in green on the image below
Each shape will have its own parameters. The standard easing shapes (first column - Sine, Quad, Cubic, Quart, Quint, Expo, Circ, Back, Elastic, Bounce) all have an Ease in and Ease out parameter. They define if the movement should be smoothed while coming from the first key, while getting to the next key, or both.
- Min / Max : minimum and maximum of your function, can be expressed in percentage / meters / time depending on where it is.
- Inverse : Invert the function
- Period : "Duration" of the function can be expressed in percentage / meters / time depending on where it is.
- Offset : Move all the function. Animating a function offset with a linear loop is a very useful trick (particularly to animate spritesheets inside of a Sprite Points.
- Phase : Move the middle point of the function.
- Repeat : Obvious
- Wrap mode : Repeat / Mirror repeat / Clamp. Must be put as Clamped in the case of Depth Mask.
Note that the noise function possesses a Transport and can so be animated.
Custom functions are functions in which you can draw ! Yeah babe yeah !
Select this function, draw it and then smooth it. There you go !
As opposed to keyframe function, where Smode generates most of the values through interpolation, the custom function has a list of values (the buffer), and the user has to indicate every one of them.
You can use your mouse and click on the function view to change its shape by hand. What one usually does after defining the shape is to plays with the smoothing parameter to even out errors.
Begin, End : Defines the begin and end, to resize the buffer (see following illustration)
Smoothing : Defines how much the function will be smoothed out to even out errors
Here is a little tutorial using a custom function :
Watch directly on youtube
Take midi notes range from a Control Device as input to control a curve. As it is one of the parametric functions, it can be found under this category:
Then choose your midi device and channel :
And have fun with it:
Note that this function can be used in many different ways into Smode:
Keyframe - Function key with associated interpolation data
Keyframe Function - Define a function using keyframes
Function Editor - The editor allowing you to manipulate every Loading inside of Smode
Parametric Function - A function that is defined by parameters (sine, square, noise, etc.)
Custom Function - Draw a function