Planetside Software Forums

General => Terragen Discussion => Topic started by: mhaze on November 23, 2008, 07:56:55 AM

Title: Clouds following terrain
Post by: mhaze on November 23, 2008, 07:56:55 AM
Hi All

After a walk in the welsh hills last week, when I was treated to an amazing display of cloud effects, I was inspired to attempt to create the effect of clouds following the terrain.

I enclose a screenshot of progress so far based on the work of Mr Lampost. L have been trying to subtract the heightfield ffrom the clouds apart from the fact that it is hard to see if I'm having any effect, I'm stuck and I have the feeling that it will be impossible to achieve this as there seems to be no way to control the height of the clouds procedurally.

If there is no way of doing this, Matt please can we have the facility in the next upgrade, please, please, please.

Mick
Title: Re: Clouds following terrain
Post by: JimB on November 23, 2008, 08:02:45 AM
I think one approach is perhaps to have multiple layers of clouds all using the same Density Fractal and intersecting each other, and then mask each layer according to the underlying terrain height to give the illusion of the clouds following the terrain below. Asked the question myself before and there wasn't a way then, but who knows now?

http://forums.planetside.co.uk/index.php?topic=370.msg2604#msg2604
Title: Re: Clouds following terrain
Post by: Mohawk20 on November 23, 2008, 12:01:18 PM
I have an idea...

Make the cloud layer as thick as the terrain (so lowest and highest point same as the terrain). And then paint the terrain with the painted shader. Set the painted shader to 3d, and use it as blend shader for the cloud's density fractal.
The painted shader should make the clouds float between the terrain and a few units above it, depending on the colour's intensity.

I have not tried it in this situation, but it worked for my waterfalls in the Hanging Valley project...
Title: Re: Clouds following terrain
Post by: neon22 on November 23, 2008, 01:12:20 PM
Has anyone tried inverting a distribution shader
- attached to the terrain
- (setting the min max height to the desired cloud range)
and using that as the Blendshader ?
Title: Re: Clouds following terrain
Post by: mhaze on November 23, 2008, 05:21:03 PM
thanks for tsuggestions

but so far I can't make things work as expected :(

Mick
Title: Re: Clouds following terrain
Post by: FrankB on November 23, 2008, 05:31:05 PM
 does "cloud following terrain" mean anyway? I have no idea...

Title: Re: Clouds following terrain
Post by: neon22 on November 23, 2008, 05:58:07 PM
The way clouds will not intersect with the terrain but instead be off the surface.
E.g. winds and temperature differences can act as an interface layer between the clouds and the terrain.
Title: Re: Clouds following terrain
Post by: JimB on November 23, 2008, 11:03:10 PM
Like these:

http://lh3.ggpht.com/_97GfM4Zj2ko/R7cQ-b8eHMI/AAAAAAAABE0/Uvy5DRdr9rE/s640/DSC01928.JPG
http://www.celebratebig.com/nepal-thailand/nepal-solu-khumbu-region-mt-everest-monsoon-clouds.jpg
http://farm1.static.flickr.com/71/224038819_e3e8ffe8a2.jpg?v=0
http://image46.webshots.com/46/0/58/45/2739058450010790772bqrUJJ_ph.jpg
http://images.realtravel.com/media/lg/4a/ef/4aef4bb614dec91be694bde699318209.jpg
http://www.grandfather.com/images/wallpaper/september_clouds1.jpg
http://www.kapstadt.org/images/articles/landschaft-bilder-fotos/mountain-rolling-clouds-g.jpg
http://static.panoramio.com/photos/original/4902896.jpg
Title: Re: Clouds following terrain
Post by: neon22 on November 23, 2008, 11:35:00 PM
I thought maybe something like this would work. but it doesn't.
hey Big ben - when it comes to masks like this - you're the man.
Any ideas ??

The distribution mask is looking good but the Transfrom shader does not seem to be working...
Title: Re: Clouds following terrain
Post by: FrankB on November 24, 2008, 02:54:48 AM
ah, thanks to the photo examples I now know what this is about. Thanks,
Frank
Title: Re: Clouds following terrain
Post by: bigben on November 24, 2008, 04:28:42 AM
Quote from: neon22 on November 23, 2008, 11:35:00 PM
I thought maybe something like this would work. but it doesn't.
hey Big ben - when it comes to masks like this - you're the man.
Any ideas ??

The distribution mask is looking good but the Transfrom shader does not seem to be working...

I was thinking along a similar line.  generating a parallel terrain for the mask.  Terrain > Displacement shader (add height to reach cloud altitude, Function = scalar constant of 1) > Text coords from XYZ > Surface shader (white) > Cloud density blending shader

Still rendering the rest of my cloud animation so I haven't tried this out yet.  I could be completely wrong here though....  ;) 
Title: Re: Clouds following terrain
Post by: mhaze on November 24, 2008, 08:22:14 AM
This sorta works....
Title: Re: Clouds following terrain
Post by: mhaze on November 24, 2008, 08:58:50 AM
QuoteI was thinking along a similar line.  generating a parallel terrain for the mask.  Terrain > Displacement shader (add height to reach cloud altitude, Function = scalar constant of 1) > Text coords from XYZ > Surface shader (white) > Cloud density blending shader

Sorry big ben just tried it and does not work, could be me though.
Title: Re: Clouds following terrain
Post by: freelancah on November 24, 2008, 09:28:19 AM
This is a dilemma that I've been trying to figure out with very little success. Glad to see you guys are working on it too. I will post my work if I am able to get it working
Title: Re: Clouds following terrain
Post by: mhaze on November 24, 2008, 10:15:56 AM
Quite unexpected - using an image map - all settings at default

Off to play

Mick
Title: Re: Clouds following terrain
Post by: freelancah on November 24, 2008, 11:27:29 AM
Hmm that certainly gives me ideas
Title: Re: Clouds following terrain
Post by: bigben on November 24, 2008, 03:28:41 PM
Quote from: mhaze on November 24, 2008, 08:58:50 AM
QuoteI was thinking along a similar line.  generating a parallel terrain for the mask.  Terrain > Displacement shader (add height to reach cloud altitude, Function = scalar constant of 1) > Text coords from XYZ > Surface shader (white) > Cloud density blending shader

Sorry big ben just tried it and does not work, could be me though.


No it didn't work. Trying a few other ideas but I need some more documentation.  Any good explanations of get altitude and get altitude in texture?
Title: Re: Clouds following terrain
Post by: PG on November 24, 2008, 04:49:14 PM
From what I remember it's the same thing as Get position Y, just older. ProjectX is the best person to ask, methinks.