Planetside Software Forums

General => Terragen Discussion => Topic started by: treddie on March 08, 2008, 02:38:54 AM

Title: Cloud Noise at Distance
Post by: treddie on March 08, 2008, 02:38:54 AM
Hi all.

Am having a bit of a problem with cloud noise, and wondered if others were having the same issue.  The first image shows clouds that look great in the foreground, but contain too much noise in the background.  The second image favors the background clouds by lowering the Density Fractal noise, but then the foreground clouds are WAY too smooth and look like soap suds, and the farthest background clouds are still a bit noisy.  So then I tried building 2 cloud layers at the same altitude, one layer for foreground the other for background.  But that is too difficult to control as the only way to prevent either distance from ending up with clouds from the other is by spending a couple of hours trying different seed values for each.  Very difficult if not impossible getting the right clouds.

So finally (for the 4th image), I elected to go with the same single-layer clouds, but I rendered 2 different versions; one image rendered for foreground clouds (1st image, more noise), and the other for background clouds (3rd image, less noise), using Photoshop to merge the foreground and background skies, by cutting the sky in half and post-doctoring the merger (4th image, composite).  But ofcourse that takes twice as long...you have to render TWO skies instead of one, AND you have to do post-effects as well.  In addition, I think I should now reduce the noise level just slightly in the foreground clouds, because they now look out of place with the background clouds.

So my question is, is there a way to vary the cloud noise with distance?  Perhaps with something like the Distance Shader or a Conditional Scalar shader that affects cloud noise with distance from the viewer?  If so, there does not appear to be a way to tell TG2 to apply the Conditional Scalar shader to the noise channel of the Density Fractal.

What to do...what to do...
treddie
Title: Re: Cloud Noise at Distance
Post by: bigben on March 08, 2008, 04:28:33 AM
Create a distance shader with the distance settings you want and connect it to the blend shader input of the density fractal (and check Blend by shader in the fractal). You will also have to check Invert blendshader for one of them. eg. if the near colour is white then the blendshader has to be inverted for the far cloud's density shader.
Title: Re: Cloud Noise at Distance
Post by: Volker Harun on March 08, 2008, 05:13:28 AM
First of all, the landscape is a beauty :-)

Second, there are other ways to control noise - the contrast and roughness i.e. in the density shader.
Title: Re: Cloud Noise at Distance
Post by: Volker Harun on March 08, 2008, 05:38:34 AM
Having a few minutes, I go into detail.

You would like to have the edge sharpness of your clouds about 100 to 1000 times smaller than the density.
The edge sharpness will do the distance effect. But you will need to enhance the contrast inside the density fractal (1.5 or 2 are values to start with).

Reducing the clouds' colour to about 0.1 while keeping the Scattering colour to its default gives some more definition at the close up clouds. The Fake internal scattering can be pushed to the maximum to put some cream on top ;)

Last go into the density fractal again and tune the Smallest scale, contrast and roughness to your need.
The contrast gives the definition - the smallest scale the size of the smallest parts and the roughness is the amount of smallest scale to be visible.

Remember, the edge sharpness already did that distance thing.

Volker
Title: Re: Cloud Noise at Distance
Post by: treddie on March 08, 2008, 02:11:25 PM
Gee, thanks everyone.  I'm off to test again.  It will be awhile before I come back to report, since each of these 800x600 renders (with sky crop) is a five hour + render.  I could go with lower res, but the noise problems just don't appear at that res.

Super thanks to you guys.
<treddie

