Docs Visual

ComplexMix

Combines two UV fields as complex numbers: add, subtract, multiply, divide or raise one to the other, optionally weighted by a third input, then samples an image through the result.

◧ Visual

What it is

ComplexMix is the companion of ComplexOp. Where ComplexOp applies one complex function to the plane, ComplexMix takes two UV fields, treats each pixel pair as two complex numbers, and combines them with a complex operation. Feed it the UV outputs of two ComplexOps and the picture becomes the sum, product or quotient of two warps. A third input weights the combination per pixel, so the mix can follow a mask or an animated gradient.

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. The complex arithmetic is taken from Ricky Reusser's Shadertoy implementation, credited in the shader source.

Inputs and outputs

  • in1 (TOP): the image that is sampled through the combined coordinates.
  • in2 (TOP): the first complex operand (Op1), a UV map such as ComplexOp's second output.
  • in3 (TOP): the second complex operand (Op2).
  • out1 (TOP): the combined image.
  • out2 (TOP): the combined UV field, for chaining into another sampler.

Parameters

Custom

ControlType / defaultWhat it does
OperationOperation menuAdd How the two complex operands (input 2 = Op1, input 3 = Op2, read from their red/green channels) combine: either one alone, or complex add, subtract, multiply, divide or power.
Options: Op1, Op2, Add, Subtract, Multiply, Divide, Power1**2, Power2**1
WeightingWeighting on / offoff Scales Op1 by (1 - Fn Weight) and Op2 by Fn Weight before they combine. Not used by Op1 only / Op2 only.
Fn WeightFnweight number0.5 Balance between the operands when Weighting is on: 0 is all Op1, 1 is all Op2.
AspectAspect on / offoff Applies the transform in aspect-corrected space so rotation and scale stay round on non-square outputs.
Transform OrderXord menuScale Rotate Translate Order in which the transform applies scale, rotate and translate to the combined coordinates.
Options: Scale Rotate Translate, Scale Translate Rotate, Rotate Scale Translate, Rotate Translate Scale, Translate Scale Rotate, Translate Rotate Scale
TransMixtrans number0 Moves the combined coordinates along x and y.
RotRot number0 Rotates the combined coordinates by this many degrees around the pivot.
ScaleMixscale number1 Scales the combined coordinates along x and y; larger values zoom in.
PivotPivot number0 Pivot (x, y): the point that rotation and scale happen around.
ExtendMode menuMirror How input 1 is sampled where the 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 plain screen coordinates (0, input 1 unchanged) and the combined, transformed coordinates (1).

Common

ControlType / defaultWhat it does
ResolutionResolutionread-only number1280 Width and height of the built-in UV map used when nothing is wired into input 1. Disabled while input 1 is connected; the output then takes its resolution.
Input SmoothnessInputfiltertype menuInterpolate Pixels Filtering used when sampling the inputs.
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 tool 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 →