Cloud Altitude and Density

Started by WAS, October 22, 2019, 05:45:52 PM

Previous topic - Next topic

WAS

Is it possible to get the cloud Altitude ranges of the shader from functions or something? So you wouldn't need surface layers and editing their alts with the cloud layer? I don't think there is but curious nevertheless.

Dune

Get altitude and some smooth scalar with altitudes, I suppose.

Hetzen

#2
Yes that's the way I'd do it too. You can also achieve the same thing with a series of Distribution or Surface Layers. The advantage of doing it in function nodes is you can modulate the ranges with PFs to make an undulating transition which would look more natural.

WAS

Thanks Ulco, and Jon, that looks much cleaner than than tabbing into surface layers or distribution layers, despite extra nodes.

bobbystahr

something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

WAS

It would be cool if there was a function that could read the cloud layers altitude position and give you a density disc of it's area (or map for v2). Which you could than divide up and Target all parts of the cloud. This would automatically adjust to changing cloud altitudes or depth of clouds.

Something like Get Cloud Altitudes. Even if multiple layers exist in the data, it should still apply in same alt ranges and thus target those clouds in those ranges.

WAS

For some reason when I use this as a mask it alters the PF into a solid colour.

For example, lets say I have a cloud range at altitude 1750, with a depth of 1000, so base alt 1250, max alt 2250.

If I set a get altitude up for a range of 1750 to 2250, the Density Fractal becomes solid, and doesn't seem to be masking, but breaking the PF.

If I step out of range, like minimum 800, maximum 2500, definition of the actual density starts showing as most of it is within the mask, but it's mostly the whole cloud range, and not the "tops" like id like to isolate.

Hetzen

Your TGD is working correctly. If you change your minimum altitude values incrementally every 200m or so, you'll start to see the base of your clouds flatten out until they are completely flat. The 'solidity' of your clouds is down to the 0.25 Coverage you have in the cloud node. Setting this back to 0, you'll see break up in the Density Fractals, ie gaps in your clouds again.

If you change your camera position to above the clouds, you'll see that the top detail is still there.

WAS

Quote from: Hetzen on October 29, 2019, 06:49:08 AMYour TGD is working correctly. If you change your minimum altitude values incrementally every 200m or so, you'll start to see the base of your clouds flatten out until they are completely flat. The 'solidity' of your clouds is down to the -0.25 Coverage you have in the cloud node. Setting this back to 0, you'll see break up in the Density Fractals, ie gaps in your clouds again.

If you change your camera position to above the clouds, you'll see that the top detail is still there.


Interesting. See in the final clouds there is a final density based on the merged densities, with black point at 0.25 for a little more coverage as main density is at -0.5 coverage. It still does this complete coverage thing when the final density doesn't allow that. Must need to clamp something

WAS

#9
Another issue I have is when I go to drop the "top" of the clouds to capture the "base", it doesn't work as well. A smaller end, where I want it to cutoff at 2750, captures the whole cloud, and when I set the top (end) to 4750 (actual end of the cloud layer limit), it then seems to cut the clouds in half. Lol

Additionally, inverting the masks seems to cause it show top and bottom, with the middle masked or clamped looking.

These are weird oddities I was getting with surface layers as well, and I don't quite understand them.

Hetzen

The Smooth Step creates a soft ramp from 0 to 1. It will do this over the range you put in to it. The output will seem to 'flip' when the step start value is larger than the step end value:

Step Start = 100 : Step End = 400 : Outputs 0 at 100m, 1 at 400m
Step Start = 400 : Step End = 100 : Outputs 0 at 400m, 1 at 100m

Step Start sets the black point, Step End sets the white point, is another way of looking at it. It's similar to how a Colour Adjust works when working with its black or white points in the Input Levels tab. If you move the black slider past the white, you'll see a similar 'flip'.

WAS

Quote from: Hetzen on October 29, 2019, 03:07:48 PMThe Smooth Step creates a soft ramp from 0 to 1. It will do this over the range you put in to it. The output will seem to 'flip' when the step start value is larger than the step end value:

Step Start = 100 : Step End = 400 : Outputs 0 at 100m, 1 at 400m
Step Start = 400 : Step End = 100 : Outputs 0 at 400m, 1 at 100m

Step Start sets the black point, Step End sets the white point, is another way of looking at it. It's similar to how a Colour Adjust works when working with its black or white points in the Input Levels tab. If you move the black slider past the white, you'll see a similar 'flip'.

Thank you! That explained it well for me. Especially the last bit. There is a lot of colour adjust stepping which is where the coverages were going out of control. So I'll need to rethink that, and I need to invert stepping for different isolation as you show. Thanks a lot.

RogueNZ

I barely understand how this works, but I managed to put the concepts here towards making a large CB cloud! Very basic start, and I have some more complicated ideas around shapes which I can hopefully accomplish. Thanks for sharing your TGD Hetzen.

Has there been much discussion on the use of this sort of technique to build cloud structures? Keen to read more.

Tangled-Universe

That's an insane cloud, really cool!
What's the cloud altitude and depth in this case?
I see stepping goes all the way up to 20km altitude. While such extremes do exist it's usually up to around 12km.

I guess render time is pretty long for such a large depth cloud layer?
(Can't wait until the new threadrippers are released next week!)
Quote from: Hetzen on October 29, 2019, 03:07:48 PMStep Start sets the black point, Step End sets the white point, is another way of looking at it. It's similar to how a Colour Adjust works when working with its black or white points in the Input Levels tab. If you move the black slider past the white, you'll see a similar 'flip'.

Colour adjusts are my preferred nodes to perform these kind of selections.
Besides using PF's as input for smooth steps is there any other reason why I should go for smooth step scalars instead of colour adjust?
I like it that it's doing the job with just 1 node.

@WAS Perhaps you already know, but it might still be valuable for others to know... Be aware that "get altitude" are world space values and "get altitude in texture" are specific for the element the node network eventually ends up, in this case a cloud.
So if you have a cloud layer at 1000m altitude and 2000m depth (base = 0 meters and top = 2000 meters) then when using similar smooth step scalars the results are different between get altitude and get altitude in texture.
Assume step start = 0
Assumte step end = 2000
If input = get altitude --> output is smooth gradient from 0 to 2000 meters in world space.
If input = get altitude in texture ---> output is smooth gradient from cloud altitude to cloud altitude + 2000 meters, because the cloud's principle altitude of 1000m = 0 meters in texture space.
To match the "get altitude" result you'd need to set step start to -1000 and step end to 1000.

In turn this depends on whether you use the checkbox to keep textures when moving clouds.
So before setting up any cloud work think ahead of what you intend to do with the cloud layer and (un)check the "keep texture when moving clouds" box or whatever it's called.
This assures that should you decide to make your cloud movable that you don't have to recalculate and retransform your whole network, also for altitude.
Personally I prefer to work this way by default.

Dune

Quote from: Tangled-Universe on November 18, 2019, 06:35:06 AMBesides using PF's as input for smooth steps is there any other reason why I should go for smooth step scalars instead of colour adjust?
The only thing (and you probably know) is that a smooth step has a smooth transition (from any 'grey' say into black), whereas the color adjust (when clamped) has hard edges for the same transition. Not really important for clouds, maybe, especially when used unclamped.