• Parameter Setting

    broken image

    Most ConvertToDotsTerrainGrid scripts have default settings, and you can adjust them to do what you expect.

    TerrainData

    TerrainSet up the terrain objects that you need to convert.You do not need to set this value if the script is added directly to the terrain object in the scene。

    Material Template:

    MaterialForLayer4::Use this material as a material template for the terrain grid when the terrain layer is less than or equal to 4 layers.Runtime terrain uses a clone of this material.

    MaterialForLayer8:Use when the terrain layer number is greater than 4。

    MeshSetting:

    MeshResolution:Set the size of the terrain mesh.The terrain grid is always a square, where the number of vertices per edge is MeshResolution + 1.

    GenerateSkirts:Sets whether a skirt edge is generated.Skirt edges are used to eliminate cracks between different lod grids.Advice is always on。

    Collider Generation:

    Collide Vert Pixel Distance:This parameter determines the grid size of the collider.When set to 1, the collider is generated pixel by pixel according to the height map data, and when set to 2, the collider generates an edge of a grid per two pixels.Note that small values causes a large memory footprint and reduced runtime efficiency, but too large values ignore the details of the terrain。

    Generated Collider Distance:Collider with a mesh with a primary camera distance less than this value is created.The collider is generated by job to prepare the data, which usually takes several frames or more than ten frames。

    Destroy Collider Distance:The collider with the main camera distance above this value is destroyed。

    Check Collider Distance:The primary camera moves above this value and checks if the collider needs to be generated or destroyed。

    Complete Generation When First Init:When turned on, the system ensures that all rule-compliant colliders are created in the first frame of operation.This option only works for the first initialization, for runtime dynamic creation, this setting does not work。

    CollisionFliter:Set Unity Physics collision fliter value.

    LodSetting:

    Lod Distance0:Set the distance from Lod0 to Lod3

    Lod Distance1:Set the distance from Lod4 to Lod7

    Adjacent grid Resolution values are always half of the upper level, meaning that some large-distance Lod values are invalid because there is no grid at this level.The maximum level is 8.

    Other:

    Save Terrain Control Textures:Opening this option saves the initial data of the terrain as a png file when converting the terrain.Including:

    Height normal Map: The RGB channel saves the Normal data, and the channel A saves the height data.If the height is modified at runtime, the normals of the vertices of the changed height are recalculated.

    Alpha Map: The four channels of RGBA each save the sampling weight of a terrain layer

    Paint Map: The RGB channel is the graffiti data, and the channel A is the terrain raw hole data.Note that this option only takes effect when converting the terrain to grids.Runtime modifications are not count.If you need to save or read runtime modification results, save or read height normal map and PaintMap directly.

    NotUseTranslationComponent:Given that the terrain does not need to move most of the time, there is no need to consider attributes such as translation rotation scale.

    Not Use Dots Physics:Selection provided for you when you do not want to use Dot s Physics.