|On this page|
When building shaders in VOPs, you’ll often want to modify the output of nodes to suit your needs.
In this example, a Principled Shader has been applied to a sphere. It’s roughness input is connected to a Surface Color VOP with a black & white checkerboard texture. The luminance VOP isn’t strictly necessary, but makes it easier to work with the values later on.
This results in perfectly sharp reflections where the texture values are black and extremely dull reflections where they are white.
In the figure below, the left side shows the rendered results, the right side shows the roughness values
You can use a Fit Range VOP to modify the value range of the texture. This allows you to tweak the range of roughness values without having to modify your texture.
You can create the Fit Range VOP using the Shader Effects menu, MMB on the rough input to bring this up, then LMB Filter > Fit. This will automatically promote the range inputs to the parent SHOP.
We’ll leave the Source Min at
0 and Source Max at
1. We’ll set Destination Min to
0.3 and Destination Max to
0.6. This maps texture values of
0 to an output value of
0.3 and texture values of
1 to an output value of
0.6. Anything in between is interpolated linearly.
As you can see below, this leads to a much more subtle variation in roughness. Tools like this make it quick and easy to tweak the final result without going back to texture painting.
Other nodes ¶
The following are some nodes you may find useful for this type of filtering.