Introduction

22nd May 2019 at 4:32pm

Documentation for GEMM version: 0.1;
Oldest tested MM version: 1.9.7
Newest tested MM version: 1.10.3

Zero Vector Studios, 2019

Website | Asset Store | Email ([email protected])


Welcome to the documentation for "Generator Extensions for MapMagic", a.k.a. GEMM. This is a plugin that reinforces the wonderful capabilities of MapMagic with some thoroughly useful new additions.

NB: For a complete, at-a-glance list of all nodes added by GEMM, see the Generators page.

At present, GEMM provides:

  • Multiplexing tools, allowing you to "reuse" nodes, creating more compact node graphs with smaller margins for error through the "compression" of several inputs into one;
  • Powerful generators for the placement of unique objects, both individual and fixed sets of them;
  • Tree and object randomisation: use more than one prefab when placing a patch of trees or objects to bring easy variety in your world, and exercise greater control over tree colouration through per-tree colour variance options similar to (even better than) the default Unity one;
  • Nodes for simple, predictable, and convenient partitioning of masks and object hashes;
  • Randomisation nodes for inputs and outputs of any type, allowing random graph "branching" based on seeds;
  • A node allowing small labels to be placed on the graph. A minor quality of life improvement to be sure, but a welcome one.


Again, all generators added by GEMM can be found on the Generators page. This file also acts as a regular web page, so your browser history works as normal, as does CTRL+F to search.

Generators

2nd April 2019 at 6:38pm

Generators are the building blocks for MapMagic (MM) graphs. This page lists all nodes added to MM by this plugin.


Multiplexing (in depth):
* Breaker
* Demux
* Mux

Generic:
* Randomise Input
* Randomise Output

Other:
* Label

Outputs:
* Varying Objects
* Varying Trees

Maps:
* Scaling Voronoi
* Slice

Objects:
* Once
* Scatter Once
* Several
* Stratify

Breaker

3rd April 2019 at 4:04pm
Generators Multiplexing

Added in v0.1

The (Circuit) Breaker node propagates input fed into it without modifying it, and prevents any demultiplexer from traversing the graph before it, improving muxing performance, especially in large graphs. In essence, the Breaker node is a "promise" that no Mux nodes come before it in the graph.

No muxed inputs should be fed into a Breaker at any point in time, as the Breaker will prevent any subsequent Demux from accessing the data properly. For more essential information about muxing, please see the Multiplexing page.

Inputs:

  • (any type) Input: Input needed inside the multiplexer.

Outputs:

  • (any type) Output: The input data, not modified in any way.

Properties:

  • I/O type: What the type of input and output is. Can be of any type supported by MapMagic. Changing this will cause all prior links to disconnect.


Example: a Breaker in action. The portal on the left-hand side, containing the heightmap of the terrain, comes from a chain of about 30 nodes. The Breaker node visible in this image prevents the linked Demux (not visible, somewhere further on the right) from recomputing the entire graph – said 30 nodes, as well as the Forest node seen right before the Breaker – multiple times by stopping backpropagation upon the encounter of a Breaker: remember, the Breaker is a notification to any subsequent Demux that no Muxes can be found before the Breaker itself.

Demux

2nd April 2019 at 6:04pm
Generators Multiplexing

Added in v0.1

The Demux (Demultiplexer) node splits outputs previously "combined" by a Mux. It works only when connected to a Mux.

As listed in the page on the Mux node, the purpose of multiplexing is to allow for node reuse and more manageable graphs. Please make sure you've read the tutorial on the Multiplexing page before you attempt zany shenanigans with muxing.

Note that the types and number of the nodes in every demux layer need not be the same as those produced by the respective mux. It all depends on what you're doing with the data, really.

Inputs:

  • Source Mux: The Mux that this node must be connected to in order to work. Note that despite having the icon of a "Map" input, and despite "accepting" Map inputs, this is NOT a Map input. Connecting this input to any output which is not the "Target Demux" output of a Mux will result in exceptions, and must NOT be done. This particularity was necessitated due to some operational aspects of MapMagic itself.
  • (any type) Input X: The Xth input of a layer. These inputs must be connected to nodes that have been processing data ultimately coming from a Mux node in order for the mux to do anything.

Outputs: (per layer)

  • (any type, any number) Output X: The Xth output of the layer. The value of this output corresponds to the value of the respective input of the respective layer in the connected Mux, processed through all nodes between them.

