ExprUtils¶
Inherits Double2DParam
Synopsis¶
Various functions useful for expressions. Most noise functions have been taken from the Walt Disney Animation Studio SeExpr library.
Functions¶
- def
boxstep(x,a) - def
linearstep(x,a,b) - def
smoothstep(x,a,b) - def
gaussstep(x,a,b) - def
remap(x,source,range,falloff,interp) - def
mix(x,y,alpha) - def
hash(args) - def
noise(x) - def
noise(p) - def
noise(p) - def
noise(p) - def
snoise(p) - def
vnoise(p) - def
cnoise(p) - def
snoise4(p) - def
vnoise4(p) - def
cnoise4(p) - def
turbulence(p[,ocaves=6, lacunarity=2, gain=0.5]) - def
vturbulence(p[,ocaves=6, lacunarity=2, gain=0.5]) - def
cturbulence(p[,ocaves=6, lacunarity=2, gain=0.5]) - def
fbm(p[,ocaves=6, lacunarity=2, gain=0.5]) - def
vfbm(p[,ocaves=6, lacunarity=2, gain=0.5]) - def
fbm4(p[,ocaves=6, lacunarity=2, gain=0.5]) - def
vfbm4(p[,ocaves=6, lacunarity=2, gain=0.5]) - def
cfbm(p[,ocaves=6, lacunarity=2, gain=0.5]) - def
cfbm4(p[,ocaves=6, lacunarity=2, gain=0.5]) - def
cellnoise(p) - def
ccellnoise(p) - def
pnoise(p, period)
Member functions description¶
-
NatronEngine.Double3DParam.get()¶ Return type: Double3DTuple
Returns a Double3DTuple with the [x,y,z] values for this parameter at the current timeline’s time.
-
NatronEngine.ExprUtils.boxstep(x, a)¶ Parameters: - x –
float - a –
float
Return type: floatif x < a then 0 otherwise 1
- x –
-
NatronEngine.ExprUtils.linearstep(x, a, b)¶ Parameters: - x –
float - a –
float - b –
float
Return type: floatTransitions linearly when a < x < b
- x –
-
NatronEngine.ExprUtils.boxstep(x, a, b) Parameters: - x –
float - a –
float - b –
float
Return type: floatTransitions smoothly (cubic) when a < x < b
- x –
-
NatronEngine.ExprUtils.gaussstep(x, a, b)¶ Parameters: - x –
float - a –
float - b –
float
Return type: floatTransitions smoothly (exponentially) when a < x < b
- x –
-
NatronEngine.ExprUtils.remap(x, source, range, falloff, interp)¶ param x: floatparam source: floatparam range: floatparam falloff: floatparam interp: floatrtype: floatGeneral remapping function.
When x is within +/- range of source, the result is 1. The result falls to 0 beyond that range over falloff distance. The falloff shape is controlled by interp: linear = 0 smooth = 1 gaussian = 2
-
NatronEngine.ExprUtils.mix(x, y, alpha)¶ Parameters: - x –
float - y –
float - alpha –
float
Return type: floatLinear interpolation of a and b according to alpha
- x –
-
NatronEngine.ExprUtils.hash(args)¶ param args: Sequencertype: floatLike random, but with no internal seeds. Any number of seeds may be given
and the result will be a random function based on all the seeds.
-
NatronEngine.ExprUtils.noise(x)¶ Parameters: x – floatReturn type: floatOriginal perlin noise at location (C2 interpolant)
-
NatronEngine.ExprUtils.noise(p) Parameters: p – Double2DTupleReturn type: floatOriginal perlin noise at location (C2 interpolant)
-
NatronEngine.ExprUtils.noise(p) Parameters: p – Double3DTupleReturn type: floatOriginal perlin noise at location (C2 interpolant)
-
NatronEngine.ExprUtils.noise(p) Parameters: p – ColorTupleReturn type: floatOriginal perlin noise at location (C2 interpolant)
-
NatronEngine.ExprUtils.snoise(p)¶ Parameters: p – Double3DTupleReturn type: floatSigned noise w/ range -1 to 1 formed with original perlin noise at location (C2 interpolant)
-
NatronEngine.ExprUtils.vnoise(p)¶ Parameters: p – Double3DTupleReturn type: Double3DTupleVector noise formed with original perlin noise at location (C2 interpolant)
-
NatronEngine.ExprUtils.cnoise(p)¶ Parameters: p – Double3DTupleReturn type: Double3DTupleColor noise formed with original perlin noise at location (C2 interpolant)
-
NatronEngine.ExprUtils.snoise4(p)¶ Parameters: p – ColorTupleReturn type: float4D signed noise w/ range -1 to 1 formed with original perlin noise at location (C2 interpolant)
-
NatronEngine.ExprUtils.vnoise4(p)¶ Parameters: p – ColorTupleReturn type: Double3DTuple4D vector noise formed with original perlin noise at location (C2 interpolant)
-
NatronEngine.ExprUtils.cnoise4(p)¶ Parameters: p – ColorTupleReturn type: Double3DTuple4D color noise formed with original perlin noise at location (C2 interpolant)”
-
NatronEngine.ExprUtils.turbulence(p[, ocaves=6, lacunarity=2, gain=0.5])¶ param p: param octaves: intparam lacunarity: floatparam gain: floatrtype: floatFBM (Fractal Brownian Motion) is a multi-frequency noise function.
The base frequency is the same as the noise function. The total number of frequencies is controlled by octaves. The lacunarity is the spacing between the frequencies - A value of 2 means each octave is twice the previous frequency. The gain controls how much each frequency is scaled relative to the previous frequency.
-
NatronEngine.ExprUtils.vturbulence(p[, ocaves=6, lacunarity=2, gain=0.5])¶ param p: param octaves: intparam lacunarity: floatparam gain: floatrtype: FBM (Fractal Brownian Motion) is a multi-frequency noise function.
The base frequency is the same as the noise function. The total number of frequencies is controlled by octaves. The lacunarity is the spacing between the frequencies - A value of 2 means each octave is twice the previous frequency. The gain controls how much each frequency is scaled relative to the previous frequency.
-
NatronEngine.ExprUtils.cturbulence(p[, ocaves=6, lacunarity=2, gain=0.5])¶ param p: param octaves: intparam lacunarity: floatparam gain: floatrtype: FBM (Fractal Brownian Motion) is a multi-frequency noise function.
The base frequency is the same as the noise function. The total number of frequencies is controlled by octaves. The lacunarity is the spacing between the frequencies - A value of 2 means each octave is twice the previous frequency. The gain controls how much each frequency is scaled relative to the previous frequency.
-
NatronEngine.ExprUtils.fbm(p[, ocaves=6, lacunarity=2, gain=0.5])¶ param p: param octaves: intparam lacunarity: floatparam gain: floatrtype: floatFBM (Fractal Brownian Motion) is a multi-frequency noise function.
The base frequency is the same as the noise function. The total number of frequencies is controlled by octaves. The lacunarity is the spacing between the frequencies - A value of 2 means each octave is twice the previous frequency. The gain controls how much each frequency is scaled relative to the previous frequency.
-
NatronEngine.ExprUtils.vfbm(p[, ocaves=6, lacunarity=2, gain=0.5])¶ param p: param octaves: intparam lacunarity: floatparam gain: floatrtype: FBM (Fractal Brownian Motion) is a multi-frequency noise function.
The base frequency is the same as the noise function. The total number of frequencies is controlled by octaves. The lacunarity is the spacing between the frequencies - A value of 2 means each octave is twice the previous frequency. The gain controls how much each frequency is scaled relative to the previous frequency.
-
NatronEngine.ExprUtils.fbm4(p[, ocaves=6, lacunarity=2, gain=0.5])¶ param p: param octaves: intparam lacunarity: floatparam gain: floatrtype: floatFBM (Fractal Brownian Motion) is a multi-frequency noise function.
The base frequency is the same as the noise function. The total number of frequencies is controlled by octaves. The lacunarity is the spacing between the frequencies - A value of 2 means each octave is twice the previous frequency. The gain controls how much each frequency is scaled relative to the previous frequency.
-
NatronEngine.ExprUtils.vfbm4(p[, ocaves=6, lacunarity=2, gain=0.5])¶ param p: param octaves: intparam lacunarity: floatparam gain: floatrtype: FBM (Fractal Brownian Motion) is a multi-frequency noise function.
The base frequency is the same as the noise function. The total number of frequencies is controlled by octaves. The lacunarity is the spacing between the frequencies - A value of 2 means each octave is twice the previous frequency. The gain controls how much each frequency is scaled relative to the previous frequency.
-
NatronEngine.ExprUtils.cfbm(p[, ocaves=6, lacunarity=2, gain=0.5])¶ param p: param octaves: intparam lacunarity: floatparam gain: floatrtype: FBM (Fractal Brownian Motion) is a multi-frequency noise function.
The base frequency is the same as the noise function. The total number of frequencies is controlled by octaves. The lacunarity is the spacing between the frequencies - A value of 2 means each octave is twice the previous frequency. The gain controls how much each frequency is scaled relative to the previous frequency.
-
NatronEngine.ExprUtils.cfbm4(p[, ocaves=6, lacunarity=2, gain=0.5])¶ param p: param octaves: intparam lacunarity: floatparam gain: floatrtype: FBM (Fractal Brownian Motion) is a multi-frequency noise function.
The base frequency is the same as the noise function. The total number of frequencies is controlled by octaves. The lacunarity is the spacing between the frequencies - A value of 2 means each octave is twice the previous frequency. The gain controls how much each frequency is scaled relative to the previous frequency.
-
NatronEngine.ExprUtils.cellnoise(p)¶ param p: rtype: floatcellnoise generates a field of constant colored cubes based on the integer location
This is the same as the prman cellnoise function
-
NatronEngine.ExprUtils.ccellnoise(p)¶ param p: Double3DTuplertype: Double3DTuplecellnoise generates a field of constant colored cubes based on the integer location
This is the same as the prman cellnoise function
-
NatronEngine.ExprUtils.pnoise(p, period)¶ Parameters: - p –
Double3DTuple - period –
Double3DTuple
Return type: floatPeriodic noise
- p –