# Planetside Software Forums

## Function Nodes In Practice => Function Node General Discussion => Topic started by: Fle R.M on October 19, 2019, 01:46:43 AM

Title: Single node to control multiple clouds density, need help please
Post by: Fle R.M on October 19, 2019, 01:46:43 AM
Hello friends.
As a new user i'm still testing the TG options. I would like to control the coverage of all the clouds simultaneously with a single node.
Can a lovely person tell me which node should I use in this case? And where should i plug it?  Please take a look in the attached image.
Best regards
nodes.png
Title: Re: Single node to control multiple clouds density, need help please
Post by: Dune on October 19, 2019, 03:18:11 AM
First of all, welcome to this forum. I hope you like TG and stay here.

There's an input called final density. If you take one fractal (either power fractal or cloud fractal, with appropriate sizes and such) and plug this into each of those, you can alter all nodes at once. And of course you can mask this power fractal (PF) by other color fractals or other color shaders like a simple shape.
But beware that the power fractal is 3 dimensional, so not all cloud altitudes will change the same.
If you plug in a (blue node) constant color, you can alter density in an unvaried way from black (no clouds) to white (max cloud coverage).
Title: Re: Single node to control multiple clouds density, need help please
Post by: Fle R.M on October 19, 2019, 05:43:31 AM
Quote from: Dune on October 19, 2019, 03:18:11 AMFirst of all, welcome to this forum. I hope you like TG and stay here.

There's an input called final density. If you take one fractal (either power fractal or cloud fractal, with appropriate sizes and such) and plug this into each of those, you can alter all nodes at once. And of course you can mask this power fractal (PF) by other color fractals or other color shaders like a simple shape.
But beware that the power fractal is 3 dimensional, so not all cloud altitudes will change the same.
If you plug in a (blue node) constant color, you can alter density in an unvaried way from black (no clouds) to white (max cloud coverage).
Thank you Dune for this fast answer, i'm going to test it asap. Thank you
Title: Re: Single node to control multiple clouds density, need help please
Post by: Matt on October 19, 2019, 02:42:01 PM
Welcome to the forum!

Another idea you can try is to use "Add Scalar" and "Constant Scalar", as in the screenshot below:

coverage.png

You can find these nodes with the Quick Node Palette (press Tab or N, then start typing the name of a node). Alternatively, you can right-click on the density fractal node to open a context menu, go to the Function submenu and add the nodes from there. Adding the nodes this way has the advantage of automatically connecting them and making space in the node network.
Title: Re: Single node to control multiple clouds density, need help please
Post by: Dune on October 20, 2019, 02:44:07 AM
Add scalar? Then you need to use a negative value to minimize clouds, but minus 1 would probably be not enough as clouds are unclamped. And a positive value would add an overall white to the clouds, also where there were no clouds before. I would say a multiply + constant scalar would do the job better. Or am I missing something?
Title: Re: Single node to control multiple clouds density, need help please
Post by: Hetzen on October 20, 2019, 01:26:33 PM
Yes that's what you'd think with an input called Final Density. But Coverage is the area of the noise that is positive.

Adding, moves an inherently oscillating noise through a zero plane, exposing more white+ values the more you add.

Multiplying adjust peaks, and 0 will always stay 0 no matter how much you multiply it by.
Title: Re: Single node to control multiple clouds density, need help please
Post by: WAS on October 20, 2019, 01:34:07 PM
Quote from: Hetzen on October 20, 2019, 01:26:33 PMYes that's what you'd think with an input called Final Density. But Coverage is the area of the noise that is positive.

Adding, moves an inherently oscillating noise through a zero plane, exposing more white+ values the more you add.

Multiplying adjust peaks, and 0 will always stay 0 no matter how much you multiply it by.

Well, again, Hetzen, they are unlcamped... So you would be getting negative values where 0 isn't zero, but negative, that than coverage adjustments can utilize, etc.......

If it was all clamped input, then you'd have a solid colour coverage adjustments would utilize, as "0" is just being effected (outside density).
Title: Re: Single node to control multiple clouds density, need help please
Post by: Hetzen on October 20, 2019, 01:59:31 PM
If the DF is clamped at 0, sure, you're not getting negative values of the noise that you can pull through zero by adding.
Title: Re: Single node to control multiple clouds density, need help please
Post by: Matt on October 20, 2019, 03:24:24 PM
Quote from: Dune on October 20, 2019, 02:44:07 AMAdd scalar? Then you need to use a negative value to minimize clouds, but minus 1 would probably be not enough as clouds are unclamped. And a positive value would add an overall white to the clouds, also where there were no clouds before. I would say a multiply + constant scalar would do the job better. Or am I missing something?

The original question used the word "coverage". Cloud Layer V2/V3 and Cloud Density Shader perform "coverage" adjustments by addition, so the math is the same as the solution I provided. I'm assuming the Cloud Density Fractals aren't clamped, because usually they aren't in a normal cloud setup so that the coverage slider works properly.

However, yes, you may need to use a large range of values. Negative 1 may not be enough to remove all clouds; you might need negative 2 or more, but it's the same with the coverage parameters.
Title: Re: Single node to control multiple clouds density, need help please
Post by: Dune on October 21, 2019, 02:39:11 AM
Thanks, guys. Into the brain. I was reading the first post as a need to decrease coverage to zero, hence my interpretation.
Title: Re: Single node to control multiple clouds density, need help please
Post by: Fle R.M on October 21, 2019, 06:56:34 AM
Quote from: Dune on October 19, 2019, 03:18:11 AMFirst of all, welcome to this forum. I hope you like TG and stay here.

There's an input called final density. If you take one fractal (either power fractal or cloud fractal, with appropriate sizes and such) and plug this into each of those, you can alter all nodes at once. And of course you can mask this power fractal (PF) by other color fractals or other color shaders like a simple shape.
But beware that the power fractal is 3 dimensional, so not all cloud altitudes will change the same.
If you plug in a (blue node) constant color, you can alter density in an unvaried way from black (no clouds) to white (max cloud coverage).
Thank you friend, this solution worked . I've just plugged the Contant Colour node into the "density fractal" input of each cloud.
Title: Re: Single node to control multiple clouds density, need help please
Post by: Dune on October 21, 2019, 07:23:33 AM
Into the input of the density fractal (that way you'll add a constant color to the density fractal) or into the input in the cloud shader where the cloud fractal went (then you get an even color in the clouds)? If it worked, I think you mean into the mask input of each density fractal.