Planetside Software Forums

General => Terragen Discussion => Topic started by: Kexikus on June 08, 2020, 04:58:56 PM

Title: Cloud noise
Post by: Kexikus on June 08, 2020, 04:58:56 PM
Hi everyone,

I currently struggle with cloud noise in one of my renders. The scene is a sunset with one very simple easy cloud layer that I can't get free of noise even though all relevant settings that I know of are already pretty high and I tried even higher values with no changes at all. So I was thinking that maybe there is some setting that I just don't know about that could be the cause of my issues.

Here's what I currently have:
I use Defer All Shading
Micro Poly Detail: 0.6 (shouldn't matter though, right?)
AA: 10 with the Robust Adaptive Sampler at default settings (1/64th)
Voxel Scattering Quality: 100

Atmosphere samples: 32 (pretty sure that is more than I need)
Cloud Ray Marching Quality: 0.75

So far I tried increasing AA to 15, Voxel Scattering Quality to 300, Atmosphere samples to 64 and Ray Marching Quality to 2. All any of those settings did was to increase the render time.
Is there any other setting that might help in this case?

I'll attach a crop of the full render at the bottom. There isn't a lot of noise but if you zoom in you can still clearly see it in the darker cloud parts.

LKO_sky02_Crop.png

Thank you for your help!
Title: Re: Cloud noise
Post by: Kadri on June 08, 2020, 06:24:41 PM

I don't have the newer build of Terragen and without the scene can't say much. Have you tried it with the soft pixel filter?
Just curious if it would help or not.
Title: Re: Cloud noise
Post by: D.A. Bentley (SuddenPlanet) on June 08, 2020, 06:35:25 PM
Do you have Soft Shadows turned on in the Sunlight node.  Newer versions of TG4 have it turned on by default.  If so you could try increasing your soft shadow samples (Default is 4).

You could try increasing Ray-marching quality of the Easy Cloud to 1 or even 2?

The rest of your settings seem plenty high.  I never need to go higher than AA 8 myself.

Also under the Rendering settings Quality Tab there is the Edit Sampling button.  Whats your Pixel Noise Threshold set to?  It's a tricky setting because it changes depending on what you set your samples too.
When I choose 8AA samples it defaults to 0.0375, but I usually lower it to 0.0275 to get even less noise.

Hope that helps.  Let us know what you figure out.

-Derek
Title: Re: Cloud noise
Post by: Kexikus on June 09, 2020, 02:26:54 AM
Thanks for the suggestions!

Soft shadows are turned off.

I already tried increasing the ray marching quality to 2 with no success.

The Pixel Noise Threshold is at 0.03 for AA10 but I just tried reducing it to 0.02 with no improvements either.

Quote from: Kadri on June 08, 2020, 06:24:41 PMI don't have the newer build of Terragen and without the scene can't say much. Have you tried it with the soft pixel filter?
Just curious if it would help or not.

The "Cubic B-spline (soft)" pixel reconstruction filter or is it something else that you're talking about?

I'll also attach the scene file in the hope that this might help. Thanks again.

Korriban.tgd
Title: Re: Cloud noise
Post by: Kadri on June 09, 2020, 02:42:42 AM
Quote from: Kexikus on June 09, 2020, 02:26:54 AM...

The "Cubic B-spline (soft)" pixel reconstruction filter or is it something else that you're talking about?
...

Yes that filter.
Title: Re: Cloud noise
Post by: Tangled-Universe on June 09, 2020, 03:19:44 AM
I just had a look at your file and I just started some test renders, but I noticed one thing I feel I need to give some feedback on, which is your lighting setup.
You have 2 sunlights and they differ in colour and that 1 has glow in atmosphere disabled and the other one highlights on surfaces.
Apparently you'd like more yellowish light in the atmosphere and more neutral light for highlights on surfaces.
However...which highlights on the surfaces? There are no reflective shaders for your terrain so a separate light for this makes no difference.
The lighting of those 2 sunlight nodes isn't really separated either, since both still do light atmosphere and terrain (top checkboxes).
Also, sampling 2 sunlights is more costly to render.
If you'd like to do this properly and fast then use one lightsource, add a reflective shader to your surfaces and give the reflection tint the same tint you give it in that sunlight node.
Should your sunlight be yellow and you want less yellow reflections, then set reflection tint to the complementary colour of yellow. Then switch to HSB colour palette mode and play with saturation until you like what you see.

I'll report my finds on your cloud render settings later...
Title: Re: Cloud noise
Post by: Kexikus on June 09, 2020, 12:03:20 PM
Thanks for the feedback.

The reason for the two sunlights is actually much simpler and way more stupid. It's a remnant from years ago when I had even less of an idea what I was doing. My goal was to reduce the glow in atmosphere so I duplicated my light, reduced the strength in both by half and disabled glow in atmosphere in one of them. At that point they still had the same color. That got changed only more recently. Why I disabled the specular highlights is beyond me though.

Either way, I now know that I can get that effect easier and cheaper by reducing the haze glow settings in the atmosphere node. So I will do just that.

Quote from: Kadri on June 09, 2020, 02:42:42 AMYes that filter.

I can't see any difference with that filter either.
Title: Re: Cloud noise
Post by: WAS on June 09, 2020, 01:04:14 PM
More to the point of noise, increase Voxel Scattering Quality to 1000 - 1500 to remedy the issue in your scene.
Title: Re: Cloud noise
Post by: D.A. Bentley (SuddenPlanet) on June 09, 2020, 02:36:03 PM
Quote from: WAS on June 09, 2020, 01:04:14 PMMore to the point of noise, increase Voxel Scattering Quality to 1000 - 1500 to remedy the issue in your scene.
Increasing Voxel Scattering seems to resolve a lot of the noise in the darker areas in the clouds, but there was still noise in the lighter areas.  I did my test renders at 8k resolution with 1500 Voxel Scattering.
I was able to remove all of the noise by setting AA Sampling to 8, and customizing the noise threshold to .01, which is probably lower than you need to go but I wanted to be sure it would take away the noise.
It did take 7X longer to render though.  I typically just ignore this noise for working renders, and turn down the noise threshold for my final renders which sometimes take multiple days.
Of course if your doing animations this brute force method won't be of help.  Thanks for the TGD to test out.  I'll keep tweaking settings and see what else I can find.
Title: Re: Cloud noise
Post by: WAS on June 09, 2020, 02:46:41 PM
You'd imagine increasing the render exponentially, you'd have to further compensate voxel scattering quality, as the previous settings are now covering a larger area. It fixes the issue on his file resolution. With a higher resolution you're effectively able to see the voxel areas clearer.

You pixel threshold makes sense at that resolution, similar to needing to keep stars stable in my skies at high resolution and needing a 0.01 pixel threshold with soft pixel reconstruction.
Title: Re: Cloud noise
Post by: D.A. Bentley (SuddenPlanet) on June 09, 2020, 03:16:50 PM
Just another interesting finding.  Rendering your scene with the Robust adaptive sampler at AA16 was still noisier than when I did my Customize sampling at AA8 with threshold .01 and 1/64 first samples.
The AA16 Robust was actually much faster though to render.  Just out of curiosity I got the Robust adaptive sampler to use a Pixel noise threshold of .01 by putting samples to AA30.  Thats quite high!  :)
Title: Re: Cloud noise
Post by: WAS on June 09, 2020, 04:46:22 PM
Quote from: D.A. Bentley on June 09, 2020, 03:16:50 PMJust out of curiosity I got the Robust adaptive sampler to use a Pixel noise threshold of .01 by putting samples to AA30.  Thats quite high!
well that's not very "robust". lol

