Snow - Power Fractal Shader > Colour Tab > Colour Contrast

Started by penboack, December 08, 2020, 02:56:02 PM

Previous topic - Next topic

penboack

I am working on a snow scene and am making a pine tree where some of the needles are white.
I have this working, but I am not sure if I am doing this the right way!

I want the output of a Fractal Breakup Shader (Power Fractal Shader v3) to be either black or white.
To do this I find that I need to set a value for Colour Contrast that is outside the slider range, 10 seems to work well.
I then set "Clamp High Colour" and "Clamp Low Colour" to checked, not really sure that this is necessary or makes any difference.
I can then use the "Colour Offset" to control the amount of snow.

I guess that my question is, is it ok to use values outside the slider range, or is there a better way of doing this.

Screenshot 2020-12-08 195127.png

WAS

Certainly, and that is often how you'll be doing things when you want things highly customized like you are doing. And you would want this to be clamped (high/low) if you're piping this to a mask of a Power Fractal. If it's a Surface Layer and using "Mask as Coverage" then it will automatically clamp these values, as I've just recently learned and wasn't aware of. If you turn off this checkbox, it will work like a Power Fractal, and the intensity of the scalar will affect the "intensity" of the displacement/colours applied through the PF.

Be sure to use a Transform Input Shader with World Space checked so that each tree in the population gets a unique look from the PF shaders. You can apply this after the Breakup Shader, before the input to the surface layer.

penboack

Thank you,

That's very helpful.
Interesting information on the way the clamp functionality works.
I had forgotten to put in the Transform Input Shader.
Similar techniques should work for procedural leaf colour variation.

WAS

Quote from: penboack on December 08, 2020, 08:09:47 PMSimilar techniques should work for procedural leaf colour variation.

Exactly. I usually load up the leaf image into a image map shader, set to UV, repeat X, Z, then Convert to Greyscale (Function) and then I colour it with Add Multiplied Colour, followed by Multiply Colour (with the same colour PFs). Then I usually add another Multiply Colour with a Greyscale PF with black set to like 0.75 and white to 1 and use it to further vary the colour. Then I use a merge shader with the original coloured image map and a PF for the mixer, and play with it for a nice mix between original and varied colour. Great for turning fall colours, or adding some dead needles to firs.

penboack

Follow up question relating to CPU efficiency.
If you have a lot of plant models where the shading is modulated by a PF transformed to World Space would it be more efficient to have a single PF used by all the plant shading networks rather than a PF for each one?
I think that the PF is likely to be calculated per point being shaded, and therefore it will make no difference, but that's just a guess.

WAS

I honestly haven't noticed a slow down from customized assets with even tons of Pfs and shaders, but there could be. Im not sure.

Matt

Quote from: penboack on December 16, 2020, 11:50:03 AMFollow up question relating to CPU efficiency.
If you have a lot of plant models where the shading is modulated by a PF transformed to World Space would it be more efficient to have a single PF used by all the plant shading networks rather than a PF for each one?
I think that the PF is likely to be calculated per point being shaded, and therefore it will make no difference, but that's just a guess.

Some caching can occur which might give you a small speed boost from using the same node. If you have multiple shaders sampling the same point of the fractal (e.g. within the same plant), you should use the same node if possible.

If each tree samples a different part of the fractal then it will only be able to reuse the very lowest octaves and it probably won't make a noticeable difference.
Just because milk is white doesn't mean that clouds are made of milk.