Render - Advanced Tab

From Terragen Documentation from Planetside Software
Revision as of 02:53, 21 April 2018 by Matt (talk | contribs) (Ditto)
Jump to: navigation, search

Render - Advanced Tab

The Advanced Tab holds some advanced settings for managing the rendering process. There are settings related to the number of threads used during a render, certain blocks of memory used during rendering and how some render information is generated.

Managing render threads
Terragen can render different sections of the image at the same time. These image sections are known as buckets. Many computers have multiple processor cores, and on these computers rendering can be completed faster if each core renders a bucket at the same time. The buckets are assigned to render threads. A thread is a section of a computer program which can do work at the same time as other parts of a program.

When Terragen starts up it automatically detects the number of cores your computer has. This number is displayed on the Splash Screen. By default Terragen creates one render thread for each core it detects. For example, if your computer has 4 cores then Terragen will create 4 render threads during rendering. This means Terragen can render 4 buckets at the same time. It is possible to override the core detection in the Startup panel of the preferences.

The render node gives you more control over this. You can use the Minimum threads and Maximum threads parameters to influence how many render threads Terragen creates. These parameters set the the upper and lower limits of the number of render threads created. The Maximum threads parameter is really the most useful of the two and the parameter you are most likely to want to change.

Let's say your computer has 4 cores and you only want it to use 3 cores for some reason. To do this you would set the Maximum threads parameter to 3. You could use the Minimum threads parameter to force Terragen to create more render threads than it normally would, although this is not recommended.

Managing the subdivison cache

This section applies to Terragen 2 and 3, but not Terragen 4.

As Terragen renders it subdivides scene geometry into small pieces. It can store these small pieces in a subdivision cache to save having to recalculate them so often for things like ray traced shadows, reflections and GI rays, which can make rendering faster. There are two settings you can use to control the subdiv cache. You can set the maximum size of the subdiv cache using the Size of subdiv cache in MB parameter. This controls the maximum amount of memory Terragen can dedicate to the subdiv cache. The subdiv cache is divided up between render threads. If 4 render threads are created each thread will get 100 MB of the subdiv cache.

If you set the subdiv cache so small that less than 50 MB would be used per render thread Terragen will automatically increase the subdiv cache size to the minimum of 50 MB per thread.

Normally Terragen will use up the subdiv cache on an as-needed basis. The size parameter limits how can much be used but it may not use that much. There may however be times when you want the subdiv cache to be created in it's entirety when rendering starts. You can use the Preallocate subdiv cache parameter for this. One situation where you might want to do this if you are having problems with running out of memory during rendering. By preallocating the subdiv cache you might help these sorts of errors become apparent sooner, which can save time in trying to figure out what is going wrong.

You may be tempted to set the subdiv cache to quite a large size. While increasing it a bit can be helpful in some scenes we don't recommend that you increase it a lot, particularly if you also check the preallocation option. When running in 32 bit mode Terragen may only have 2 to 4 GB of memory available. If you were to set the subdiv cache size to 1600 MB (1.6 GB) then that could mean only 400 MB of memory is left for other purposes. In this case you are likely to experience render errors or other problems. Even if you are using the 64 bit version setting the subdiv cache size too large can unnecessarily use up memory and may cause rendering to become slow or cause errors to occur.

If you want to experiment with the subdiv cache size 100 to 150 MB per render thread is a good place to start. As with many advanced settings the best results will probably vary between different scenes.

Note that the 64 bit version has different default settings for the subdiv cache size than the 32 bit version. This is because memory is not quite so restricted in the 64 bit version and so Terragen bases the default size on the number of cores detected.


  • Minimum threads: Sets the minimum number of threads Terragen creates during rendering.
  • Maximum threads: Sets the maximum number of threads Terragen creates during rendering.
  • Size of subdiv cache in MB: This parameter controls how many megabytes of memory the subdivision cache can use.
  • Preallocate subdiv cache: If this is checked Terragen will allocate the entire subdivision cache when rendering starts.
  • Ray detail region: The ray detail region is the area in the scene where polygons with displacement are fully subdivided by the ray tracer. Polygons outside this area are only coarsely subdivided. Sometimes you might have problems like shadows cast by objects outside the the camera view not seeming accurate. This could be corrected by changing the ray detail region.
    • No detail: Nothing is fully subdivided. Everything is subdivided only coarsely.
    • Detail in crop region: TBC
    • Detail in camera: TBC
    • 360 degree detail (optimal): The subdivision detail is highest in the direction that the camera is looking towards. The detail gradually decreases to 33% of the highest detail behind the camera, so detail outside of the camera view is usually higher than in the previous two modes. In this mode Ray detail region padding is ignored. This mode does not work with orthographic cameras.
    • 360 degree detail (highest): The subdivision detail is uniform in all directions around the camera position, even behind the camera. This produces the highest all-round detail in displacements that cast shadows or appear in ray traced reflections, but beware that this mode can increase render times greatly, especially if there are any ray traced reflections appearing on objects with high curvature or displacement. In most cases it's preferable to use 360 degree detail (optimal) instead. In this mode Ray detail region padding is ignored. This mode does not work with orthographic cameras.
  • Ray detail region padding: If you are using Detail in crop region or Detail in camera you can use this "padding" amount to enlarge the ray detail region beyond the crop region or camera view. The value controls the amount of padding, and is typically between 0 and 1. 0 means no padding. 1 adds a border around that area which is the same as the width or height of the area. This will make the ray detail region 3 times as wide and 3 times as tall (as seen from the camera). If you need to go higher than 1, consider changing the Ray detail region to 360 degree detail (optimal).
  • GI prepass padding: This setting does a similar thing to the ray detail region padding, but it works on GI samples. The padding can help to resolve problems with GI differences around the edges of crops or images. These might be apparent if you're stitching images together. Small values are recommended. 0.1 might be a good starting point.

Example Movies

GI prepass padding

Back to: Render

When Terragen renders, it divides the image up into buckets or tiles. Each bucket is rendered separately, allowing multiple buckets to be rendered at once. It also allows memory to be used more efficiently.

A parameter is an individual setting in a node parameter view which controls some aspect of the node.

Literally, to change the position of something. In graphics terminology to displace a surface is to modify its geometric (3D) structure using reference data of some kind. For example, a grayscale image might be taken as input, with black areas indicating no displacement of the surface, and white indicating maximum displacement. In Terragen 2 displacement is used to create all terrain by taking heightfield or procedural data as input and using it to displace the normally flat sphere of the planet.