You are here: Reference Guide > Color Nodes > Expression

Expression

Allows you to apply complex mathematical formulas to a channel’s values using C-like syntax expressions. If necessary, you can apply different expressions to different sets of channels.

x or y is the pixel coordinate. If the input is a proxy image, then these are scaled and translated to the coordinate that would be in the full size image.

cx and cy can provide a more useful coordinate system. In this system 0,0 is the center of the picture.

-1,0 is the center of the left edge, 1,0, is the center of the right edge. 1,1 is a point 45 degrees up from the origin on the right edge (outside the top of the picture if the aspect ratio is greater than 1).

You can refer to any input channel by name, for example r for the red channel.

You can refer to any control on any node by its name. For example, Blur1.size returns the size of the blur. You can also evaluate animated controls, for example Blur1.size(t).

A blank expression is the same as zero.

All math is done with 32-bit floating point numbers.

Related Topics IconRelated Topics