# Math node : how to use?

Hello

I know little about math node functions and I wanted to delve deeper.
That’s why I wanted to clear up some doubts.

how do i do it:
make a grayscale procedural map dark?
make a procedural grayscale map clear?

to make the soft edge of a grayscale procedural map hard?
and does a hard edge go smooth?

thanks

Each of these questions are worthy of their own topic. Providing a generalized overview of the Math node is impossible, and while your specific questions are good, it’s going to be very cluttered to answer them all in one place. I’d highly recommend you make separate topics for each question

In the meantime, let me just say- the answer to your bottom two questions is a Color Ramp node. The answer to your first question is - you reduce the value of the data. The answer to your second- plug it into a Mix Shader node between a shader and a Transparent BSDF

2 Likes

First off, think of those as values in the range zero to one (commonly written as 0…1). Black being zero and white being one, if you need a texture to be globally darker, you can simply divide it by some amount. You can also multiply it by a value between zero and one, which amounts to the same as dividing it.

If you need to make an edge sharper, I recommend the float curve node. It does the same thing as a color ramp, which Joseph mentioned, but through an interface I find easier to understand. Playing with the curve should get you there. Basically you have to draw a sharp step around the greyscale value you’re looking to sharpen. You can sample it from your render in the image editor if you want to know exactly what it is.

3 Likes

All the sockets do different mind blowing type of stuff.

2 Likes

I created the bevel from the image below.
I tried to invert the result with : color ramp and node invert to no avail.

is it possible to successfully invert it with node math ?

is it possible to reduce the horizontal curved edges and also make them square?

is it possible to subtract the part of the white line that is in the back vertical plane?

tanks

I’ll just mention that there are nodes and generators which may end up producing ranges FAR outside the 0-1 range (musgrave, brightness/contrast, trig/log functions), and others that will force clip the range going into it (color ramp), sometimes well inside it (noise). I have a special normalize value node where I can preview if I’m within clip range, but without it use a >1 and <0 node to verify where the range is, followed by a map range as the from values to force it back to 0-1 range. Forcing yourself to operate in this range until the very end makes the math you’re working with observable as color and predictable. Setting CM to RAW is also helpful. Some nodes, such as musgrave, can be best checked with bump map or microdisplacement. I’ll often use microdisplacement on a simple strip to verify I’m getting the curves I’m trying to create instead of just color.

2 Likes

Hi there,

There is a lot to say about Math and mixRGB nodes, but here is a quick example for your little cabinet.

Bevel you cannot really tighten up, neither AO, because it is calculated based on light. Not an exact value you can do a Greater than, or a Color Ramp with. It will always have that grainy kinda look I guess, except if you actually pick a high sample count and bake it.

However, you can do the same with a normal coordinate, and that will be an exact solid texture:

PS: you can still distort the normal coordinates with a noise and mix RGB on the vector line, even tho, normal tends to distort a bit funny. If you keep the rest black, you can basically mix any texture inside, and have a delicate rust area (or whatever your plan is)

AO and Bevel is neat but having a slower PC, I find normal, position and pointiness a better, more controllable option.

Happy blending!
Cheers