Home

Number of Samples

Friday, January 16th, 2009 | Author:

Number of Samples is a parameter that can be found in the settings of Cloud Layers and Atmospheres, located in the Atmosphere tab. It changes the quality of the clouds and atmosphere respectively by reducing random noise.

samples_atmo.gif

samples_clouds.gif

But how are Samples involved in atmosphere rendering?

A cloud is basically made up of billions of small water drops – to simulate these and the rays of light that hit and pass through them in a physically correct way would be a challenge for a supercomputer. To render an image we luckily don’t need physical correctness – clouds are simulated only as detailed as is required for a realistic appearance.

To render a cloud, the algorithm has to make a descision on whether the ray of light hits a particle/drop – and is either redirected or absorbed – or not. This decision is, to some extent, made randomly. This is no restriction, since raindrops in a cloud are randomly distributed anyway.

With this kind of random distributions you rarely get soft shapes though.
Let’s look at a similar “experiment”: Dice roll. The probability is equal for each side. Yet, after 12 throws, not every side will have shown an equal amount of times.

12.gif1012.gif

In the first diagram 12 throws are shown, the second shows another 1000. You can see that with more than 1000 throws the random results begin to form a predictable distribution.
Remember: The more samples, the better will the outcome approximate a certain value. More samples mean less random results.

In TG2 practice, that means less noise. You have to figure out, though, which part of the image is noisy. If it is the whole atmosphere, especially when creating sun rays, then the samples in Atmosphere 01 must be increased. If it’s only the clouds that are noisy, then you have to change the value in that particular Cloud-Layer.

Some examples:

001-326.jpg

1 Sample – The extreme example. It’s clearly visible that the clouds are made of only thousands of particles. So only one sample is clearly not enough. It doesn’t even fill up the clouds.

Additional render time for the clouds*: 1min 12s

008-455.jpg8 Samples – That already looks good, but the edges still look a bit shredded, which is often unwanted.

Additional render time for the clouds*: 2min 41s

032-1017.jpg32 Samples – Any noise is gone. The render does take longer though, so you might want to go down to 16 samples on large images.

Additional render time for the clouds*: 8min 03s

In the last image we can see that the sky and rays in the bottom left corner still suffer from noise – this can be solved by increasing the sample count of Atmosphere 01. Most of the time you should first increase the sample count of the atmosphere, since it affects the entire atmosphere. If you only see noise in the clouds, then increase those samples.

More samples affect the rendertime greatly, under some circumstances you might have to employ a lot of samples and endure long hours of rendering to get a satisfactory result.

*Render time in addition to render time for the image without clouds.

Tags »

Trackback: Trackback-URL | Comments Feed: RSS 2.0
Category: Documentation

You can leave a response.

3 Responses

  1. 1
    Anonymous 

    Great couple of posts – thanks! The parameters in Terragen can be quite baffling, but this kind of insight into the physical ideas behind them can be really useful…otherwise people like me are just randomly moving sliders.

  2. 2
    Diego 

    The best tutorials I’ve found so far. You make it all sound so simple and logical. Keep it up, favorited this sucka! ;)

  3. 3
    Vik 

    This was very usefull.
    Thanks!

Leave a Reply