But can't you use both Robust Sampler and Customized AA? It doesn't switch to Legacy or anything.
Title: Re: Cloud noise
Post by: D.A. Bentley (SuddenPlanet) on June 09, 2020, 06:10:28 PM
Quote from: WAS on June 09, 2020, 04:46:22 PMBut can't you use both Robust Sampler and Customized AA? It doesn't switch to Legacy or anything.
My understanding is once you turn on "Customise sampling" the Robust adaptive sampler will allow you to change your noise threshold and first samples.  If you don't have "Customise" selected/ON, then the settings below are automatically chosen for you.  Leave "Customise" OFF and change the AA setting and watch the threshold change.  First samples defaults to 1/64 at AA4 and above, 1/16 at AA3-AA2, and 1/4 at AA1 and below.

Thats why I was saying if you turn AA up to 30 you should see the threshold go down to .01 (in Terragen 4.4.67 that is).

Love the Adaptive/Robust Sampler!  I can't wait for the day it can divide buckets and be even more adaptive as threads are freed up.  ;)
Title: Re: Cloud noise
Post by: WAS on June 09, 2020, 09:20:14 PM
I was just commenting cause you kept mentioning robust like it was different. Customized robust is still robust, just forcing the pixel threshold value.

But, also, like I mentioned, it doesn't seem very robust by definition having to go to such extreme levels, for a "robust" (strong) result. In fact the way you describe the setting stepping, and result, it seems more  delicate with the scene.
Title: Re: Cloud noise
Post by: Kexikus on June 10, 2020, 03:34:02 AM
Thanks for the suggestions!

