Cheetah 3D Node Math Exploration

Original:
Original.jpg
* 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.
KO_wave.jpgKO_wave_mat.jpg
* 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.
KO_gradient.jpgKO_gradient_mat.jpg
* 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.

gradient_2.jpg

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. )

trim_gradient.jpgtrim_gradient_2.jpgtrim_gradient_mat.jpg

I hope this helps. Happy tinkering!
 
Last edited:
WOW!
What a great explanation!
You sure are thorough. That really helps me understand what is going on.
Thank you so much!

I like the way the sides of the ring gradually tapers off into nothingness.

Is there a way the gradient Ring could be made with multi colors . . .
like the colors of the rainbow?

Thanks again
My Best
Jeanny
 
I forgot to ask:

Did you apply the Material separately to each object (Torus and Sphere)
or
Is the Sphere merged with the Torus?

Thanks again
My Best
Jeanny
 
Is there a way the gradient Ring could be made with multi colors . . .
like the colors of the rainbow?
Sort of. The simplest way is to use the grayscale band as a source Pattern for a Gradient Node inserted just before the Shader. The problem is that the Gradient Node is based upon grayscale values (0 to 1) so, your rainbow would reverse itself on opposite sides of its center, unlike a natural rainbow.

Rainbow_A.jpgRainbow_A_mat.jpg

To get amore natural rainbow, you'll need to do the above to create the color rainbow, then duplicate it without the Gradient Node to create a mask, then scale the size and position of the mask to display only half of the color gradient. Not impossible, but tricky. Multiply the new mask and the color gradient. I'll try to put one together tonight.
 
Last edited:
Amazing! How do you remember so much about Material Nodes?
How lucky we are.

Thanks so much for helping me out so extensively!
Hope you don't mind my Granny Awe is showing.

My Best
Jeanny
 
Last edited:
I reworked the Rainbow material to create a single spectrum rainbow (Rainbow2).
Rainbow2.jpgRainbow2_mat.jpg
To simplify the Material, I created the gradient colors using the existing Sine settings, but I created a single Mask using only the Pulse Node. The Pulse Node eliminates the repeating pattern of the Sine Node - the property I didn't mention before (Edge) softens the boundary between the white and black colors it creates, therefore it softened the boundaries of my rainbow.
.
All the textures I used in the earlier post are in the attached file.
 

Attachments

  • Sine Gradient Mods.zip
    26 KB · Views: 251
:)Thank you so much!
As soon as I get a chance I will try to use this material in one of my projects.
If I am successful in incorporating this into what I am trying to create I will post it.
All of your posted matt information will certainly help me in future endeavors

My Best
Jeanny
 
Thank you MonkeyT for you tutorial (and everybody else as well) certainly has made the "node" thing a little clearer...I think?
 
The default is 1,8 but has nothing to do with the tear-off. Please try my file:
 

Attachments

  • State2Vect2Float.jas.zip
    8.3 KB · Views: 149
OK, that helped. It's having the Radiosity setting switched on that seems to be the problem. (y)

Side Note: With Radiosity on, setting Gamma to 1.2 makes it a gradient again. 🤪
 
Back
Top