My journey into rendering snow continues, this time I'm using the Object Info node for the first time to randomize how much snow is on a tree model per it's instances. I nearly have it down, except I can't figure out how to prevent the trees from being completely white or have no snow at all. I started with a Color Ramp, but I think random just selects one of the colors that is in the Color Ramp? So I added a Map Range node, which almost fixed it, but when I get rid of a white tree, it makes the others have no snow, and vice versa. I tried a Math node after the random node, but that didn't seem to be the answer, either. I have a feeling I'm just missing the right node to put in here, so I welcome all of your immense knowledge. Thank you for your patience, and helping me, even when I'm helpless.
1 Answer
The object info random output creates a differnt number between 0 and 1 for each object the material is assinged to.
Your map range node is starting at 0.2, I think what you want is the to min to be 0.2, to get a result between 0.2 and 1.
However that still would not solve the problem, since the map range node is just a monochromatic colorramp that computes faster, so having both is redundant.
My guess is that the outgoind color from the ramp is the amount of snow you're rendering. If you don't want any trees to be completely white, or don't have snow at all, simply don't choose black or white with any of the stops.
or: easier, but less control: set the map range to:
- from min: 0
- from max: 1
- to min: 0.2 (min amount of snow)
- to max: 0.8 (max amount of snow)
now take that value and multiply it with the z channel (blue) and you should get adjustable amount of snow.
Awesome solution from someone else:
https://pantarei.xyz/posts/snowline-tutorial/
-
$\begingroup$ Thank you, I now have a better understanding of the Map Range node! You are right, the output determines where the snow appears. However, I seem to be doing something wrong because there's no longer variance between the trees. I tried doing the Multiply with the Blue channel from the Separate Color node with the Map Range coming from the Geometry node, and then I tried doing the multiplication after the Add and Map Range node and same thing: Current Setup $\endgroup$ Commented Nov 28, 2023 at 23:09