Render Pixel Sampler
The Render Pixel Sampler can be opened from Render > Quality > "Edit sampling".
One of the most important settings for controlling the quality of your image—and the time it takes to render—is the Anti-aliasing parameter on the Quality tab of the renderer. This parameter is also shown in the Render Pixel Sampler. The square of the anti-aliasing number tells you the maximum number of primary rays that are traced per pixel of the image, or in other words the maximum samples per pixel. An anti-aliasing value of 3 means that up to 9 samples can be taken per pixel; a value of 8 means that some pixels may take up to 64 samples, and this is usually enough for very good images. An adaptive sampling technique is used to avoid taking the maximum number of samples where the sampler detects that the contrast between adjacent samples is below some threshold. This can be an effective way to concentrate anti-aliasing work where it is needed most, to increase quality and reduce the render time.
By default, the Anti-aliasing parameter is like a preset that controls the parameters of the adaptive pixel sampler. You don't need to know exactly how these parameters are affected by the anti-aliasing preset; we've selected good presets so that you don't need to think about it. However, if you enable Customise sampling you can precisely control the parameters of the adaptive sampler. These parameters are First sampling level and Pixel noise threshold.
As an example, let's say you have Anti-aliasing set to 4, which gives you a maximum of 16 samples per pixel, and set First sampling level to "1/16 first samples". This gives you a minimum of 1 sample per pixel when max samples is 16. The maximum and minimum number of samples per pixel is shown just below the main Anti-aliasing parameter. The minimum samples per pixel depends on the maximum samples and the choice of First sampling level.
In the above example, first off, Terragen takes one sample per pixel. For every four pixels, it looks at the difference between the luminance of those pixels and the luminance of the average of those pixels. This is a way to estimate how much noise or contrast there is in this region. If the total difference is greater than the Pixel noise threshold, then that pixel is subdivided into four sub pixels. The process continues with the subpixels, comparing sets of four samples at a time and deciding whether to further subdivide.
The actual threshold used to decide whether to subdivide to the next level depends on the spacing between the samples in the current subdivision level compared to the size of a pixel. At deeper subdivision levels (more samples), the allowable threshold is higher (making it less likely to subdivide) because at higher subdivisions each of the samples has less contribution to the pixel result and we want to help the algorithm stop subdividing as soon as possible. (The maximum samples will never be exceeded, however.) In the same way, if the first sampling level is more coarse than 1 per pixel, the actual threshold used on the first level will be lower than the value entered.
If you choose settings that show that minimum samples per pixel are less than 1, this means that the spacing between the first samples will be larger than a pixel. If you have Anti-aliasing at 1, and the First sampling level is "1/4 first samples", this means that there will be only one first sample for every four pixels, i.e. a spacing of 2 pixels. The same would also be true of Anti-aliasing 2 with "1/16 first samples". You can make the first sampling level even coarser than this. This may be useful for low quality previews.
This all makes sense if you have anti-aliasing levels that are powers of 2, e.g. 1, 2, 4, 8. These correspond to maximum samples of 1, 4, 16, 64. The spacing between samples at all levels of the adaptive process will be powers of 2. However, because Terragen's anti-aliasing levels allow you to use odd values, sometimes the samples of the first sampling level will not fall on exact pixel spacings, which is why you sometimes see non-whole numbers for the mean minimum samples per pixel.
Sometimes these odd spacings degrade image quality or introduce artifacts, especially with motion blur. However, in most static renders there are no noticeable problems, and it's quite useful to be able to choose AA levels between the powers of 2 levels. Many other adaptive ray tracers restrict their sampling to powers of 2. If this concerns you, choose anti-aliasing levels 2, 4, 8 or in extreme cases 16.
The luminance values and the differences between them are actually measured in a non-linear colour space so that dark parts of the image don't appear noisier than bright parts.
Currently the adaptive sampler only keys off luminance, rather than the individual RGB components. Samples that have different hues or saturation values but give the same "luminance" will be seen as being equal, so high amounts of noise in colour and saturation may be tolerated by the sampler. This is often OK, because human vision is also less sensitive to high frequency changes in these things. It also means that the most noise is allowed in the blue channel, and the least in the green channel, due to the weightings of these values in the luminance calculation.
More Information: Rendering Optimization Guide
Back to: Render
A parameter is an individual setting in a node parameter view which controls some aspect of the node.
A single element of an image which describes values for color and/or intensity, depending on the color system which the image uses. Groups of ordered pixels together form a raster image.
A sample refers to a value or set of values at a point in time and/or space. The defining point of a sample is that it is a chosen value out of a continuous signal. In Terragen 2 it is usually a mathematical (procedural) function that is being sampled.
This is essentially the brightness of the colour. Terragen converts RGB colours to greyscale by taking the luminance of the colour.