I tried both of them as well as a few combinations and arrived at a satisfactory result.

Voxel scattering at 1700 with AA10 left some noise in the brighter areas as D.A. Bently said.
AA8 with a pixel threshold of 0.015 with voxel scattering at 100 gave great results but was about 50% slower, so I searched for a combination and found it at a pixel threshold of 0.02 with voxel scattering at 1700. The result is very close to the lower pixel threshold but renders quite a bit faster.

I did not expect that I would need such extreme values for a relatively simple scene like this, but now I know better. Thanks again for the help everyone!
Title: Re: Cloud noise
Post by: WAS on June 10, 2020, 03:36:43 AM
Quote from: Kexikus on June 10, 2020, 03:34:02 AMI did not expect that I would need such extreme values for a relatively simple scene like this, but now I know better. Thanks again for the help everyone!

Lighting really effects a scene substantially when it comes to atmosphere/cloud noise.
Title: Re: Cloud noise
Post by: D.A. Bentley (SuddenPlanet) on June 10, 2020, 10:15:42 AM
One other setting you could turn down to speed up renders is under the Render GI settings.  Go to the 3rd tab and look for Cloud GI max ray depth.  I think you had it at 2 in your scene, so try setting it to 1 and see how much faster it renders.  Glad you figured out a solution for your scene!  I learned something new too thanks to WAS.  ;)

-Derek
Title: Re: Cloud noise
Post by: Tangled-Universe on June 11, 2020, 08:36:32 AM
Seems a few beat me to it with some advice, but I will share my findings anyway.

Attached is a collage of renders I did of this scene.
The text can be a bit cryptic, so please let me clarify:
PNT = pixel noise threshold for the AA sampler
vox = number of voxels in millions (M)
vsq = voxel scatter quality
crmq = cloud ray marching quality

Why the larger renders?

Being here for quite a few years many discussions about cloud noise are being guided/led by small crop renders with relatively small clouds compared to screen space and somehow those perceive way more noisy to me as when rendered at higher resolution.
I think with small crop renders we are literally "pixel peeping" at noise, similar to how photography forums are plagued by people judging lens' sharpness or microcontrast by zooming in at 200% or worse.
With larger renders you have more context and more information on how AA samples the gradients in the clouds.

Anyway, that's personal and a bit fact-free to some extent, let's have a look at those test-renders, because facts are facts.

As suggested voxel scattering quality is important. Very important!
I'd say or admit...I didn't know until now that it was that important in relation to performance and visual quality.
As far as I know the max setting of 400 is internally also the hard cap. Voxel scatter quality >400 will be clamped at 400.
Matt may correct me if I'm wrong, but this is what I remember from an alpha release note.

Edit: I was wrong!

But also voxel number can be important and increasing it can even reduce render times!
In a way it could make sense, as voxels are closer to each other and things like voxel shadows are defined in absolute distance in voxels.
Thus, increasing voxel number makes each voxel more similar to its neighbouring voxel and is easier to handle for AA. Something along those lines.