Volker Harun> Thanks for the comment about the terrain.  The landscape terrain was built in GeoControl (which can export Terragen terrains).  The plants are built in Onyx (I used a broadleaf tree to start with and totally tweaked the parameters to get more of a desert bush feel.  There are only two plants that create the populations.  Then I added shaders to the terrain to roughen things up a bit.  Since I have been concentrating on atmosphere issues for now, I haven't really had the chance to build terrains from scratch inside TG2.  So much to learn.  So little time.
Title: Re: Cloud Noise at Distance
Post by: treddie on March 08, 2008, 02:14:49 PM
...I might add that a lot of the success I'm having with TG2 has been the result of a lot of gracious input from users.
Kudos.
Title: Re: Cloud Noise at Distance
Post by: bigben on March 08, 2008, 04:38:07 PM
Doing cropped renders will help you save time.
Title: Re: Cloud Noise at Distance
Post by: treddie on March 08, 2008, 06:17:30 PM
That's what I do, but still, going back and forth to tweak settings (with GI and shadows/surfaces off), then with GI/shadows/surfaces on still amounts to a lot of time.
I need a Cray.
<treddie
Title: Re: Cloud Noise at Distance
Post by: treddie on March 09, 2008, 03:32:47 PM
Back again.

bigben> I tried the Distance Shader thing, but this is the result I got.  My first thought was that the black area should have acted like a mask, but instead it simply acts as a color "fog".  So I looked for some kind of shader to act as a mask for the Distance Shader, but to no avail.

Volker> Was playing with your approach and came up with some very bizarre results.  The clouds came out looking like soft edged opaque objects.  Am going to start from scratch and try your procedure again.
Title: Re: Cloud Noise at Distance
Post by: treddie on March 09, 2008, 03:36:21 PM
I should add that I was working on just one layer of cumulous clouds at this point.
Here is the node network.
Title: Re: Cloud Noise at Distance
Post by: Volker Harun on March 09, 2008, 05:10:29 PM
If you could upload a TGD - only with the atmosphere and camera (no shaders and no terrain) I could go for an approach these days
Title: Re: Cloud Noise at Distance
Post by: treddie on March 10, 2008, 02:04:18 AM
Volker> I finally got it.  I don't know what I did to mess up that first attempt with your procedure, but it was pretty strange.  This time, I started over with your approach and this last test looks quite good.  I'm starting the final 800x600 render in about 15 minutes, so it won't be ready to upload until tomorrow midday (15 hours + change, render).  Your idea sure does help out.  Makes a great launching point from which to dial it all in, without 90% of the headache.  How did you figure it out?
<treddie
Title: Re: Cloud Noise at Distance
Post by: Volker Harun on March 10, 2008, 05:19:49 AM
Quote from: treddie on March 10, 2008, 02:04:18 AM
Makes a great launching point from which to dial it all in, without 90% of the headache.  How did you figure it out?
It needed about 150% headache ,-) - playing with all the settings to get an intermediate understanding.

I am glad that this approach does help.

Volker
Title: Re: Cloud Noise at Distance
Post by: bigben on March 10, 2008, 07:24:32 AM
Using cloud settings is obviously a more sensible approach.  For reference, with the distance shader I'd clamp the near and far colours.  Then connect the same distance shader into the second fractal/shader and check Invert Blendshader.  There may be other situations where you'll use this approach
Title: Re: Cloud Noise at Distance
Post by: treddie on March 10, 2008, 01:55:48 PM
Volker> Well, it will be nice when all of this info is in the docs and tuts.  But I imagine everyone will have their own special trade secrets that will remain secrets.  Unless that person tells 2 other people and the original guy doesn't have the heart to kill them.

bigben>  I had hooked up 2 distance shaders to 2 separate clouds.  I'll play with your idea of one connected to 2.  Now that I think about it, I think that's what you meant originally.

What the heck is clamping anyway?  Nothing really in the docs about it (Actually not much of anything at this point).
Title: Re: Cloud Noise at Distance
Post by: Volker Harun on March 10, 2008, 02:20:00 PM
Clamping: For example any value below zero stays zero and any value above 1 (white) keeps the value of 1.
Using functions the clamping is very universal.
Title: Re: Cloud Noise at Distance
Post by: treddie on March 10, 2008, 02:35:38 PM
Geez...you should write a Terragen book, dude.
Visited your site and gallery.  Really beautiful stuff.
Title: Re: Cloud Noise at Distance
Post by: treddie on March 10, 2008, 05:21:48 PM
Update with fixed clouds.  In looking at this, I have decided to run another render with roughness cut back slightly.
<treddie
Title: Re: Cloud Noise at Distance
Post by: Volker Harun on March 10, 2008, 07:18:24 PM
I think that the balance of roughness and smallest scale is fine.
Two points to consider:

