Terrain To Mesh
  • Terrain To Mesh
  • Quick Start
  • Editor Window Settings
    • Mesh
    • Material
    • Objects
    • Save
  • Update Splatmap Shader
  • Run-time API
    • TerrainToMesh
      • ExportMesh
      • ExportTerrainLayers
      • ExportSplatmapMaterial
      • ExportSplatmapTextures
      • HasHoles
      • ExportHolesmapTexture
      • ExportBasemapDiffuseTexture
      • ExportBasemapNormalTexture
      • ExportBasemapMaskTexture
      • ExportBasemapOcclusionTexture
      • ExportGrassTextures
      • ExportGrassAtlasTexture
      • HasPrototypes
      • CountPrototypes
      • ExportPrototypes
    • TerrainToMeshUtilities
      • GenerateGrassMesh
      • GenerateEdgeFallTexture
      • ConvertMeshToOBJ
      • ConvertMeshToOBJAndSaveToFile
      • ConvertMeshToOBJAndAppendToFile
      • GetDefaultMaterial
      • GetDefaultShader
      • GetDefaultShaderProperty
      • SetupDefaultMaterial
      • SetupAlphaCutoutForDefaultMaterial
      • ConvertPrototypesToTreeGameObjects
      • ConvertPrototypesToGrassGameObjects
      • ConvertPrototypesToGrassMeshes
      • ConvertPrototypesToDetailMeshGameObjects
      • ConvertPrototypesToDetailMeshes
      • CalculateExportedMeshVertexCount
      • SetMeshPivotPoint
    • TerrainToMeshEdgeFall
    • TerrainToMeshPrototype
    • TerrainToMeshConversionDetails
  • Help & Contact
Powered by GitBook
On this page
PreviousTerrainToMeshUtilitiesNextGenerateEdgeFallTexture

Last updated 1 month ago

Generate Grass Mesh

Mesh GenerateGrassMesh(int sides = 1, float distortion = 0)

Creates grass Quad mesh.

sides - By default generated grass mesh uses Quad mesh with one side. This option allows using mesh with multiple sides:

distortion - If using multi-sided grass mesh, instead of placing each quad inside symmetrical center, this setting adds a little offset to the quads position:

Grass mesh with 1, 2, and 3 sides. Max is 12 sides.
Grass mesh with 4 sides and distortion value of 0, 0.5 and 1