Apparently, with enough voxels and high enough voxel scatter quality the smoothness of the cloud isn't dictated by PNT very much anymore.
Shooting more rays it at, like with AA16 (bottom right) doesn't help much anymore and only increases render times unnecessarily.
Title: Re: Cloud noise
Post by: Matt on June 12, 2020, 05:15:28 AM
There is
Quote from: Tangled-Universe on June 11, 2020, 08:36:32 AMAs far as I know the max setting of 400 is internally also the hard cap. Voxel scatter quality >400 will be clamped at 400.
Matt may correct me if I'm wrong, but this is what I remember from an alpha release note.

There is no limit on voxel scatter quality. In 4.5 alpha the slider range has changed, but you can still enter higher values by hand.
Title: Re: Cloud noise
Post by: Tangled-Universe on June 12, 2020, 06:45:35 AM
Thanks Matt for the correction, it's important I do not cause confusion or the like!
Title: Re: Cloud noise
Post by: Kexikus on June 13, 2020, 03:07:22 AM
Thanks for these detailed tests Tangled-Universe!

I'll definetly keep in mind how important the number of voxels is, especially since it seems to improve both render quality and render time.
Title: Re: Cloud noise
Post by: WAS on June 13, 2020, 03:20:48 AM
I think it's very important to note RAM usage when fiddling with "VOX" (MOX seems more appropriate). For example, going from 10 to 300 results in a 9.25gb jump in RAM (on my system and scene with just made a v3 cloud layer). In fact it would be cool if this setting didn't go above 1000 unless you are stepping (arrows up and down) to prevent DIMM damage in case of system failure (even 1000 is high, and maybe this cap should be calculated based on available system ram).

The reason for this fail-safe is that it's easy to accidentally enter a stray number(s) and crash TG, and I've enter a couple strays before and had BSOD related to RAM failure (forget specific error).

Also not sure why this feature doesn't cache to disk like other stuff in TG. Maybe cause of how quick it inflates in RAM.
Title: Re: Cloud noise
Post by: Tangled-Universe on June 15, 2020, 11:41:37 AM
Yeah I did not think about checking RAM usage, I was experiencing a kind of tunnel-vision for quality vs render-time.
Indeed, increasing voxelcount can dramatically increase memory usage. Honestly I don't know if 300M voxels use the same amount of RAM for every scene, or whether if there are others factors at play which may reduce or increase the amount being used.
The only beef I have with high voxel numbers is that if you save the .tgd with high voxel numbers then opening the project and getting started with it is usually considerably longer.
Title: Re: Cloud noise
Post by: WAS on June 17, 2020, 02:14:31 PM
Quote from: Tangled-Universe on June 15, 2020, 11:41:37 AMHonestly I don't know if 300M voxels use the same amount of RAM for every scene, or whether if there are others factors at play which may reduce or increase the amount being used.

Oh most certainly, though I can say mine was just a slap in v3 and less total coverage and complexity than this scene, and tighter edges, but the density probably place a big factor.

His scene starts at 2,999.0mb and inflated to 7,907.2mb, not bad, but this is prior to rendering, so something to keep in mind.
Title: Re: Cloud noise
Post by: Tangled-Universe on June 17, 2020, 04:13:47 PM
I meant I wasn't sure whether if you can say/state for any given scene:
"For every X million voxels memory usage increases with Y gigabyte"
Title: Re: Cloud noise
Post by: WAS on June 17, 2020, 04:41:29 PM
Quote from: Tangled-Universe on June 17, 2020, 04:13:47 PMI meant I wasn't sure whether if you can say/state for any given scene:
"For every X million voxels memory usage increases with Y gigabyte"

Not sure what you mean. Of course any other scene would have different results. If you mean the same state of a scene being different on other systems with available RAM to use, that would be a concern for the stability of the software. For example, think render farms and pricing.

My initial point is that, for any scene, playing with Millions of Voxels will have a RAM impact. ANd this is before rendering, where TG will still hold on to what it's using for the software and previews itself (if not using a node)