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
The most important parameter of a function is its Function Shape.
You can display the result of the function through the Function Editor:
Here is the detail of the parameters of functions:
- Min / Max : Minimum and maximum of your function, can be expressed in percentage / meters / time depending on where it is.
- Inverse : Option to invert the function.
- Period : Duration of the function can be expressed in percentage / meters / time depending on function output unit.
- Offset : Shifts 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 : Changes the middle point of the function.
- Repeat : I let you guess...
- 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
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:
PARAMETERS COMMON TO ALL ELEMENTS
- Loading (Activation State): The loading status of the function. It can be loaded , enabled by not loaded or unloaded
- Activation (Activation State): The activation status of the function. It can be active , enabled by not active or inactive
- Color Label Associate a color label to your function to make it easily locatable
- Solo Activate this to keep only this function active and hide all other functions in same location
- Editable (Activation State): The editabiliy status of the function. It can be locked directly , locked indirectly or editable
- Preset (Element): Select a preset to apply on the function
- Status Warnings and errors associated to this function
Keyframe - Function key with associated interpolation data
Keyframe Function - Define a function using keyframes
Function Shape - A shape for an animation or modifier function
Parametric Function - A function that is defined by parameters (sine, square, noise, etc.)
Custom Function - Draw a function