Planetside Software Forums

General => Image Sharing => Topic started by: Hetzen on August 18, 2010, 12:07:43 PM

Title: Cloud Busting
Post by: Hetzen on August 18, 2010, 12:07:43 PM
Something I've always failed to do so far in TG, is coming up with interestingly shaped clouds. What I've found to be the problem, is the clamping that goes on in the cloud node itself. Essentially, the cloud node defines the top and bottom of the cloud layer. Anything that falls below the base altitude is rolled off to flat. This is actually desireable, as most cloud's bases appear flattish. The same thing happens at the cloud node's cloud ceiling, which in some cases is what we want, but when I look outside at the armada of white fluffy ships sailing in the wind, I always see curvature and tall bastion spires to their tops.

So I've been scratching my head on how to control how much the tops of our clouds reach the cuttoff point in the cloud node's ceiling.

Just to explain, the cloud node's settings which determine the top and bottom of a cloud layer are, altitude which sets the mid point of the cloud layer, and depth is how deep the layer is from this midpoint. In other words, a cloud layer set at 4000m with a depth of 2000m means the base of the cloud is 3000m and it's top is 5000m.

The problem is, is that by just using another PF to modify the DF, you end up just subtracting islands of 3d noise, which have no concept of a top or bottom to your cloud layer. So you end up with clouds subtracted by clouds, which equals lots of smaller clouds, and still being cutoff by the cloud node ceiling.

What I needed to do, is subtract a shape from the cloud density fractal. Something that does not exist outside a set range. Like a heightfield. HFs have a floor and a maximum height, that can be coloured to base black, max height white, so we now have a range we can subtract from the cloud density fractal.

Here's where I am with this so far. All images use the same cloud density fractal and cloud node. The first has no subtraction. The second has full subtraction. The third has half subtraction.

Now this is early days, as I've not played around too much with the heitfield fractal, and am sure there are better shapes to be had. I also want to find a better way other than using HFs. I've not tried 2d PFs (setting y to 0 in the PF scale) with much success yet. So if anyone has some thoughts, please chime in.
Title: Re: Cloud Busting
Post by: dandelO on August 18, 2010, 01:02:12 PM
Nice ideas, Hetzen. What I've been doing is much the same idea; using a set cloud depth and, in much the same way as you describe, subtracting shapes from that. For example, I'll set a cloud layer to have 3 or 4 thousand metres depth, without a fractal that's just one big, solid block of cloud. I then use surface layers(Y for alt) for distributing the forms within that boundary. Multiple surface layers can control many fractal's distribution, per single cloud layer. I done this with my cumulus-fractus to control the wispiness distribution, I'm also doing much the same with my new WIP mammatus setups. Subtracting from a block of bare cloud is definitely the way to go, though. Keep going! :)
Title: Re: Cloud Busting
Post by: Hetzen on August 18, 2010, 01:03:16 PM
Two more. This time a more varied and interesting Heightfield, an a new cloud DF seed. The second image has had a colour adjust put in between the HF and the subtraction function.

As you can see in both images, there is little to no clamping on the top of the clouds.

Another way of looking at this technique. Imagine creating a terrain, then say that clouds can only exist inside those mountains.
Title: Re: Cloud Busting
Post by: Hetzen on August 18, 2010, 01:06:56 PM
Quote from: dandelO on August 18, 2010, 01:02:12 PM
Nice ideas, Hetzen. What I've been doing is much the same idea; using a set cloud depth and, in much the same way as you describe, subtracting shapes from that. For example, I'll set a cloud layer to have 3 or 4 thousand metres depth, without a fractal that's just one big, solid block of cloud. I then use surface layers(Y for alt) for distributing the forms within that boundary. Multiple surface layers can control many fractal's distribution, per single cloud layer. I done this with my cumulus-fractus to control the wispiness distribution, I'm also doing much the same with my new WIP mammatus setups. Subtracting from a block of bare cloud is definitely the way to go, though. Keep going! :)

Yeah I've been playing around with subtracting from white. But I actually like getting the weird shapes out of PFs, then subtracting into those.

Have you ever managed to get a flat PF. ie one that doesn't change over Y. I've not really looked into it, but when I had, I didn't get the result I was looking for, by setting the y scale to 0. Maybe a really small number instead. The problem with HFs, is that you are limited to it's boundry and resolution.
Title: Re: Cloud Busting
Post by: Hetzen on August 18, 2010, 02:38:04 PM
Actually, re-reading your post Martin, using surface/distribution throughout the altitude is not a bad idea, although I'd imagine getting things to line up is a bit of a pain.
Title: Re: Cloud Busting
Post by: Hetzen on August 18, 2010, 02:59:35 PM
Just a few more. The first shows the connections, second a softer edge on the clouds, the third with the heightfield underneith it (although you have to take perspective into consideration).

I've circled in red the important bit in the HF shader. You need a control of 0 to 1. This also applies for your DF. It needs to be clamped in upper and lower colour.
Title: Re: Cloud Busting
Post by: Tangled-Universe on August 18, 2010, 03:21:23 PM
Very interesting techniques Jon. Definitely worth investigating.

There's indeed no clamping at the bottom and top of the clouds, that's already a great improvement.
However, in some parts the density of the fractal drops completely and leaves huge features without any profile. See what I mean?

I don't think that has something to do with your technique, it's inherent to the cloud-/fractal architecture.
It's extremely difficult to get an absolute homogenous distribution of same sized, dense, tall/high features. I wonder if it is even possible at all?

Luckily, for still images, it isn't a huge problem, but still very challenging. However, for animation purposes it's very important to have this.
Title: Re: Cloud Busting
Post by: Hetzen on August 18, 2010, 03:41:55 PM
Yes you are right Martin. But I think this can be fixed with the warp shader, although I do actually like the variation in texture, especially if you have a couple of other cloud layers in there.

As for animation, everyting should stay still. There is very little one arm banditing with the seeds here. What would be very usefull, is being able to simulate the Heightfield generate, without creating a bitmap. ie a 2d fractal. Even better if it warps around the planets altitude.

But the real goal here is to create far more interesting variation in cloud tops. This I think has been achieved in the context with what I need it for right now, which is essentially above cloud, rather than the looking up perspective.
Title: Re: Cloud Busting
Post by: domdib on August 18, 2010, 05:39:04 PM
Looks very interesting  - hope your investigations bear further fruit.
Title: Re: Cloud Busting
Post by: dandelO on August 18, 2010, 07:49:17 PM
I had the wrong idea when you said 'subtracting' from the cloud. I thought you meant cutting away at a fixed block, not subtracting from each fractal.

