Populator v4

From Terragen Documentation from Planetside Software
Revision as of 04:18, 8 September 2021 by Redmaw (talk | contribs) (Added descriptions and example image for Scale tab.)
Jump to: navigation, search
Populator v4


The Populator is used for creating and distributing many instances of the same object across a customizable rectangle area on the xz-plane. By using the Populator, the user can have the application accurately place instances of objects (instantiated objects) on the terrain surface automatically, so that the object's y coordinate matches the y coordinate of the terrain. The ability to specify a density shader allows users to mask the placement and distribution of objects. If no distribution shader is specified, the Populator places objects randomly across the defined rectangle area. To mimic more variety, the Populator can rotate instantiated objects randomly around the y-axis, and vary the object scale within a Population by user defined parameters.

The Populator v4 was introduced in Terragen 3. It has several important changes and new features:

  • Multithreaded population. Population is calculated on multiple cores at the same, making it considerably faster on multicore machines.
  • Instance editing. This allows you to edit or delete individual instances within the population. You can find out more about instance editing here.
  • Instance caching. Population instances can be saved to a cache file. The cache file is read when the population is loaded, potentially saving time compared with calculating the instances. You can find out more about instance caching here.
  • Populator v4 no longer allows instances to appear outside the population area.

The Populator v4 replaces the Populator v3 in Terragen 3. All new populations are created using the Populator v4. However the Populator v3 is still available in TG3 so projects created in TG2 can still be loaded and will render as expected. The only difference is that you can't create new Populator v3 nodes in TG3.

If you would like to convert a population from v3 to v4, simply select it in the Node List on the left, then use the utility button with a Gear Icon below the node list to select "Upgrade Selected Population to v4". Note that you must have the population you want to convert selected in the Node List; node selections in the Node Network will not be detected.

For additional information and example projects for using Populator nodes, please see the Populator Guide.


  • Name: This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Populator nodes in a project.

  • Enable: When checked, the node is active and the settings below will be used for the population. When unchecked, the node is ignored.

  • Show b-box in preview: When checked, a 2D rectangle marking the XZ axis boundaries of the population will appear in the 3D preview.
    Show b-box in preview off and on

  • Preview mode: This popup menu has five options which let you choose the most detailed mode that the object can be displayed in. The Object Display Mode button in the 3D Preview controls the mode for the preview as a whole. For example if you set the Preview mode of the object to Wireframe but the 3D Preview object display mode is set to Show as bounding boxes then the object will only be drawn as a bounding box.
    Preview Mode options

    Preview modes

  • Preview colour: When checked, the population will draw in the 3D Preview using the specified colour to the right. The preview colour can be seen in bounding box, wireframe and smooth shaded preview modes.
    Preview colour = sRGB (176,185)

  • Object maker: Allows the user to enter or select an object maker that defines the object being populated. These include 3D objects in OBJ (Wavefront OBJ), LWO (Lightwave) and TGO (Terragen) formats, and also Terragen's built-in objects: Card, Grass clump, Poly sphere, and Rock.

  • Render quality: Allows for specifying the render quality of populated objects. To reduce render times, level-of-detail reduction is applied to parts of objects that appear very small in the rendered image, with respect to the image resolution and detail settings in the render node. Therefore more detail reduction is applied to objects in the distance or to objects with very small polygons. The Render Quality setting controls how much reduction takes place, but also affects render times. Note: this setting does not have an effect when Raytrace Objects is enabled, which is the default in newer versions of Terragen.
    Render Quality options

  • Repopulate every frame: When checked, this setting forces the populator to recalculate the positions and sizes of the instantiated objects every time a new frame is rendered. This is necessary if you animate your distribution functions, terrain, or object maker. If you don't check this box, the population will still be calculated automatically at the start of a render if any of the Populator's parameters have changed.

  • Populate Now button: Clicking this button calculates a population of instanced objects based on the current settings. If you do not click on this button, the population will be calculated automatically the next time you render an image.

  • Clip to camera: When checked, the instanced objects are only populated within the camera’s field of view. This has the added benefit of using less memory.
    Clip to camera off and on

  • Use instance cache: When checked, the population uses the population instance cache selected under the Cache settings button. For more information about instance caches click here.

  • Cache settings: Click this button to open the Cache Settings window. You use the Cache Settings window to both save a cache file and specify the cache file to be used.

Distribution Tab[edit]