There much more option to play with ...

Volker
Title: Re: Cloud Noise at Distance
Post by: treddie on March 10, 2008, 08:32:12 PM
Hm...decisions, decisions.  Ah heck!  I'll try both!
I need the practice.

I'm off to Terragen for a night of rendering.
<treddie
Title: Re: Cloud Noise at Distance
Post by: treddie on March 11, 2008, 03:32:18 AM
I made a mistake.  It wasn't roughness that I cut back on, it was Edge Sharpness like you were suggesting.  I had actually taken it from .005 to .001.  This was the result, along with deadening the greens a bit in PShop to give it more of a deader desert look and taking some of the density out of the blacks in the bushes, since there just wasn't enough light bounce going on inside.
Title: Re: Cloud Noise at Distance
Post by: treddie on March 12, 2008, 01:04:24 AM
One last view.  Other than following up on a couple of suggestions on the earlier image, I'm sick of this model and ready to move on.  Reminds me of when I did a product shot of some tires in Maxwell Render.  Spent maybe 60 hours on getting everything done right before I started the actual render.  Got so sick of looking at tires I couldn't enjoy the images anymore.  My head hurts.

Thank you, Volker Harun and bigben for all of your help.  This last clouds setup really had me scratching my head.  I think I'm starting to "get it"!

<treddie
Title: Re: Cloud Noise at Distance
Post by: Volker Harun on March 12, 2008, 10:27:01 AM
I understand your point ... While going for one render, it is hard to ignore the forthcoming ideas.

I like the clouds in the last image very much, by the way.
The grain in the distance is due to the atmospheric samples, guess you already know.

The only idea I had for you image from March 11th was to double the atmosphere node to soften the background :)

Volker
Title: Re: Cloud Noise at Distance
Post by: treddie on March 12, 2008, 02:52:20 PM
Now that you jogged my memory, I figure your right about where the noise was coming from.  Awhile ago I did some front lit tests with quality set at 32, 64, 128, 256 samples at 320x240, to check rendering time vs. quality. At least for 320x240, 64 seemed to be the bare bones acceptable lower limit.  For that scene at least.

I will test your atmosphere doubling idea out today.  Which brings up a point about TG2.  I find that TG2's atmosphere is simply stunning, but that "volume of light" quality it has (which matches photography very closely) does not carry over into foreground areas all that well.  For foreground elements I get the sense that everything is in sort of a "light vacuum" environment like conventional ray-tracers, and increasing GI quality only partially addresses the problem (I must admit, I have not pushed the GI quality to its limit yet, at the expense of a huge rendering time).  For instance, in all the images in this thread, if you crop out the terrain, the sky approaches photorealism, yet if you crop out the sky, the terrain in the foreground looks like an illustration.  Light just isn't bouncing around all that much in the foreground and getting into the nooks and crannies enough.  I suppose I could put a light source behind the camera, or a huge reflector, but my impression is that the problem would still remain.
Title: Re: Cloud Noise at Distance
Post by: treddie on March 12, 2008, 02:53:11 PM
...accidental double-post.  Network connection is dropping out causing post/reply hick-ups.
<treddie
Title: Re: Cloud Noise at Distance
Post by: Oshyan on March 13, 2008, 01:12:24 AM
I would venture to suggest that the foreground problems, although perhaps related to GI, may have more to do with the complexity and difficulty of effective ground texturing as compared to skies...

- Oshyan
Title: Re: Cloud Noise at Distance
Post by: treddie on March 13, 2008, 02:13:27 AM
That's certainly a possibility.  Won't be able to really tell until I can afford to buy a registered copy and up the res.
But I guess I could start playing around with close ups of some small objects placed on the ground at 800x600.
Title: Re: Cloud Noise at Distance
Post by: bigben on March 13, 2008, 11:57:22 PM
If you want to see what GI is doing, change the Colour on surfaces to a bright colour that is not in your terrain... e.g. cyan or purple.

or check out the first 2 images in this thread:
http://forums.planetside.co.uk/index.php?topic=1851.msg18019 (http://forums.planetside.co.uk/index.php?topic=1851.msg18019)