Cloud follows terrain

Started by james adamson, February 23, 2020, 08:56:32 AM

Previous topic - Next topic

james adamson

Hi.
I am taking another look at Martins lovely clouds follow terrain tutorial and it is all working as expected when I am using all the tutorial assets.
I have generated a new terrain and using a simple shader as a visual aid identified the coords for the area I wish to test the cloud altitude offset function.
My simple shape surrounds my mountain and gives me coord x y and z and area 1000 1000. I generate a heightmap with compute terrain as input and in the use shader tab i put in the coord from my simple SSS which encloses the area i wish to test. Generate heightmap and export as exr.
I then import my exr heightmap and to test it put solid red through the base colour node with my exr as mask. This worked as expected.
I then applied my exr image map shader (where I have also put in the image size and coords.) to the altitude offset for my clouds and nothing happened. The height and depth of the clouds are correct as they are sitting exactly where I would expect. i.e height is bang in the middle and depth is x up and down its just the altitude offset does not change the profile whatsoever. I also tried using my image map as a displacement and that did not work at all. There was what seemed like a massive displacement going on.
Cheers.
James.

james adamson

Oh. I have also checked data is linear in the image map shader. That is giving me negative displacements.

james adamson

Ok. So I have tried a gamma correction on the exr using colour adjust. I have reduced the gamma to .2  and it is looking more like it should look but obviously I have gone wrong somewhere as this can not be right. The displacement is now closer to the displacement
I am referencing which is in Martin Husimans image map tutorial  in the clouds follow terrian package.
So it looks like the displacement pre colour adjust is for some reason not looking at all the steps in the exr just the viewable black and white values.
I am a bit lost here!

james adamson

I have now taken the exr from Terragen heightfield generate into Nuke and reduced the gain to .0005. This now more closely matches Martins image from his heightfield conversion to sgi. Taken this into Terragen and the altitude offset thingy works. Yay.
But I must be doing something wrong because at the moment it looks like Terragen is producing a 32 bit exr but reading the exr as an 8 bit image. ? I know I am missing something fundamental here but i can not work out what.

WAS

#4
Can we see what is actually going on? Also don't use compute terrain, use the shader before compute terrain. Compute Terrain will get warped when changed into a scalar (spikes and stuff).

Additionally you'll probably want to ramp down the offset multiplier to 1 (or little over or under). Martin's file isn't really setup for a normal scene and is heavily exaggerated.

Here's a scene incorporating some things I've learned. Including clamping the terrain floor so the altitude offset isn't causing the clouds to sink into the valleys small divots. Additionally the terrain is smooth so terrain detail doesn't rake up the clouds.

Main points to look at is smoothing of the terrain, and and the soft maximum clamp of the terrain. There is also a clamp going into the depth modulator. This crunches clouds more at peaks than they are ambiently floating.

SILENCER

It may be less hassle to export the geo and do the clouds as a fluid/smoke sim to guarantee proper collision adherence, especially if this is to be animated

Slap those together in nuke and presto

WAS

Quote from: SILENCER on February 23, 2020, 12:22:58 PMIt may be less hassle to export the geo and do the clouds as a fluid/smoke sim to guarantee proper collision adherence, especially if this is to be animated

Slap those together in nuke and presto

I wonder what simulator he'd use that wouldn't look like garbage smoke. :P

SILENCER

Quote from: WAS on February 23, 2020, 12:26:27 PMI wonder what simulator he'd use that wouldn't look like garbage smoke. :P

Oh the cheap low quality ones like Houdini, FumeFX, TFD, Real Flow

Even blender has a nice built in one.

WAS

Do you know of any good examples? Curious? To my eye Houdini's cloud Sims just use plane smoke simulations and look totally unreal for atmospheric movement on a larger scale. Im also really super finicky when it comes to those little things.

WAS

And that's not meant to be like a "f other software" deal. I've just generally haven't seen convincing cloud movement in other software easily without it being a purely artistic driven approach like in cinema.

Tangled-Universe

Hi James,

Can you send me your .tgd file or post it here for inspection?
Like I said before, what I have shared thus far is purely the explanation of the settings, just that.
As you have experienced yourself there are a few caveats when using an actual terrain and I still need to finalize that second part.

I'm sorry I haven't been able to finish what I started yet.
In the end I think I will start a topic about this myself with one robust workflow, since there's also a little bit of incorrect information here as well.
This will also make it easier to follow for anyone since discussion is not being scattered and interfered with.

Cheers

Tangled-Universe

Nice POV and clouds WAS, I'd make a real scene out of that as we haven't seen many scenes like those here before. I bet you.

james adamson

Hi guys.
Firstly I love that frame WAS that is exactly what I am trying to achieve albeit from a slightly more awkward POV.
Gonna digest your setup right now. And Martin there really is no need to apologise, I am so grateful for all the assistance I have already had. As to your demo setup I totally get it and it is massively useful and I have made my own fudge of it as I get my head round the cloud controls and settings. Right here are some setups I have made as I have gone through various points of feedback. Note that some may be obsolete as I thought I would start at the begining with your original tutorial martin but it would still be good to understand why things are not working as expected. So EXAMPLE 1 is a rework of your 2010 image map tutorial where I have simple rexported the heightfield gen as an exr tweaked gain in Nuke as for some reason It was being clipped I think. Anyway that worked as expected. EXAMPLE 2 is the exact same process just on a brand new scene which does not behave as expected and I have no idea why. EXAMPLE 3 is a displacement to scalar which works as expected and EXAMPLE 4 was a version I made after reading Oshyans advice to bake out the heightfiled which is going to be needed as the renders are slowwww when it calculates it all at once. Problem is I can not see why it is not just doing the same thing as the previous displacement to scalar.

james adamson

And yes Silencer I have thought about doing this through another app, but I have currently got 4 bits of software in my pipeline 5 if I take Logic into account. Plus what I am after is achievable in Terragen, Its my skills thata re holding me back, and also Terrgens clouds look awesome. But yeah it is there as an option if I can not get my Terragen skills on point any time soon.

james adamson

Hey WAS. I took a look at your setup. Way beyond where I am at at the moment Terragen wise. Loads of nodes in there I have not gone near yet. 
A good scene to unpick and work out.
Cheers.
James.