Distribution Tab

  • Area centre: This setting allows you to enter the 3D coordinates of the rectangle distribution area on the XZ plane; the Y value is used for height. Leave the Y field empty if you want to specify a terrain onto which the objects should be placed.
    The Area centre setting positions the population at any 3D coordinates.

  • Area rotation: This setting allows you to enter rotational values as degrees in order to rotate the rectangle distribution area. Normally you rotate around the Y axis, but you can also enter values in the X and Z fields which can result in a narrowing of the population area as the projection plane changes.
    The Area rotation setting rotates the population.

  • Area length a: This setting controls the length of the population boundary along the X axis.
    The Area length a setting sets the length along the X axis

  • Area length b: This setting controls the length of the population boundary along the Z axis.
    The Area length b setting sets the length along the Z axis

  • Object spacing in a,b:This setting specifies the average distance from one object instance to the other. The higher the value the more space between objects and fewer objects within the populated area.
    Object spacing in a,b sets the average distance between instanced objects.

  • Spacing variation in a,b: This setting controls the randomness of the position of the object instance. A value of 0 results in no random aspect to the placement of the object instances therefore they will align in a grid pattern as defined by the Object spacing in a,b. With the default value of 1 the placement of the object is the most random and the population as a whole looks the least regular.
    The Spacing variation in a,b sets the amount of randomness to the instanced object’s position.

  • Use density shader: When checked, the shader or function nodes assigned to this setting are used as a density mask to provide more control over where instanced objects are placed within the population area. The density shader is read as a mask. Objects are placed more densely where white areas occur and not at all where black areas occur. Grey values result in varying levels of density according to the brightness of the greyscale value.
    Shader and function nodes can be used as a density mask for the shader.

  • Invert density shader: When checked, the density shader mask is inverted.
    The Invert density shader checkbox inverts the density shader mask.

Anchor Tab[edit]

Anchor Tab

The Anchor tab has settings which let you choose how the instanced objects of the population conform to the terrain, another object, or nothing at all.

  • Sit on terrain: When checked, and shader or function nodes are assigned to the Sit on Terrain and Planet settings, the instantiated objects will be placed on the surface and conform to its shape. If nothing is assigned to the Sit on Terrain setting, the instantiated objects are placed within the population’s position and rotation coordinates but the Y axis is ignored, that is, the population will be created at a Y axis value of 0. Furthermore, if nothing is assigned to the Planet setting the populator will take into account the Y axis value when it generates the population.
    Sit on ground and planet settings off and on

  • Sit on object: When checked and an object is assigned to this setting, the instantiated objects will be placed on the surface of the object and conform to its shape. Instances are placed only on the surface of the object assigned to this setting. This can be any object in the project, even ones that are disabled for rendering. Positions are calculated by casting rays "downwards" from the population's area until they hit the surface of the object. By rotating the population area you can change the "downwards" direction in order to cast instances on different sides of the object. After initial instance positions are calculated using the ray casting method, displacement shaders on the object will displace them into final instance positions.
    The Sit on object setting allows instantiated objects to be populated on 3D Objects.

  • Free floating:: When checked, the instantiated objects are not based on the terrain or an object, but rather within the area defined by the Populator’s centre, rotation and length settings. For example, you could create a population in the sky of birds, bats and bugs, or even rain, snow or hail.
    Free floating allows populations to be placed anywhere in the project, not just on terrain or other objects.

Scale Tab[edit]

Scale Tab

The settings on this tab allow you to control the size variation of the object instances within the population. This provides more variety within the population and looks more naturalistic. The Minimum scale and Maximum scale settings act as multipliers to the default scale of the object, which is taken from the object node specified in the Object maker parameter. When the value of both settings is 1, there is no variation in the instanced object’s size, and all instances are the same size. If you set the Minimum scale to 0.5 then the smallest instances would be half the default size. If the Maximum scale was set to 2 then the largest instances would be twice the default size. As the populator creates the instances it randomly chooses a size between the minimum and maximum.

  • Minimum scale: This sets the minimum scale multiplier used by the populator.
  • Maximum scale: This sets the maximum scale multiplier used by the populator.
    Minimum scale and Maximum scale values between 0.1 and 2.0

Additional tabs for Populator v4[edit]

A shader is a program or set of instructions used in 3D computer graphics to determine the final surface properties of an object or image. This can include arbitrarily complex descriptions of light absorption and diffusion, texture mapping, reflection and refraction, shadowing, surface displacement and post-processing effects. In Terragen 2 shaders are used to construct and modify almost every element of a scene.

The Node List is a part of the Terragen interface that shows a list of nodes along the left side of the application window. The Node List generally shows only those nodes that are relevant to the current Layout (e.g. Terrain, Atmosphere). It sometimes includes buttons or other controls that are specific to a particular Layout as well. The Node List is hierarchical and each level is collapsible.

A single object or device in the node network which generates or modifies data and may accept input data or create output data or both, depending on its function. Nodes usually have their own settings which control the data they create or how they modify data passing through them. Nodes are connected together in a network to perform work in a network-based user interface. In Terragen 2 nodes are connected together to describe a scene.

The bounding box is a box which surrounds (or bounds) an object or shader. This box shows the maximum extents of the item inside it. Sometimes abbreviated as "b-box".

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.

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.

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