|
Procedural Texture and Material Editor
![]() To Documentation Index 4. Function ModulesThe modules in the "Functions" submenu have one or more numeric input ports, and a single numeric output port. The output value is calculated by applying a function to the input values.ExpressionThis module allows you to enter an arbitrary mathematical expression. It calculates its output as a function of its three inputs. It also may depend directly on the current position or time for which the procedure is being evaluated. Double-click the module to bring up a window in which you can edit the expression.Your expression may include any of the following elements:
CustomThis module represents a user defined function y(x) which maps input values to output values. Double-click the module to bring up a window in which you can edit the function. You define it by specifying the output values y(x) for a set of input values of x, where x is between 0 and 1. The behavior outside the range [0, 1] is determined by the "Function is Periodic" checkbox. If you select this option, the function will repeat so that it has the same value at 0.2, 1.2, 1000.2, -0.8, etc. If you do not choose this option, the function will be constant outside this range so that f(x) = f(0) for any x<0, and f(x) = f(1) for any x>1.If you select the "Smooth Curve" option, a smoothly varying function will be used which interpolates the values you specify. If you do not select this option, a piecewise linear function will be used.
Scale/ShiftThis module represents a linear mapping of input to output values:y(x) = A*x + B where you can set the values of the two constants A and B. AddThis module outputs the sum of its two inputs.SubtractThis module outputs its first input minus its second input.MultiplyThis module outputs the product of its two inputs.DivideThis module outputs its first input divided by its second input.AbsThis module outputs the absolute value of its input.BlurThis module outputs a "smoothed" or "blurred" version of its input. That is, it averages the input value over a region of a particular width, and outputs that average. This module has two input ports: the first is the signal to blur, and the second gives the size of the region over which to average it. Because this is an input port rather than a fixed parameter, the amount of blurring can be different in different parts of the texture or material.
ClipThis module clips its input to a fixed range:
Double-click the module to set the values for Xmin and Xmax. Greater ThanThis module has two input ports. Its output is equal to 1 if the first input value is greater than the second one, and zero otherwise.You might wonder why there is a "greater than" module, but not a "less than" module. Hint: Try reversing the inputs.
MinThis module outputs the minimum of its two inputs.MaxThis module outputs the maximum of its two inputs.InterpolateThis module has three input ports. It uses the fraction input to interpolate between the value 1 and value 2 inputs. If fraction<0, the output equals value 1. If fraction>1, the output equals value 2. If fraction is between 0 and 1, the output is a weighted average of value 1 and value 2.ModThis module calculates its output value according to:y(x) = x Mod M where the input value x and modulus M correspond to the two input ports. SineThis module outputs the sine of its input.CosineThis module outputs the cosine of its input.Square RootThis module outputs the square root of its input. More accurately, its output is given by:
ExponentialThis module outputs the exponential of its input.LogThis module outputs the natural logarithm of its input. More accurately, its output is given by:
PowerThis module outputs its first input raised to the power of its second input. More accurately, its output is given by:
where x and p are the two inputs. BiasThis module calculates Ken Perlin's Bias function. Given an input value between 0 and 1, it calculates an output value which is also between 0 and 1 according to:y(x) = x^(log(B)/log(0.5)) where the input value x and bias B correspond to the two input ports. If B=0.5, then y(x)=x. Values of B less than 0.5 push the output toward smaller values, while values of B greater than 0.5 push the output toward larger values. GainThis module calculates Ken Perlin's Gain function. Given an input value between 0 and 1, it calculates an output value which is also between 0 and 1 according to:
where the input value x and gain G correspond to the two input ports, and Bias(x, B) is the Bias function described above. If G=0.5, then y(x)=x. Values of G less than 0.5 smooth the input by pushing the output toward 0.5, while values of G greater than 0.5 sharpen the input by pushing the output toward 0 or 1.
Prev: Value Modules Next: Color Function Modules
![]() |