
Description
A small material function that quantizes a Gradient Input, given a set number of Steps.
Provides three outputs:
- One included
- One excluded
- Zero excluded
I made this function because I needed the output with “one included”, to get the full range of values.
Quantizing is a simple function, but its basic form:
Returns without a result that does not include one.
The same can be applied for other contexts, not only materials, such as having it as a Niagara Dynamic Input.
Results
Input
The gradient input.

Outputs
Here are the 3 outputs.
You can find the technique to visualize a gradient here.




Gradient Visualizer

Gradient Visualizer

Gradient Visualizer
Graph

Snippet
Get the text file, or get it from Epic’s Developers Community

Leave a Reply