The Procedural functions provide a quick way to make simple procedurally generated textures and masks. This saves memory over having to use imported textures.
Procedural Functions
The following is a list of all the functions underneath the Procedurals category.
GeneratedBand
The GeneratedBand function generates a horizontal or vertical band from the default TextureCoordinates.
Item | Description |
---|---|
Inputs | |
Width (Scalar) | A 0-1 value that calculates the width of the procedural band. The default is 0.25. |
Sharpness (Scalar) | This controls the falloff of the band's edges. A setting of 100 will produce a very sharp band with aliasing. |
Offset (Scalar) | This value will slide the band around the texture space. |
Direction Switch (StaticBool) | Setting this to true will cause the band to be vertical instead of horizontal. Default is false, or horizontal. |
Compare (Scalar) | This is the value the texture coordinate is compared against in order to produce the band. The default is 0.5. |
Input Coordinates (Vector2) | Takes in a custom set of UVs rather than the default ones already built into the function. |
![GeneratedBand](https://d1iv7db44yhgxn.cloudfront.net/documentation/images/2c2d1d2f-035b-44f0-b1cf-cbedfab430fd/generatedband_demo.png)
GeneratedOffsetBands
Like the GeneratedBand function, GeneratedOffsetBands creates procedurally generated bands of texture across the UV space. However, this function can produce multiple bands instead of just one.
Item | Description |
---|---|
Inputs | |
Width (Scalar) | A 0-1 value that calculates the width of the procedural band. The default is 0.25. |
Sharpness (Scalar) | This controls the falloff of the band's edges. A setting of 100 will produce a very sharp band with aliasing. |
Offset (Scalar) | This value will slide the band around the texture space. |
Direction Switch (StaticBool) | Setting this to true will cause the band to be vertical instead of horizontal. Default is false, or horizontal. |
Compare (Scalar) | This is the value the texture coordinate is compared against in order to produce the band. The default is 0.5. |
Bands (Scalar) | This modifies the total number of bands. |
Input Coordinates (Vector2) | Takes in a custom set of UVs rather than the default ones already built into the function. |
![GeneratedOffsetBands](https://d1iv7db44yhgxn.cloudfront.net/documentation/images/635002ec-aaeb-474f-beb2-7fdfc81aae2b/generatedoffsetbands_demo.png)
NormalFromHeightmap
This function serves as a quick way to make a normal map out of an existing black and white heightmap, rather than having to load a separate texture into memory.
This function takes in a TextureObject (T2d) expression node, rather than a TextureSample.
Item | Description |
---|---|
Inputs | |
Coordinates (Vector2) | Takes in the coordinates for proper scaling/tiling of the heightmap. |
Height Bias (Scalar) | This is the spread used to derive a proper height from the heightmap. Default value is 0.005. |
Height (Scalar) | This controls the final strength of the normal map. Default is 8. |
Heightmap In (TextureObject) | Takes in the heightmap texture from a TextureObject expression node. |
![NormalFromHeightMap](https://d1iv7db44yhgxn.cloudfront.net/documentation/images/e209d8d5-84dc-4415-ba82-e5d2d3d56272/normalfromheightmap_demo.png)
NormalFromHeightmapChaos
The NormalFromHeightMapChaos function takes a heightmap and pans it in 4 directions, then blends the result back together to make a chaotically animated normal map.
This function is considered expensive and should be used with care.
Item | Description |
---|---|
Inputs | |
Coordinates (Vector2) | Takes in the coordinates for proper scaling/tiling of the heightmap. |
Height Bias (Scalar) | This is the spread used to derive a proper height from the heightmap. Default value is 0.005. |
Height (Scalar) | This controls the final strength of the normal map. Default is 8. |
![NormalFromHeightMapChaos](https://d1iv7db44yhgxn.cloudfront.net/documentation/images/e94e634d-8207-4a01-8ddb-b0f2669f587a/normalfromheightmapchaos_demo.png)
At the time of this writing, there is currently no input for a heightmap. Such an input can be added using the steps below. However, if you see a heightmap input, then this has been corrected and the steps below are not needed.
![Input correction](https://d1iv7db44yhgxn.cloudfront.net/documentation/images/fcb60087-2a07-4d51-ab0f-a5f038982036/normalfromheightmapchaos_correction.png)
-
Double-click on the NormalFromHeightmapChaos function node to open it in a new Material Editor.
-
Locate the Texture Object (T2d) expression node. It should currently have the default (green slime) texture inside it.
-
Create a FunctionInput expression node and connect it to the Texture (T2d) inputs on the 3 Motion_4WayChaos function nodes.
-
In the properties for the new FunctionInput expression, set the Input Type property to FunctionInput_Texture2D.
-
Set the Input Name property to "Heightmap In" to label the input.
-
Connect the original Texture Object (T2d) expression node into the Preview input of the new FunctionInput expression node.