Docs Visual

ComplexOp

Treats the image plane as the complex plane and applies a complex function to it: square, root, exp, log, the trigonometric and hyperbolic families, with iteration, a pre and post transform and a choice of edge handling.

◧ Visual

What it is

ComplexOp reads the UV of every pixel as a complex number, runs it through the complex function you pick, and samples the input image at the result. A square folds the plane once around the origin; a log turns rings into stripes; the trigonometric functions tile and warp the picture in ways a plain Transform TOP cannot reach. The function can be applied several times in a row, and a transform before and after it moves the point of interest to where the function does something worth seeing.

It is a member of the FNS operator family: pick it from the FNS tab of the OP Create dialog and it lands as one node.

Inputs and outputs

  • in1 (TOP): the image to warp.
  • out1 (TOP): the warped image.
  • out2 (TOP): the mapped UV field, for feeding another sampler.
  • borders (TOP): the border mask, where the mapped UV left the image.

Parameters

Custom

ControlType / defaultWhat it does
Operand/MapUv on / offoff On: the input is an image, warped through the function over a screen-space complex plane (Center/Aspect apply). Off: the input red/green channels ARE the complex operand, for chaining the UV output of another Complex Op.
OpOp menunone The complex function applied to z. None passes z through, so only the transforms and Extend act.
Options: none, csqr, csqrt, cexp, clog, cinv, cabs2, cconj and 19 more
PowerPower number2 Base of the logarithm for Logarithm, or the exponent n for Power (z^n). Enabled only for those two functions.
ConstConst number0 Real and imaginary part of the constant returned by the Constant function (enabled only for Constant).
Op IterOpiter number1 How many times the function is applied in a row (1-64). Higher values fold the image further; Boundary can stop the iteration early.
Center UVCenter on / offoff Map mode only. Puts the complex origin at the image centre (z runs -1..1) instead of the bottom-left corner (0..1). With Op None the result is the image tiled by the Extend mode.
AspectAspect on / offoff Map mode only. Scales the complex plane by the image aspect so circles stay round on non-square images.
Transform OrderXord menuScale Rotate Translate Order in which the pre transform applies scale, rotate and translate to z before the function.
Options: Scale Rotate Translate, Scale Translate Rotate, Rotate Scale Translate, Rotate Translate Scale, Translate Scale Rotate, Translate Rotate Scale
TransOptrans number0 Pre transform: moves z along x and y before the function.
RotRot number0 Pre transform: rotates z by this many degrees before the function.
ScaleOpscale number1 Pre transform: scales z along x and y before the function.
PivotPivot number0 Pre transform pivot (x, y): the point that rotation and scale happen around.
Post Transform OrderXord2 menuScale Rotate Translate Order in which the post transform applies scale, rotate and translate to the result of the function.
Options: Scale Rotate Translate, Scale Translate Rotate, Rotate Scale Translate, Rotate Translate Scale, Translate Scale Rotate, Translate Rotate Scale
Post TransPosttrans number0 Post transform: moves the result along x and y after the function.
Post RotPostrot number0 Post transform: rotates the result by this many degrees after the function.
Post ScalePostscale number1 Post transform: scales the result along x and y after the function.
Post PivotPostpivot number0 Post transform pivot (x, y): the point that rotation and scale happen around.
BoundaryBoundary number0 Escape radius: iteration stops once |z| exceeds this value, keeping the last value inside. 0 disables the test.
BordersBorders number0 Start of the soft edge for the borders output (third output), which shows the mapped image only near the edges of each repeated tile: 0.5 is the tile centre, 1 the tile edge.
ExtendMode menuMirror How the image is sampled where the warped coordinates leave 0..1: Hold the edge pixels, Zero (transparent black), Repeat the image, or Mirror it.
Options: Hold, Zero, Repeat, Mirror
BlendBlend number1 Mix between the unwarped coordinates (0) and the warped ones (1).

Common

ControlType / defaultWhat it does
ResolutionResolution number1280 Width and height of the built-in UV map used when nothing is wired into the input. Disabled while an input is connected; the output then takes the input resolution.
Input SmoothnessInputfiltertype menuInterpolate Pixels Filtering used when sampling the input image.
Options: Nearest Pixel, Interpolate Pixels, Mipmap Pixels
Viewer SmoothnessFiltertype menuInterpolate Pixels Filtering used when the output is displayed at another resolution.
Options: Use Input, Nearest Pixel, Interpolate Pixels, Mipmap Pixels
Pixel FormatFormat menuUse Input Pixel format of the outputs. Keep a float format when the UV output feeds another Complex Op or a Remap, or the coordinates are quantised.
Options: Use Input, 8-bit fixed (RGBA), 16-bit float (RGBA), 32-bit float (RGBA), 10-bit RGB, 2-bit Alpha fixed (RGBA), 16-bit fixed (RGBA), 11-bit float (RGB), Positive Values Only, 8-bit fixed (Mono) and 15 more

Edit this page on GitHub →