MonkeyT
0
Original:
There are two patterns being fed into the PBR Shader: the Diffuse property and the Emissive property. If you've got two patterns, then any combinations of the two patterns is possible. You just have to think of one as a mask which can be applied to the other. Multiplying any texture by the mask means everything coinciding with white in your mask remains the same, and everything which aligns with black on your mask becomes black.
So, to mask the Sine Wave using gradient, multiply the two patterns you have together.
To mask the gradient using your Sine wave, you'll need to invert the wavy line by subtracting it from 1, THEN multiply them together.
The gradient effect should stay consistent, no matter how far away your shape gets from the Z-Axis, but since the Sine wave is a perpetually repeating pattern, it will repeat indefinitely along the Z-axis. That's why the sphere has both a band around the middle (well, almost the middle, because the Sine wave itself doesn't center exactly at Z=0 - for that, use Cosine) and then shows circles on the sphere as the pattern starts to repeat. The farther your shape gets from the origin, the more the pattern will progress.
To avoid that, you have to make sure that the pattern gets masked everywhere you don't want it. Fortunately, there is a very easy way to do that!
The Pulse Node is a great way to limit a perpetual or repeating pattern. Basically, every Z input value that falls between the two Edge values you provide to the Pulse Node returns a value of 1, and everything outside of that Edge range returns a value of 0, which builds a perfect mask. Just multiply the Pulse Node output and the gradient output you want to keep. The Sine mode settings used in the example textures here require Edge values of -0.125 and 0.375 to trim them cleanly. ( I added a flat Diffuse value to show the torus shape. )
I hope this helps. Happy tinkering!
* Is it possible to produce the same gradient to be applied to the wavy line and not have the gradient ring or the gradient circle?
There are two patterns being fed into the PBR Shader: the Diffuse property and the Emissive property. If you've got two patterns, then any combinations of the two patterns is possible. You just have to think of one as a mask which can be applied to the other. Multiplying any texture by the mask means everything coinciding with white in your mask remains the same, and everything which aligns with black on your mask becomes black.
So, to mask the Sine Wave using gradient, multiply the two patterns you have together.
* Could one somehow produce the gradient ring without the wavy line or gradient circle showing?
To mask the gradient using your Sine wave, you'll need to invert the wavy line by subtracting it from 1, THEN multiply them together.
* Can one produce gradient effects on different shapes with this type of principle?
The gradient effect should stay consistent, no matter how far away your shape gets from the Z-Axis, but since the Sine wave is a perpetually repeating pattern, it will repeat indefinitely along the Z-axis. That's why the sphere has both a band around the middle (well, almost the middle, because the Sine wave itself doesn't center exactly at Z=0 - for that, use Cosine) and then shows circles on the sphere as the pattern starts to repeat. The farther your shape gets from the origin, the more the pattern will progress.
To avoid that, you have to make sure that the pattern gets masked everywhere you don't want it. Fortunately, there is a very easy way to do that!
The Pulse Node is a great way to limit a perpetual or repeating pattern. Basically, every Z input value that falls between the two Edge values you provide to the Pulse Node returns a value of 1, and everything outside of that Edge range returns a value of 0, which builds a perfect mask. Just multiply the Pulse Node output and the gradient output you want to keep. The Sine mode settings used in the example textures here require Edge values of -0.125 and 0.375 to trim them cleanly. ( I added a flat Diffuse value to show the torus shape. )
I hope this helps. Happy tinkering!
Last edited: