Author Topic: Clouds following terrain revisited  (Read 1037 times)

Offline N-drju

  • Member
  • *
  • Posts: 1299
  • A bee-sting allergic artist and philosopher
Clouds following terrain revisited
« on: January 12, 2018, 08:37:25 AM »
The title says it all.

It's been a while since I needed anything like that and would now like to implement it to one of my projects.

I tried to follow the acclaimed Martin Huisman's guide but it's not exactly what I need right now. Besides, I think that by now it is slightly outdated.

Is there any good method to provide altitude offset to the clouds directly from the terrain shader? I don't really have time to play around with exporting and converting stuff. Would rather have this done within TG entirely.
"When dictatorship is a fact, revolution becomes a right."

Offline cyphyr

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 3869
    • richardfraser
Re: Clouds following terrain revisited
« Reply #1 on: January 12, 2018, 08:50:33 AM »
I don't think Martins guide is outdated. It won't work with "Easy Clouds".
You can use the same technique on a procedural terrain. You just need to get some colour info out of the terrain to create a grey scale displacement map that conforms to the terrain.
You could do this by checking the colour tick boxes in the Powerfractal terrain node or adding a y to scalar node between the terrain and the cloud. You also may want to add a colour adjust node.
It is a little tricky working with procedural terrains since being procedural their values are always changing. A bitmap generated terrain will be the same no matter how far it is offset in the y axis. A procedural terrain will change. You will have to compensate for this.
www.richardfraser.co.uk
https://www.facebook.com/RichardFraserVFX/
/|\

i7 5930 @3.5Ghz, 32Gb (TG3 benchmark 6:04)
i7 980 OC'd @3.9Ghz, 16Gb (TG3 benchmark 6:30)

Offline N-drju

  • Member
  • *
  • Posts: 1299
  • A bee-sting allergic artist and philosopher
Re: Clouds following terrain revisited
« Reply #2 on: January 12, 2018, 09:12:18 AM »
Oh, I see. Darn it, I wanted to skip that greyscale image thingy. :-\ Somehow thought it might be easier.
"When dictatorship is a fact, revolution becomes a right."

Offline WASasquatch

  • Member
  • *
  • Posts: 2556
  • The Homeless Landscape Artist
Re: Clouds following terrain revisited
« Reply #3 on: May 15, 2018, 06:14:42 PM »
Yeah there should be a way to get the actual displacement information and turn that into a colour map.  Having to produce the colour in height is stupid. Not practical. Seems  you have to build the entire project based around offset clouds, instead of it being something added to your scene.

I've been using Displacement Shader to Vector and Scalar, and both just make the clouds disappear, with colour output from a PF, using the same nodes Dune did.

Even using the SSS colour and smooth step doesn't seem to work.

My final goal is to just have clouds running along the grounds altitude, and than I thought I could use a Surface Layer masked by the SSS for the displacement, and Substract Scalar to pull the clouds down.
« Last Edit: May 15, 2018, 06:19:59 PM by WASasquatch »
Art can be a window into the soul

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3271
  • I'm the crazy one
Re: Clouds following terrain revisited
« Reply #4 on: May 16, 2018, 03:48:41 AM »
It will work, but if it was previously set up to use a colour input and now you use a displacement converted to a scalar, you'll need to account for the fact that the displacement is measured in metres, so typically the values will be far outside the 0..1 range that was previously used.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Offline WASasquatch

  • Member
  • *
  • Posts: 2556
  • The Homeless Landscape Artist
Re: Clouds following terrain revisited
« Reply #5 on: May 16, 2018, 07:10:13 PM »
It will work, but if it was previously set up to use a colour input and now you use a displacement converted to a scalar, you'll need to account for the fact that the displacement is measured in metres, so typically the values will be far outside the 0..1 range that was previously used.

Matt


Just can't seem to get it to work. Tried multiple methods. The scaler can make the clouds disappear or thin out, but not altitude changes are ever made.

Additionally I played around with a colour adjust on a displacement to scaler and all it also does is thin clouds or make them disappear, never effects altitude.

« Last Edit: May 17, 2018, 07:16:57 PM by WASasquatch »
Art can be a window into the soul

Offline WASasquatch

  • Member
  • *
  • Posts: 2556
  • The Homeless Landscape Artist
Re: Clouds following terrain revisited
« Reply #6 on: May 21, 2018, 02:58:29 AM »
Really though, is there an issue going on here? Even rendering a "Perfectly working" tgd, yields no altitude offset...  I'm very puzzled.  Doesn't look the same of the provided sample image, nor following the mountain, just the mountain peaking through.

Note: Finally got this working by saying screw it with these methods and just used a disp to scalar and colour adjust to dial in look I wanted with two inputs. <.<
« Last Edit: May 21, 2018, 03:30:06 AM by WASasquatch »
Art can be a window into the soul

Offline N-drju

  • Member
  • *
  • Posts: 1299
  • A bee-sting allergic artist and philosopher
Re: Clouds following terrain revisited
« Reply #7 on: May 21, 2018, 07:01:44 AM »
It does work WASasquatch even with Martin's original setup. The thing, however, is that you need to significantly deepen the cloud depth to have any noticeable effect.

First and foremost, keep in mind that clouds "cannot exist outside their boundaries" - if you need to cover a peak from 200 to 1000 meters, you will, ideally, need a cloud located at 600 meters with 800 meter depth.

Still, I found out that the cloud depth needs to be significantly exaggerated to get best results. In one of my pictures I needed to cover 400 meter altitude span and got eye-pleasing and topo-correct effect only after expanding cloud depth to 2000 meters... ::)

For some reason, Terragen seems to chop off topmost area of clouds in the "localize" mode. So if you set cloud ceiling to say, 3000 you will rarely get any clouds at that altitude. The cloud mass will typically fill the area in the 2/3 of the initial depth, so you need to adjust accordingly.
"When dictatorship is a fact, revolution becomes a right."

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 12464
  • Holy snagging ducks!
Re: Clouds following terrain revisited
« Reply #8 on: May 22, 2018, 06:44:57 AM »
In Localize mode the cloud is bounded by a sphere and the shape/falloff (at the edge) is controlled by the Falloff and Value at Radius parameters. Taper Top and Base also has an effect. Combined the effect is that your cloud seldom actually fills the total vertical span of your cloud volume, but this does generally provide more realistic effects for falloff at top and bottom and is why they're all enabled by default.

- Oshyan

Offline N-drju

  • Member
  • *
  • Posts: 1299
  • A bee-sting allergic artist and philosopher
Re: Clouds following terrain revisited
« Reply #9 on: May 22, 2018, 07:45:49 AM »
I agree. It's just not good for all situations. Like the one discussed here.

What I also found helpful, was flattening the cloud base. The cloud is even thinner when this is applied but then, when you expand depth, you can get some very impressive cloud masses.
"When dictatorship is a fact, revolution becomes a right."

Offline WASasquatch

  • Member
  • *
  • Posts: 2556
  • The Homeless Landscape Artist
Re: Clouds following terrain revisited
« Reply #10 on: May 22, 2018, 04:49:55 PM »
It does work WASasquatch even with Martin's original setup. The thing, however, is that you need to significantly deepen the cloud depth to have any noticeable effect.

First and foremost, keep in mind that clouds "cannot exist outside their boundaries" - if you need to cover a peak from 200 to 1000 meters, you will, ideally, need a cloud located at 600 meters with 800 meter depth.

Still, I found out that the cloud depth needs to be significantly exaggerated to get best results. In one of my pictures I needed to cover 400 meter altitude span and got eye-pleasing and topo-correct effect only after expanding cloud depth to 2000 meters... ::)

For some reason, Terragen seems to chop off topmost area of clouds in the "localize" mode. So if you set cloud ceiling to say, 3000 you will rarely get any clouds at that altitude. The cloud mass will typically fill the area in the 2/3 of the initial depth, so you need to adjust accordingly.


Cloud localization and depth isn't the issue at all. As you can see from my render of Martin's this method simply isn't working on my system for whatever reason. Maybe it's the old file, I'd like to see you render a comparison compared to the original image posted. I've been downloading and working on this method for over a week. I have tried many files without alterations. It doesn't work. The only file that looks like it partially work was just an exploded mess of pixels, not clouds.

When I do this myself, depth is always beyond normal control. I actually often use a Surface Layer for height control, actually, as falloff control on clouds is pretty hard to deal with for tops and bottom.

The issue is the method doesn't work for me... I used a simple disp to scalar and a colour adjust and it works just fine for my Arid Plateaus while Martin's provided a solid, flat, layer. Not to mention this method is a lot easier. You have two value inputs to worry about, and wether you want to clamp low and high colours. Works amazingly.
« Last Edit: May 22, 2018, 04:56:42 PM by WASasquatch »
Art can be a window into the soul

Offline N-drju

  • Member
  • *
  • Posts: 1299
  • A bee-sting allergic artist and philosopher
Re: Clouds following terrain revisited
« Reply #11 on: May 23, 2018, 06:06:26 AM »
Hm, that's interesting. Would you mind sharing it? If you found an easier method, many of us would greatly appreciate.

Okay, I see. Cloud depth was the main issue in my case so I thought you might want to reconsider. Cloud depth modifier and cloud alt. offset modifier also play a key role.

Are you sure you applied and converted a correct image file for displacement mapping? It has to be exactly where you want your clouds to follow terrain. This is one more element where something might go wrong.

Surface layer cannot control height or depth of a cloud... The shape of edges, yes, but not anything else. I can't envisage how you could have used it...?
« Last Edit: May 23, 2018, 06:07:59 AM by N-drju »
"When dictatorship is a fact, revolution becomes a right."

Offline WASasquatch

  • Member
  • *
  • Posts: 2556
  • The Homeless Landscape Artist
Re: Clouds following terrain revisited
« Reply #12 on: May 23, 2018, 06:38:27 PM »
Hm, that's interesting. Would you mind sharing it? If you found an easier method, many of us would greatly appreciate.

Okay, I see. Cloud depth was the main issue in my case so I thought you might want to reconsider. Cloud depth modifier and cloud alt. offset modifier also play a key role.

Are you sure you applied and converted a correct image file for displacement mapping? It has to be exactly where you want your clouds to follow terrain. This is one more element where something might go wrong.

Surface layer cannot control height or depth of a cloud... The shape of edges, yes, but not anything else. I can't envisage how you could have used it...?


I was using the high and low colour method from PF, not the image map method mainly. I was doing some work on my arid landscape scene and I moved my camera to a new position, and noticed the method I thought worked, didn't, it just varied the top of the clouds enough not to look straight.

Do not understand this altitude offset function or why it's so broken and requires special treatment outside the scope of procedural workflow. No offense to Matt, but this function needs an entire rewrite. it shouldn't be that hard to offset clouds, especially achieving natural looks without a mess of functions, or pixels in the final work.

Here's the file I've been working on... I've gone from dozens of functions to just the disp to scalar, nothing works.

You'd think by the logic of Terragen, with Camped Black, black should be 0, and anything else is lifted, yet it applies nothing to the clouds, even if you ramp up white [clamped or not] to lets say 1e+011.
« Last Edit: May 23, 2018, 06:59:47 PM by WASasquatch »
Art can be a window into the soul

Online Dune

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 14173
    • www.ulco-art.nl
Re: Clouds following terrain revisited
« Reply #13 on: May 24, 2018, 05:39:52 AM »
I think something is changed since a few years back. Then it wasn't hard to get it working, but now I can't get it to work either, even in this rather old 32-bit version, the only one I have here, online). I'll have to check some of my older files, but this is what I used to do.
The constant has a flattening effect, the altitude is changed for the top part, but it used to hollow out/lift the bottom part as well. Now it's still solid. Funny (or not so funny, actually).

Offline N-drju

  • Member
  • *
  • Posts: 1299
  • A bee-sting allergic artist and philosopher
Re: Clouds following terrain revisited
« Reply #14 on: May 24, 2018, 07:43:50 AM »
So what you both say is that it might be a system dependent problem...? ???

For me it works on Win 8.1 and TG3.
"When dictatorship is a fact, revolution becomes a right."

 

anything