Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
1.0.0:terrain [2023/02/23 16:31] – [DesignTime] admin1.0.0:terrain [2023/02/23 16:47] (current) – [Configuration] admin
Line 25: Line 25:
  
 {{:1.0.0:g3d-ide-terrain.jpg?nolink|}} {{:1.0.0:g3d-ide-terrain.jpg?nolink|}}
 +
 +Choose one of the "Random Terrain <ALGORITHM>" options.
 +
 +After you have clicked, you need to click into the viewport in your form to refresh rendering.
 +
 +==== Planting ====
 +
 +The framework brings you a great feature called "Planting" to the terrain component.
 +
 +After you have loaded a terrain from heightmap or by procedural generation, you can use this functionality.
 +
 +{{:1.0.0:g3d-ide-planting-1.jpg?nolink|}}
 +
 +It will need another TGorillaModel component as template and will perform an instancing onto the selected terrain.
 +
 +This means all instances will automatically be adjusted to the shape of the terrain.
 +
 +When clicking the "Planting" option a new dialog will open where you can configure some settings for the planting algorithm.
 +
 +{{:1.0.0:g3d-ide-planting-2.jpg?nolink|}}
 +
 +=== Configuration ===
 +
 +The algorithm will create instances for all meshes inside the selected template / source model.
 +
 +Basically the algorithm splits the terrain into cells for more realistic placement.
 +
 +^Setting ^ Description ^
 +|Clear Instances | Clears all previously available instances in the source. |
 +|Minimum Scale | If "Random Scaling" is activated, this is the lowest limit for scaling.|
 +|Instance Scale | A basis scaling of each instance (will be multiplied with source scale if "Apply Source Transformation" is activated.|
 +|Space | Adjustment between cell-center and source size. |
 +|Padding | Increasing this value will compress cells for planting. Objects will be placed closer together.|
 +|Random Y-Rotation | This is not suitable for all kind of source models. Depending on the internal transformation of submeshes. |
 +|Random Scaling |This will randomly scale instances with limitations given by "Minimum Scale".|
 +|Apply Random Grid-Offset|Terrain is splitted into equal size grid cells. To produce a more realistic look, you can add some random offset to the cell-center.|
 +|Apply Source Transformation|It will apply the transformation of the owner model. This is not suitable for all kind of models, depending on the internal transformation of submeshes.|
 +|Count |The number of instances that should be created. This should be adjusted to the GPU you are using and the outcome you expect.|
 +
 +=== Source Models ===
 +
 +The planting algorithm is straight forward and treats all submeshes inside the source model equaly on creating instances.
 +
 +Therefore it can produce unexpected results.
 +
 +The source model should contain a flat hierarchy without or less transformation of sub-meshes.
 +
 +__NOTICE:__ The applied instance transformation is absolute and not relative to the source model!
 ===== Runtime ===== ===== Runtime =====