Properties:

  • Layer node types: A set of types that detemines how many outputs every output layer will have, and what type they are, as well as what the inputs of the demux are. Note that modifying these in any way will disconnect ALL inputs. These need not be the same as those connected to your mux if you don't need them to be.
  • Layers: The layers of output data. Ideally their number should be the same as the number of input layers in the mux. Layers present in the mux but not here will waste computational power for no reason (inaccessible outputs), and extra layers will have blank outputs.

Example: Multiplexing three scatters to create forest patches with different trees. Top: the graph; Bottom: masks going into the mux (in order, left to right), as well as the final result.
NB: Another example of data muxing can be found on the Mux page, and a thorough discussion can be found on the Multiplexing page.

Label

3rd April 2019 at 4:08pm
Generators Other

Added in v0.1

The Label is a simple graph node with no inputs and no outputs. The sole purpose of the Label is to allow you to add comments to your graph.

Hit "Enter" after writing your comment to save it.

NB: Word wrapping resizing labels with the old GUI controls is a royal pain in the arse, and I'm not even sure if it can be done perfectly. As a result, the Label component will start... "shortening" as the number of lines increases. Keep your labels short.

MapMagic

17th May 2019 at 3:18pm

MapMagic is a library for node-based terrain generation, and is a prerequisite for GEMM.

Official MapMagic website | Forum thread | Asset Store

Multiplexing

23rd May 2019 at 1:24pm

Multiplexing (Muxing) is the art of compressing graphs through the use of the Mux and Demux nodes, and perhaps the use of Breakers. This page serves as a moderately thorough overview of muxing.

Why muxing?

Because vanilla MapMagic doesn't have a way to do it, and I am averse to copying nodes and parts of the graph I wish to reuse, especially considering we can't select multiple nodes simultaneously (aside from the use of groups, of course).

Muxing and demuxing allow you to use one node several times, make the graph a lot simpler to manage and to even look at, and are just nice to have, really.

Disclaimer

I've not done extensive performance testing, but I wish to note that I'd wager muxing is more expensive than simply copying the nodes by hand. Even though the muxed graph looks smaller, this doesn't mean we're getting performance improvements.

In fact, muxing most likely induces some overhead to the computations, but we'll get to that in a subsequent section. No need to panic, as I've not noticed any performance hits when using muxes, but this is likely to depend on the size of the entire graph, as well as the "muxed part" of it, and my graphs so far haven't been that large, so I couldn't say what could happen in a worst-case scenario.

The benefits

Let us consider the example found on the Demux page, as I feel it illustrates several points nicely:

Observe how we Slice a noise mask into three binary masks, shown on the bottom row. We feed these masks into a mux node with one single input per layer. These three inputs are given to a normal Scatter node that is fed directly into a "Trees" output. If we were to not use a mux, we'd need three Scatter nodes.

However, if we wanted to process these masks with a few more nodes before we fed them into the Scatter, we'd have to create several identical branches of the graph, and if we wanted to update one of those intermediate nodes at any point in time, we'd have to do the same for all of its copies. By hand.

That's too much effort, don't you think? That's why we've got muxing. This way is much slicker and more elegant than any other way would've been, and any modification to the Scatter node will be applied to all masks instead of just the one.

Note that the "chain" between the mux and the demux can be arbitrarily long, and in fact, you can feed each "mux output" into as many input nodes as you want, just like with a regular output. Go wild. But not too wild. See the last section of this page for the reason why.

Watch the video

I'd also recommend watching the tutorial YouTube video that goes over a more complex example, and touches on more complex concepts, as well as the other components.

[No video yet, but will be here in the real package]

How it works (technical details)

The premise isn't complex. Individual input layers are taken and sequentially processed through the part of the graph between the mux and demux. Given the way MapMagic is designed however, it is not efficient to traverse the graph forward, only backward. Ergo, it is not the mux that does the work, but the demux.

The demux traverses the graph backwards (using breadth-first search) until it finds the mux node, and everything connected to its "muxed outputs". Then input layers are loaded one by one and processed through the entire chain between the mux and the demux, and ultimately propagated forwards as the output nodes.

The point here is that even though it looks like there are fewer nodes (and there really are fewer nodes) in the graph, the data that is processed still increases onefold for every layer you mux in. This, as well as the graph traversal necessary, is likely to induce some overhead for your performance. (I'd still say it's more than worth it though.)

To stop the traversal from going too far back into a large graph that you know contains no muxed data, use Breaker nodes. When the demux reaches a breaker, it'll terminate this branch of its search and improve performance somewhat. Check out the example on the breaker page, or the video linked above (especially the latter) for a better explanation.