I meant something like this(as crude as it gets but I can't think how to describe it without a diagram).

[attachimg=#]

Using this method, I can constrain as many fractals as I want to a given height range. Here, just 2; a low base fractal and a high billowy one. I blend them together, so the billows only appear where the base fractal is and constrain them to intersect and fade into each other with alt fuzzy zones. This way, I am not relying on the cloud layer depth, or its boundary limits, I'm just filling a pre-set space with layers that I can blend in myself.

It's been working for me, I was facing nasty limitations trying to stretch fractal forms with a default layer's depths and such, maybe this is far from what you are talking about. :-\
Title: Re: Cloud Busting
Post by: dandelO on August 18, 2010, 08:00:49 PM
In practice, here's my quickie(the simple shape shader here simply serves to isolate the cloud, so we can see the edge profile).

[attachimg=#]

The numbers are a bit different in this clip than they are in the theory diagram but it's the very same technique.

This cloud clip will appear in the sky at; X=0m/Z=10,000m. It's also 10,000m square, you can't miss it! ;)

[attachimg=#]

Still, I don't know if that's any help at all, sorry if I'm off the beat! :D

Title: Re: Cloud Busting
Post by: dandelO on August 18, 2010, 08:10:55 PM
Quote from: Hetzen on August 18, 2010, 12:07:43 PM
Essentially, the cloud node defines the top and bottom of the cloud layer.

Reading back, I think I do understand you correctly, after all.
With altitude constraints, the cloud node no longer defines this, you do! ;)

Make the base cloud as deep as you like, you only need show your own restricted portions of that depth. Just find a good balance of initial cloud layer depth/samples, you won't want a 100,000m deep cloud, or you'll be there for 100,000 days rendering.

* Edit: A limitation of this method is, there will be falloff the further you get from the origin because Y is used for altitude, I think.
Would using non Y altitude surface layers take measurements from the planet surface normal, like the cloud layer does?

* Edit: Added attachements.

You can see multiple floors and ceilings here, still only one cloud layer but, density fractals with surface layers control each floor/ceiling.
It's still blended by the simple shape shader so, these 'floors' are stacked atop one another, you could fly between them.
Sorry they're horrid fractals I've quickly thrown together, it just shows basically how I would slice a single cloud layer.

[attachimg=#]

And, a nasty one with some noisy cloud on top of the second floor(has its own floor too, it's hidden in the middle of the second).

[attachimg=#]

And with that, I will hijack your thread no more, Hetzen! :-[
Title: Re: Cloud Busting
Post by: Tangled-Universe on August 19, 2010, 02:18:34 AM
Interesting techniques Martin, definitely useful. The culprit with your technique is that you still have a soft base and top of the cloud. Yes, you can set the fuzzy zones to 0, but it will highly probably chop away clouds somewhere.

I think a "hybrid" approach might work best, but I think I'll Jon let that explain himself, because he showed me his way of subtracting fractals (it's slightly different of "just" subtracting).

It's just very hard to get natural looking unclamped clouds.
Hopefully Matt finds time ever to create Cloud V4.
Title: Re: Cloud Busting
Post by: dandelO on August 19, 2010, 05:30:44 AM
Indeed, Martin. :) But, if it wasn't a hugely flawed, hack-n-slash method(as per my usual) I wouldn't be proud to put my name to it! :D

I never got the heightfield method to work on a cloud before, I remember someone posted some great work on this about a year ago, too.

The fractal colour subtraction in combination with a generated heightfield shape is a great idea.
I'll keep playing but I'll let Hetzen have this thread back and post to a different one if I need to, sorry again for the invasion.
Title: Re: Cloud Busting
Post by: Hetzen on August 19, 2010, 06:24:23 AM
Hey, no problem with anyone chiming in on this at all. As far as I'm concerned, the challenge was set in the first few lines at the top of the thread, and your method certainly conforms to the idea of being able to shape clouds. Thanks for taking the time to explain it.

My problem with blending fractals in the cloud layer, is the softness you get as you hack into white with greys, as Tangled Martin has pointed out. The way I wanted to approach this, is by using billows noise to at least keep the integrity of billows from the cutting off the top. The other advantage, is that I can see what my HF is doing extruded from the ground, and allows me to paint in/out areas, or add other features if wanted, before I go into long cloud preview renders. So I think I get more control, at the cost of being restricted to HF boundries and resolution.

What I would like to know, is how to create a 2d fractal from PFs. I can do this with perlin functions, I just keep 0 in it's y input, but then I'd have to end up recreating a PF from scratch, to get the variation of noise in. And tbh, that scares me atm.
Title: Re: Cloud Busting
Post by: Tangled-Universe on August 19, 2010, 07:02:38 AM
You can't split the output of a powerfractal into components?
Title: Re: Cloud Busting
Post by: Hetzen on August 19, 2010, 07:10:44 AM
Yes you can, but what I'm looking for, is noise that doesn't change through altitude/y. If you just take the x and z, it will change the higher you look at the noise. I think.
Title: Re: Cloud Busting
Post by: dandelO on August 19, 2010, 07:37:42 AM
I'm not sure I get your meaning of a 2D fractal. It's only 3D when volume or displacement is added.
Is it like an alpha mask, black and white, with no range, so the border of B/W is the only area where there's noise?
Title: Re: Cloud Busting
Post by: MGebhart on August 19, 2010, 08:00:49 AM
Excellent post.
Title: Re: Cloud Busting
Post by: Hetzen on August 19, 2010, 08:13:18 AM
I think the best way to describe what I'm looking for, is when you use a heightfield from a map, white equals the peaks, black the valley. So you extrude out from a flat plane.

With PFs you have this plane, but it evolves through y, so each plane slightly changes as you reference it against a new y position.

You can see this when you stick a PF or DF into a cloud node. What you get are blobs of noise. Clouds.

But when we apply displacement on the ground, we don't see sperated blobs as we apply displacement through y. To prove this, your displacement value as you change it always keeps the same form, but in relative scale to the displacement.

What I need is a noise I can apply to the clouds, that has no change in pattern through y.
Title: Re: Cloud Busting
Post by: dandelO on August 19, 2010, 08:33:59 AM
Instead of making your fractal 'Y stretch' zero, make it larger than the total cloud layer depth.

[attachimg=#]

[attachimg=#]

???

It's still placed by a simple shape circle just for visibility, with complete white to black falloff to the edge in one, no falloff in the next. The fractal is flattened to b/w only. I imagine you want to warp or deform those pillars, If I understand correctly?
Title: Re: Cloud Busting
Post by: schmeerlap on August 19, 2010, 08:41:39 AM
A really, really useful topic. Those fragmented bits of stray cloud always bugged me. I've downloaded this topic for further study.
Thanks Hetzen, dandelO, et al for the work you guys put into this.

John
Title: Re: Cloud Busting
Post by: Henry Blewer on August 19, 2010, 08:57:11 AM
Yes there has been some real gold being posted here lately. I am tired of the stray cloud parts also. I have been masking them out lately. I have been using power fractals to blend out the naughty cloud parts. Using the same seed as the density shader for the cloud seems to work. Changing the noise makes things more interesting.
Title: Re: Cloud Busting
Post by: Hetzen on August 19, 2010, 09:20:38 AM
Quote from: dandelO on August 19, 2010, 08:33:59 AM
Instead of making your fractal 'Y stretch' zero, make it larger than the total cloud layer depth.

[attachimg=#]

[attachimg=#]

???

It's still placed by a simple shape circle just for visibility, with complete white to black falloff to the edge in one, no falloff in the next. The fractal is flattened to b/w only. I imagine you want to warp or deform those pillars, If I understand correctly?

Thanks Martin. But that's not what I'm looking for. Attached is the sort of thing. I need varrying shades of 0 to 1 to subtract from the cloud DF.

The problem is keeping that pattern as you apply it to PFs through y. Hence why I used an HF. I suppose I can use a bitmap, but then you still have the resolution issue.
Title: Re: Cloud Busting
Post by: Hetzen on August 19, 2010, 09:21:50 AM
Weird. The image I attached seems to have appeared in your post. LOL
Title: Re: Cloud Busting
Post by: Hetzen on August 19, 2010, 09:36:43 AM
I also now think I'm talking bollocks. I've asumed that I'd be subtracting from the top of the cloud, when in fact I haven't. Time to move onto plan B. Sorry guys.
Title: Re: Cloud Busting
Post by: dandelO on August 19, 2010, 09:47:17 AM
Oh, Christ!

I just looked outside, by the way, the clouds are lovely. I need to get out more! :D
Title: Re: Cloud Busting
Post by: Hetzen on August 19, 2010, 09:54:05 AM
 ;D :D
Title: Re: Cloud Busting
Post by: Tangled-Universe on August 19, 2010, 11:29:34 AM
Quote from: dandelO on August 19, 2010, 07:37:42 AM
I'm not sure I get your meaning of a 2D fractal. It's only 3D when volume or displacement is added.
Is it like an alpha mask, black and white, with no range, so the border of B/W is the only area where there's noise?

I think this is correct for a powerfractal, but I'm not sure if that would also mean for the cloud-fractal or at least the way the cloud-node treats the fractal which it is fed with.
But, not very important now probably.


For an X,Z-only fractal I thought you can also feed a PF into the color-input of a surfacelayer and use that?
Or you could use the PF as a blendshader for a pure white surfacelayer? Same trick, slightly different.

The color-input does not accept/deal displacement so you should end up with a flat texture I'd tend to think.
Title: Re: Cloud Busting
Post by: Hetzen on August 19, 2010, 12:01:52 PM
Well I said there was a plan B.  ;D

Just needed a few extra blue nodes. ;)

Attached is an aerial image showing the mountain range of clouds. Notice no clipping at the top of the range. Yes there is some flatness on the nearer clouds, but I think I can add some more billows into the HF to deal with that.

I've also attached the network. This time I've created a gradient from 1000m to 7000m (my cloud range, ie alt 4000m, depth 6000m) I then compare this altitude gradient with the HF. If the HF is greater than the altitude gradient then allow the Density Fractal, if not then 0. There's also another conditional there to say if the HF = 0 then no cloud, so that the crop is to the bounds of the HF.

Anyway, it's a lttle long winded, but the shapes I feel are quite natural I guess, and what I'd expect to see from these sorts of clouds. The great thing is you can more or less draw what you want like you would landscape relief.
Title: Re: Cloud Busting
Post by: glen5700 on August 19, 2010, 09:26:02 PM
Just wanted to say thanks for this thread, lots of good stuff that I have never tried. Definitely going to be working with this.

Thanks!!
Title: Re: Cloud Busting
Post by: Dune on August 20, 2010, 02:52:16 AM
This a revolution in the clouds. If you can sculpt clouds like you would a landscape, you'll have endless possibilities (overhangs, lateral displacement...) Or am I too optimistic?
Title: Re: Cloud Busting
Post by: FrankB on August 20, 2010, 03:43:45 AM
yeah, you are too optimistic :)
Title: Re: Cloud Busting
Post by: Hetzen on August 21, 2010, 06:20:05 PM
That's rather pessimistic Frank. Nothing stoping you put a warp shader in between the HF and the conditional. Although, you are right in saying that what you create on the ground will be replicated in the sky. I think it's more akin to making a jelly mold that you allow your cloud fractal to fill. Sure, you're going to get clipping, and there are limitations with using HFs. But again, there's nothing stopping you using a warp shader to add more detail at the end of the string.
Title: Re: Cloud Busting
Post by: chris_x422 on August 23, 2010, 06:58:57 AM
Very nice work guys.

I never get the time to play with clouds as much as I'd like.
There's a lot of potential for getting more varied shapes going.
Title: Re: Cloud Busting
Post by: Volker Harun on August 24, 2010, 06:50:14 AM
Very good work!

You can achieve the gradient faster, using the smooth step scalar (functions -> step -> smooth step) and plug in your 1000 and 7000 nodes - after your clamp.

I am quite surprised that the heightfield works. I thought it would give only displacement and not colour information.

Volker
Title: Re: Cloud Busting
Post by: Hetzen on August 24, 2010, 11:36:42 AM
Thanks Volker. I knew I'd missed something. Smooth Step has been very useful in the past.

The reason why the HF works, is you have to check "Apply colour and shade" in the Colour tab, then un-check "Shade by light" and check "Shade by height". You now have a gradient from the lowest point (black), to the highest (white).
Title: Re: Cloud Busting
Post by: Hetzen on December 04, 2010, 04:26:53 PM
This has been an on going project, in which I've been trying various methods I can think up in the car bent over the wheel looking at the sky on the way to work.

The last method involved creating an image map, which had all sorts of restrictions on it, like resolution and coverage. It seems there is another way. Which is something I'm currently exploring.

The first image is a storm spire which lives in one cloud node, the second is a very low rez image of the process coverage across the skyline, again all within one cloud node. All clouds start at the cloud nodes base altitude (Cloud Altitude - half the cloud depth). Which means there are no floating blobs of cloud within a 2k cloud altitude range. It also means there's an interesting horizon when the camera is above the clouds.

All very much work in process. And atm still look like crap. ;D
Title: Re: Cloud Busting
Post by: AP on December 04, 2010, 05:32:58 PM
I like where this is heading. Having realistic isolated storm cells would produce convincing planet-wide cloud scapes and even in closer scale would be fantastic. Keep it up.    ;)
Title: Re: Cloud Busting
Post by: Hetzen on December 04, 2010, 07:12:17 PM
Absolutely Chris, it's good to see that someone else is thinking on the same lines.

What's nice about this method, is that global sized masking doesn't smudge the effect.

There is an image I'd like to replicate at some stage, which is attached. I think this method is the best I've found so far to get there.
Title: Re: Cloud Busting
Post by: Seth on December 04, 2010, 07:16:39 PM
awesome ! Ôo
Title: Re: Cloud Busting
Post by: cyphyr on December 04, 2010, 07:24:15 PM
A photo from the Space shuttle I've seen used in movies and doccumentrys, because its shch a stunningly beautiful image!
:)
I've tried to get similar results but the search continues.
Watching this thread :)
Richard
Title: Re: Cloud Busting
Post by: AP on December 04, 2010, 07:32:18 PM
That photograph is nifty. Clearly several super cells can be seen down there.
Title: Re: Cloud Busting
Post by: max_thehitman on April 25, 2011, 05:12:18 PM

This is very important information. Thanks everyone for your most valuable tips and tricks and
the mini-tutorials.
I will put them to good use!
Cheers
MAX
Title: Re: Cloud Busting
Post by: Themodman101 on April 25, 2011, 08:39:24 PM
Wow, Ive never thought about doing clouds this way. Will certainly help me in my future endeavers. Thanks for the help! :D
Title: Re: Cloud Busting
Post by: BlackScvale on February 25, 2015, 06:36:22 PM
Quote from: Hetzen on December 04, 2010, 04:26:53 PM
This has been an on going project, in which I've been trying various methods I can think up in the car bent over the wheel looking at the sky on the way to work.

The last method involved creating an image map, which had all sorts of restrictions on it, like resolution and coverage. It seems there is another way. Which is something I'm currently exploring.

The first image is a storm spire which lives in one cloud node, the second is a very low rez image of the process coverage across the skyline, again all within one cloud node. All clouds start at the cloud nodes base altitude (Cloud Altitude - half the cloud depth). Which means there are no floating blobs of cloud within a 2k cloud altitude range. It also means there's an interesting horizon when the camera is above the clouds.

All very much work in process. And atm still look like crap. ;D

I have read this thread a number of times. I think I understand it but not sure how to set it up. Still learning here. Hetzen, what do these images look like rendered at hi settings. The cloud shapes looks very realistic.