Node setup explanation

Hey people
So inspired by a recent tutorial by steve lund (cg geek) I am trying to make my own bon ross version
Here is where I need help
What exactly is he doing in the node setup below

He says that he is adding snow usin ambient occulsion node. I am well familiar with that technique and have used it in the past

  1. But why does he use this elaborate node setup instead of using ao through color ramp
  2. What is this map range node ?
    Pls can someone give a detailed description of this setup
    Thanks in advance :v:

Just looking at it, I would say it is because a simple AO is not enough. Maybe using that complicated setup would make a better landscape material, but I haven’t tested it.

The map range node remaps the input so that it becomes something else. Say you have an input that can be anywhere between 0 and 1, but you want that input to be between -10 and 10. You could use math nodes, or you could use the remap node.
An example input would be 0.5, which ends up being 0 as the output. Or, 0.2 input and -6 as the output.

So map node just alters the values.
For eg- if i want 0.5 to be the starting value instead of 0 i can achieve that using this node

That’s correct.

I just went and made up a simple diagram with a number line to illustrate it too:

1 Like

Map range is your friend. Not used here, but unlike the color ramp, it’s sockets can be driven rather then just being able to manipulate the main input. Also, it you’re doing trig math, you may want to normalize and convert a noise node to be in the 0-1 range, change that into a 0-2*pi range. Then you do trig on it making it -1 to +1 range which you then transform into 0-1 range again. Which you then may want to transform into a given log range (+1 - whatever). Which you can then transform into a wavelength number. You can combine map ranges into one, but I prefer to split them up so I can see immediately my own train of thought.

I’ll even resort to it for simple fLerp function, given the math node doesn’t have this function. Using color mix would be a choice, but you need two additional value nodes if you want to see the values intuitively.

What I miss from it is a preview output that can show which areas clip (black for below, white for above, some low grey for values in between). You could then decide to either change the remapping, do a hard clip using clamp, or soft clip using smoothmin and smoothmax functions. This would have been useful when remapping the notorious musgrave generator.

Why he uses this over color ramp? If you’re not driving and values are within 0-1 in the first place, then it’s just a matter of what you prefer. I’m not sure what the impact of smoothstep and smootherstep would be in this scenario, but using smootherstep (my preferred choice) for bump calculations is important. Ramp (not in linear mode) and curves seems to not work well with bump control.

1 Like

Thanks for the amazing explanations and diagrams