Disclaimer: this is not idiot proof

Note that I made muxing to work, not to be idiot proof. If you try it, you can certainly break it by feeding one mux to another demux, feed muxed data into other muxes in irrational manners (you can absolutely do that without issue, by the way, if you're not being irrational), by taking "muxed" data and feeding it into something that doesn't go into a demux (should overwrite it with the last layer every time), or by putting breakers in strange places.

Just be careful, okay? Be sensible and all will be fine. Maybe ask me in the forum thread, if that's live? And happy muxing.

Mux

2nd April 2019 at 6:04pm
Generators Multiplexing

Added in v0.1

The Mux (Multiplexer) node takes in several sets of inputs of any number of type, and produces only one set of outputs. It works only when connected to a Demux note.

The purpose of the mux is to remove the necessity of duplicating nodes you wish to reuse for multiple different inputs, as well as to make graphs simpler to manage, as well as more visually appealing. Please familiarise yourself with the tutorial on the Multiplexing page before you do stunts with muxing.

Inputs: (per layer)

  • (any type, any number) Input X: The Xth input of the layer. These inputs will be propagated through the subsequent graph in order until the connected demux is reached.

Outputs:

  • Target Demux: The Demux that this node must be connected to in order to work. Note that despite having the icon of a "Map" output, this is NOT a Map output. Connecting this output to any input which is not the "Source Mux" input of a Demux will result in exceptions, and must NOT be done. This particularity was necessitated due to some operational aspects of MapMagic itself.
  • (any type, any number) Output X: The Xth output of a layer. These outputs figuratively "contain muxed data" and must be connected to subsequent nodes for its processing. When using the "Preview" function, the data from input layer 0 will be displayed.

Properties:

  • Layer node types: A set of types that detemines how many inputs every input layer will have, and what type they are, as well as what the outputs of the mux are. Note that modifying these in any way will disconnect ALL inputs.
  • Layers: The layers of input data. You can have as many as you like. Data fed to these layers will be processed in order, and they will be output in the same order by a connected demux node.

Example: Muxing two masks. Left: the graph. "Inside" the mux (between it and the demux) there is a single curve node that adds 0.5 to its input uniformly. Using the mux, we process both masks using the single curve node. Right, top: the blended output without multiplexing; bottom: output of the graph as displayed in the left image. Note the "plateaus", signifying that we've reached and exceeded a value of 1 at those points.
NB: Another example of data muxing can be found on the Demux page, and a thorough discussion can be found on the Multiplexing page.

Once

3rd April 2019 at 4:00pm
Generators Objects

Added in v0.1

The Once generator produces one single output at a specified position, or a random position among a range of positions. Alternatively, it can replicate the same output for every chunk.

If you need to uniquely scatter multiple objects, check the Several and Scatter Once generators.

This can be used to easily add unique points of interest to your world, as you may specify an output located anywhere in the world. (The ground under this output can be masked using a Blob, for an example).

Outputs:

  • Output: A spatial hash with the single object's location.

Properties:

  • Space: Whether your ranges are input in world space or terrain space.
    • World: Your units for X/Z are in world space, i.e. regular Unity units. Whuch chunk your object ends up in thus depends on the "Terrain Size" option in your MapMagic configuration.
    • Terrain: Units are in "terrain space", i.e. dependent on the "Resolution" option in your MapMagic configuration.
  • One per chunk: If enabled, this output will be replicated to every chunk. Every chunk will sample its own random point from the selected ranges. If the ranges specified exceed the size of a chunk, they'll be "wrapped around".
  • Seed: The seed of the random number generator used to select the point's position in the given range.
  • X/Z range: The minimum and maximum values of the X and Z units the single output point can be located in.


Two examples using four terrains with Terrain Size = 100 and Resolution = 512. Top: One single tree created at the centre of the very first chunk. Bottom: One tree per chunk, at a random point within the middle 50% of the chunk.

Randomise Input

3rd April 2019 at 4:04pm
Generators Generic

Added in v0.1

The Randomise Input generator randomly selects one input out of a set of several and propagates it to a single output. All inputs must be of the same type, though that type may be changed.

Inputs (per layer):

  • (any type) Input: The respective input.

Outputs:

  • (any type) Output: One of the inputs selected randomly, without modification.

Properties:

  • I/O type: The type of the inputs and output of this generator. Can be any of the default types used by MapMagic. Changing this will disconnect all prior connections.
  • Seed: The seed for the random generator that selects inputs.
  • Weight: (per layer) The weight of the respective layer. Layers with higher weights are more likely to be selected.


Example: Using either regular noise or Voronoi to create a heightmap. With a seed of "12345" and equal weights, the Voronoi generator is selected.

Randomise Output

3rd April 2019 at 4:07pm
Generators Generic

Added in v0.1

The Randomise Output generator propagates a single "input" value to a randomly selected output layer, without any modification. All other outputs receive a different, "fallback" value.

Inputs:

  • (any type) Input: The "real" input value sought to be propagated.
  • (any type) Fallback: Value of the same type as the input. Will be propagated to all outputs who are not randomly selected.

Outputs (per layer):

  • (any type) Output: The respective output. The output value will either be the same as "Input", if this layer was randomly selected, or "Fallback". Data will not be modified otherwise.

Properties:

  • I/O type: The type of the inputs and output of this generator. Can be any of the default types used by MapMagic. Changing this will disconnect all prior connections.
  • Seed: The seed for the random generator that selects which input to send the real value to.
  • Weight: (per layer) The weight of the respective layer. Layers with higher weights are more likely to be selected.


Example: Using either regular noise or Voronoi to create a heightmap by propagating the "real" mask to one of them. With a seed of "123" and equal weights, the Noise generator receives the "real" mask consisting of ones, and the Voronoi generator recieves the "fallback" mask, consisting of zeroes.

Scaling Voronoi

3rd April 2019 at 4:08pm
Generators Map

Added in v0.1

The Scaling Voronoi generator functions much like the regular Voronoi generator, the only difference being the potential to rescale the size of each "patch" and magnitude of the final output.

With a Scale Factor of 1, this generator produces the same output as a normal Voronoi generator with the same seed.

NB: This page only examines the new attributes of this generator. Please see the regular Voronoi documentation for information on those overlapping with it.



Properties:

  • Scale Factor: Acts as a multiplier for the horizontal (X/Z) size of the Voronoi cells. Setting the Scale Factor to 2 produces cells that are twice as wide and long as a Scale Factor of 1. A Scale Factor of 1 (default) corresponds to regular Voronoi output.



Scale Factor: 1 | 2 | 4. The amplification mode is Regular in all screenshots. Note that the vertical magnitude of the cells has also increased dramatically.

  • Amplification: Determines how the output intensity of the Voronoi map is modulated. This increase in output intensity is a side effect of upscaling the cells, and can be reduced or eliminated through Amplification.
    • Regular: The intensity of the output is multiplied by the square of the Scale Factor;
    • Reduced: The output intensity is multiplied by the Scale Factor;
    • Disabled: The output intensity is unaffected by the Scale Factor. This option corresponds to the "height" produced by a regular Voronoi generator.



Amplification: Regular | Reduced | Disabled. The Scale Factor is 2 in all screenshots. Note that the "height" of the output in the Disabled amplification mode corresponds to that produced by a regular Voronoi generator.

Scatter Once

3rd April 2019 at 4:09pm
Generators Objects

Added in v0.1

The Scatter Once generator scatters objects around a given point in the world. Despite also focusing on scattering objects in the world, this generator is vastly different from the regular Scatter generator, and uses custom mathematical algorithms (and I do mean mathematical) with a greater focus on precision.

Unlike the normal Scatter node, the scattering is not done per-chunk here; instead, it is performed once on a global scale. This allows for the creation of unique sets of objects, and works well in tandem with the Once or Several generator to create points of interest.

Outputs:

  • Output: A spatial hash with the locations of all scattered objects.

Properties:

  • Space: Whether your ranges are input in world space or terrain space.
    • World: Your units for X/Z are in world space, i.e. regular Unity units. Whuch chunk your object ends up in thus depends on the "Terrain Size" option in your MapMagic configuration.
    • Terrain: Units are in "terrain space", i.e. dependent on the "Resolution" option in your MapMagic configuration.
  • Seed: The seed of the random number generator used to perform the scattering.
  • Amount: How many objects to spawn. Unlike the regular Scatter generator, you are guaranteed to obtain exactly the number of objects specified.
  • Centre X/Z: The central point of the scattering patch, in world or terrain units as spacified by the "Space" property.
  • Algorithm: The scattering algorithm to use.
    • Random Square: Scatters objects randomly inside a square.
    • Random Circle: Scatters objects randomly inside a circle.
    • Uniform Circle: Scatters objects uniformly at fixed intervals along the circumference of a circle.
    • Linear: Scatters objects along a given line, allowing for increasing/decreasing distances between them.
    • Square Grid: Arranges objects in a fixed pattern along a square grid.
    • Hexagonal: Arranges objects in a gradually increasing hexagonal pattern.


Scattering 36 objects with all six algorithms, in the order listed above. All examples shown on a single 100x100 terrain, centred on X and Z equal to 50, with a range of 50 and Uniformity of 1, and various random seeds. For the Linear algorithm, Offset equals (10, 10) and Multiplier equals 1.

NB: This algorithm was designed with larger-scale object placement in mind, and lacks a "relax" property to separate objects too close to each other. You can use a Rarefy node to clear them up post-scattering.

Algorithm-specific properties:

  • Uniformity: (all algorithms) How uniform the output should be. Reduce this to randomly shift each object's position according to the seed value, creating a more natural look. For the "Random Square" and "Random Circle" algorithms this value attempts to maximise the average distance between points by selecting the best sample out of several, which may reduce performance dramatically. It is strongly recommended to use high values of Uniformity when scattering a large amount of objects.


Examples with Uniformity set to 0. Left to right: Linear (centred at (10, 10), lower-left), Uniform Circle, Hexagonal, Random Square. All other settings, including number of objects, are exactly the same as the algorithm comparison above.

  • Range: (all except Linear) The "range" of the spawning area. This is either the length of the square grid, or the diameter of the circle or the hexagon, depending on the algorithm used.


Examples: 36 objects again, different ranges. Top: the Random Square algorithm used in the prior image, Uniformity 0. Bottom: Hexagonal, Uniformity 1. Left to right: Range 10 | 50 | 100 (at Terrain Size 100). Note that some elements in both images in the right-hand column have "spilled" into adjacent chunks and are not currently visible.

  • Offset: (Linear) The X/Z offset of every following element with respect to the previous one. Note that this value corresponds to the magnitude of the offset vector, i.e. its distance from the prior point on both axes.
  • Multiplier: (Linear) A multiplier applied upon the offset for every successive element. Setting this higher to 1 will make distances between elements increase, setting it lower to 1 will make them decrease.


Linear scattering, centred at (0, 0), offset (10, 10), multiplier 1 | 1.2 | 0.9.

  • Min/Max offset: (Linear) The minimum and maximum offsets between elements. If an element's offset from the prior one would fall outside of these bounds, the respective bound will be applied instead. Set either to a negative value to ignore it.
  • Stop if exceeded: If active, prematurely stops the generation process if the minimum or maximum offset has been reached.


Close-up of scattered trees with Multiplier at 0.4. Left: Min offset 2, stop if exceeded set to true. Middle: Min offset 2, stop if exceeded set to false. Right: Min offset -1 (disabled), stop if exceeded set to false. Without a minimum offset, the remaining objects quickly converge into a blob.

Several

3rd April 2019 at 4:03pm
Generators Objects

Added in v0.1

The Several generator places a set of unique outputs in specified positions, similar to several Once generators.

If you need to uniquely scatter a large number of objects, check the Scatter Once generator.

This can be used to easily add unique points of interest to your world, as you may specify points located anywhere in the world. (The ground under these outputs can be masked using a Blob, for an example).

Outputs:

  • Output: A spatial hash with all object locations.

Properties:

  • Space: Whether your ranges are input in world space or terrain space.
    • World: Your units for X/Z are in world space, i.e. regular Unity units. Whuch chunk your object ends up in thus depends on the "Terrain Size" option in your MapMagic configuration.
    • Terrain: Units are in "terrain space", i.e. dependent on the "Resolution" option in your MapMagic configuration.
  • Seed: The seed of the random number generator used to select the point's position in the given range.
  • Min/max X/Z: (per point) The minimum and maximum values of the X and Z units this particular point may be located in.


Example: Exactly three objects placed on a terrain with a size of 100.

Slice

3rd April 2019 at 4:08pm
Generators Map

Added in v0.1

The Slice generator allows you to easily partition an input mask into several masks depending on the input's intensity.


The Slice generator in Weighted and Manual mode respectively.

Inputs:

  • Input: The source mask for partitioning.

Outputs (per slice):

  • Output: The processed mask. Either only ones and zeroes (in Override mode), or zeroes where the slice doesn't exist, and the input itself where it does (in Propagate mode).

Properties:

  • Type: The current slicing type.
    • Weighted: Every slice is assigned an equal chunk of the input map, in order, subject to every slice's individual weight, clamped in [0, 1]. This is a faster and convenient method, but generally less precise;
    • Manual: Allows specific ranges to be defined for every individual slice. Ranges need not overlap, nor "touch", and every range is independent of all other ranges.
  • Output Mode: How every slice is written to its output node. Note that in both cases values outside the slice's range are replaced with zeroes.
    • Override: All values inside the slice's range are replaced by ones, effectively converting the output to a binary mask;
    • Propagate: All values inside the slice's range are propagated as normal, producing a "cut" version of the original input.
  • Weight: (Weighted mode, per slice) The weight of the current slice. Slices with higher weights will occupy a larger part of the [0, 1] range.
  • Min/Max: (Manual mode, per slice) The minimum and maximum values for the range this particular slice will process. Slices are free to overlap in any way you like.


Example: Slicing a cone in half. The outputs shown on the left are in Propagate mode (thus the features of the cone are retained); those on the right are in Override mode (and thus the area they cover is masked with ones).

Stratify

3rd April 2019 at 4:10pm
Generators Objects

Added in v0.1

The Stratify generator partitions a spatial hash (set of positions or objects) according to a set of masks. Essentially, it behaves similar to a Clean Up node, except that it takes several masks at once, and does not have any randomness involved: objects are given to the "strongest" mask beneath their position.

Inputs:

  • Input: The set of all objects to partition.
  • Mask: (per layer) The mask of the respective layer (stratum).

Outputs: (per layer)

  • Output: The set of objects falling within this stratum. Each object is assigned to the stratum with the mask with the highest intensity at its position.


Example: Separating trees based on gradients. Shown on the terrain is the non-inverted gradient mask feeding into Stratum 0. All trees located on points where the inverted mask – Stratum 1 – is stronger than the non-inverted mask are redirected to the second output, and thus to our second prefab, the snow-covered pines.

Varying Objects

3rd April 2019 at 2:46pm
Generators Output

Added in v0.1

The Varying Objects generator builds upon the existing Objects output, exposing the ability to assign a few prefabs per object layer.

This makes diversifying your objects dramatically easier. For trees, see Varying Trees.

NB: This page only examines the new attributes of this generator. Please see the regular Objects documentation for information on those overlapping with it.

Deselect:

Since individual tree layers may take up quite a bit of vertical space, clicking the "Layers:" button (beside the layer selection controls) will deselect the currently selected layer and fold the generator, saving vertical space.

Properties:

  • Prefabs: (per layer) For every object that is to be placed on the terrain, a random non-None prefab from the current layer will be selected. Prefabs can be added, removed, or reordered using the regular array controls found above the prefab list. Layers with 0 prefabs, or all-None prefabs, will be ignored. Set options will apply to all prefabs in the list.


Example: Using two prefabs in a single layer to populate a terrain. The "None" entry is ignored.

Varying Trees

3rd April 2019 at 4:08pm
Generators Output

Added in v0.1

The Varying Trees generator builds upon the existing Trees output, exposing the ability to assign a few prefabs per tree layer, as well as more in-depth options for colour variance.

This makes forest diversification a significantly easier task. For objects, see Varying Objects.

NB: This page only examines the new attributes of this generator. Please see the regular Trees documentation for information on those overlapping with it.

Deselect:

Since individual tree layers may take up quite a bit of vertical space, clicking the "Layers:" button (beside the layer selection controls) will deselect the currently selected layer and fold the generator, saving vertical space.

Properties:

  • Prefabs: (per layer) For every tree that is to be placed on the terrain, a random non-None prefab from the current layer will be selected. Prefabs can be added, removed, or reordered using the regular array controls found above the prefab list. Layers with 0 prefabs, or all-None prefabs, will be ignored.
  • Red/Green/Blue Variance: (per layer) The respective amount of colour variance allowed. Once a prefab is selected for a tree instance, the tree's Colour value will be modified using a random value sampled from 0 to the amount of variance specified in these three fields. For less insane results it is recommended to keep the variance small.

NB: Much like wind effects, colour variance does not appear to work on tree prefabs that have LOD groups attached. This appears to be a limitation of the Unity engine itself.


Example: Using three tree prefabs to populate a small terrain. On the left: White colour and 0/0/0 RGB variance; on the right: same trees, with 1/1/1 colour variance. Using smaller variance values is likely a better choice, unless you're doing something crazy.