Using Filters

   Print  Previous  Next

Introduction

You can use filters in order to render your output differently.

The functions looks as follows:

void Filter(int filter);

 

This function basically works whenever a matrix is used, which is the case with the MAS Script Effect, Macros for Effects, the Main Output Macro, and the Storage Place Macro. Insert the function into PostRenderEffect in order to use it.
Filters are useful tools to manipulate every MADRIX effect, videos, and images.
Several filters can be applied/used at the same time.

 

For MAS Script Effect, Macros for Effects, and the Storage Place Macro you can also use:

void SetFilter(int filter);

 

Types Of Filters

Filters are divided into several groups, such as color correction filters or transformation filters, for example.

Constants for Filters / Storage Place and Layer Effects (FX)

General Filters

int FILTER_NONE

Deactivates the filter.

Blur/Sharpen Filters

int FILTER_BLUR

This filter blurs the output.

int FILTER_BLUR_BSPLINE

This filter blurs the output applying a B-spline.

int FILTER_BLUR_CATMULL_ROM

This filter blurs the output applying a Catmull-Rom spline.

int FILTER_BLUR_GAUSS

This filter blurs the output applying the Gaussian function.

int FILTER_BLUR_MITCHELL

This filter blurs the output applying the Mitchell-Netravali function.

int FILTER_SHARPEN

This filter sharpens the output.

Color Correction Filters

int FILTER_BRIGHTEN

The brighten filter to light up the whole matrix.

int FILTER_DARKEN

The darken filter to darken the whole matrix.

int FILTER_GRAYSCALE

The grayscale filter to render the matrix grayscale, i.e. in gray colors.

int FILTER_INVERT_COLOR

The invert color filter to invert every color channel.

Color Mask Filters

int FILTER_RED

The red filter to filter out every color except the red color channel.

int FILTER_GREEN

The green filter to filter out every color except the green color channel.

int FILTER_BLUE

The blue filter to filter out every color except the blue color channel.

int FILTER_WHITE

The white filter to filter out every color except the white color channel.

int FILTER_RED_GREEN

The red/green filter to filter out every color except the red and the green color channel.

int FILTER_RED_BLUE

The red/blue filter to filter out every color except the red and the blue color channel.

int FILTER_GREEN_BLUE

The green/blue filter to filter out every color except the green and the blue color channel.

int FILTER_RED_WHITE

The red/white filter to filter out every color except the red and the white color channel.

int FILTER_GREEN_WHITE

The green/white filter to filter out every color except the green and the white color channel.

int FILTER_BLUE_WHITE

The blue/white filter to filter out every color except the blue and the white color channel.

int FILTER_RED_GREEN_BLUE

The red/green/blue filter to filter out every color except the red, the green, and the blue color channel.

int FILTER_RED_GREEN_WHITE

The red/green/white filter to filter out every color except the red, the green, and the white color channel.

int FILTER_RED_BLUE_WHITE

The red/blue/white filter to filter out every color except the red, the blue, and the white color channel.

int FILTER_GREEN_BLUE_WHITE

The green/blue/white filter to filter out every color except the green, the blue, and the white color channel.

Style Filters

int FILTER_EDGES

The edges filter to make the edges of objects/motifs stand out.

int FILTER_EDGES_POPUP

The edges popup filter to make the edges of objects/motifs stand out.

int FILTER_EMBOSS

The emboss filter to create an image with just highlights and shadows.

int FILTER_EMBOSS_POPUP

The emboss popup filter to create an image with just highlights and shadows depending on the motif.

Transformation Filters

int FILTER_INVERT_H_MATRIX

The filter flips the matrix horizontally.

int FILTER_INVERT_V_MATRIX

The filter flips the matrix vertically.

int FILTER_INVERT_HV_MATRIX

The filter flips the matrix horizontally and vertically. Therefore it instantly rotates the matrix by 180°.

int FILTER_INVERT_D_MATRIX

The filter flips the matrix regarding the depth.

int FILTER_INVERT_HD_MATRIX

The filter flips the matrix horizontally and regarding the depth.

int FILTER_INVERT_VD_MATRIX

The filter flips the matrix vertically and regarding the depth.

int FILTER_INVERT_HVD_MATRIX

The filter flips the matrix horizontally, vertically, and regarding the depth.

 

Deprecated Functions

Deprecated functions are outdated functions and should not be used anymore.

Function/Constant

Description

int FILTER_GReYSCALE

Use int FILTER_GRAYSCALE instead.

 

Example

Paste the following example into the Main Output Macro Editor to see how this filter inverts all colors of your main output.

@scriptname="Filter: Invert Colors";

@author="";

@version="2.8";

@description="";

 

void InitEffect()

{}

 

void PreRenderEffect()

{}

 

void PostRenderEffect()

{                    

  Filter(FILTER_INVERT_COLOR); 

}

 

MADRIX Version: 3.6j | Script Version: 2.22
[Ctrl & +/-] = Zoom In/Out | [Ctrl & 0] = 100%
Print   Previous   Next