SCE Fire |
Print Previous Next |
Functions Provided By SCE Fire The following table provides an overview of all functions the effect can use:
This Effect uses the Color Ramp dialog. Learn more about Using Colors.
Deprecated Functions
The SCE Fire effect supports different predefined color modes in the "Fire" mode. It is possible to set them within a macro using the SetColorMode function. Therefore the following values are defined and should be used as parameter:
The SCE Fire effect supports two different modes:"Fire" and "Flames". It is possible to set them within a macro using the SetMode function. Therefore the following values are defined and should be used as parameter:
Full Example The following example combines functions of the fire effect with sound data analysis. float new_width = 0.2; float new_fact; float old_fact; int mh;
void InitEffect() { SetBpm(400); SetDirection(DIR_UP); mh = GetMatrixHeight(); SetColorMode(COLOR_RG); }
void MatrixSizeChanged() { InitEffect(); }
void PreRenderEffect() { new_fact = ((float)(GetSoundLevel(0) + GetSoundLevel(1))) / 800.0 + 0.4; new_fact = new_fact * new_width + old_fact * (1.0 - new_width); SetHeight((int)((float)mh * new_fact)); old_fact = new_fact; }
Explanation: The source code sets the height of the fire depending on the sound level. Furthermore, it stores the current matrix height in a global variable and therefore uses MatrixSizeChanged in order to set the variable equal to the matrix size. Works best with a matrix size of 50 x 50 pixels.
|