RealWorldTerrainPrefsBase.Terrain.cs 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. /* INFINITY CODE */
  2. /* https://infinity-code.com */
  3. using UnityEngine;
  4. namespace InfinityCode.RealWorldTerrain
  5. {
  6. public partial class RealWorldTerrainPrefsBase
  7. {
  8. /// <summary>
  9. /// If disabled terrains will have zero Y at minimum elevation. <br/>
  10. /// If enabled, terrains will have zero Y on the water line(zero elevation).
  11. /// </summary>
  12. public bool alignWaterLine;
  13. public Vector2 autoDetectElevationOffset = new Vector2(100, 100);
  14. /// <summary>
  15. /// Resolution of the base map used for rendering far patches on the terrain.
  16. /// </summary>
  17. public int baseMapResolution = 1024;
  18. /// <summary>
  19. /// Flag indicating that the zero is used as unknown value.
  20. /// </summary>
  21. public bool bingMapsUseZeroAsUnknown;
  22. /// <summary>
  23. /// Resolution of control texture.
  24. /// </summary>
  25. public int controlTextureResolution = 512;
  26. /// <summary>
  27. /// Escarpment of the seabed. Greater value - steeper slope.
  28. /// </summary>
  29. public float depthSharpness = 0;
  30. /// <summary>
  31. /// The resolution of the map that controls grass and detail meshes.<br/>
  32. /// For performance reasons (to save on draw calls) the lower you set this number the better.
  33. /// </summary>
  34. public int detailResolution = 2048;
  35. /// <summary>
  36. /// Elevation provider
  37. /// </summary>
  38. public RealWorldTerrainElevationProvider elevationProvider = RealWorldTerrainElevationProvider.SRTM;
  39. public RealWorldTerrainElevationRange elevationRange = RealWorldTerrainElevationRange.autoDetect;
  40. public RealWorldTerrainElevationType elevationType = RealWorldTerrainElevationType.realWorld;
  41. /// <summary>
  42. /// The fixed size of terrain.<br/>
  43. /// X - Terrain Width<br/>
  44. /// Y - Terrain Height<br/>
  45. /// Z - Terrain Length
  46. /// </summary>
  47. public Vector3 fixedTerrainSize = new Vector3(500, 600, 500);
  48. /// <summary>
  49. /// The resolution of GAIA stamp
  50. /// </summary>
  51. public int gaiaStampResolution = 1024;
  52. /// <summary>
  53. /// Generate unknown underwater areas based on known data
  54. /// </summary>
  55. public bool generateUnderWater;
  56. /// <summary>
  57. /// The HeightMap resolution for each Terrain.
  58. /// </summary>
  59. public int heightmapResolution = 129;
  60. /// <summary>
  61. /// Errors of SRTM should be ignored?
  62. /// </summary>
  63. public bool ignoreSRTMErrors;
  64. public float fixedMaxElevation = 1000;
  65. public float fixedMinElevation = 0;
  66. /// <summary>
  67. /// Type of max elevation value.
  68. /// </summary>
  69. public RealWorldTerrainMaxElevation maxElevationType = RealWorldTerrainMaxElevation.autoDetect;
  70. /// <summary>
  71. /// Elevation value when there is no data.
  72. /// </summary>
  73. public short nodataValue;
  74. /// <summary>
  75. /// The order of bytes in a RAW file.
  76. /// </summary>
  77. public RealWorldTerrainByteOrder rawByteOrder = RealWorldTerrainByteOrder.Windows;
  78. /// <summary>
  79. /// Filename of RAW result
  80. /// </summary>
  81. public string rawFilename = "terrain";
  82. /// <summary>
  83. /// Height of RAW result
  84. /// </summary>
  85. public int rawHeight = 1024;
  86. /// <summary>
  87. /// Width of RAW result
  88. /// </summary>
  89. public int rawWidth = 1024;
  90. /// <summary>
  91. /// Type of RAW result
  92. /// </summary>
  93. public RealWorldTerrainRawType rawType = RealWorldTerrainRawType.RAW;
  94. /// <summary>
  95. /// Specifies the size in pixels of each individually rendered detail patch. <br/>
  96. /// A larger number reduces draw calls, but might increase triangle count since detail patches are culled on a per batch basis. <br/>
  97. /// A recommended value is 16. <br/>
  98. /// If you use a very large detail object distance and your grass is very sparse, it makes sense to increase the value.
  99. /// </summary>
  100. public int resolutionPerPatch = 16;
  101. /// <summary>
  102. /// Type of result (terrain, mesh).
  103. /// </summary>
  104. public RealWorldTerrainResultType resultType = RealWorldTerrainResultType.terrain;
  105. /// <summary>
  106. /// Specifies whether the projection will be determined by the size of the area.<br/>
  107. /// 0 - Real world sizes.<br/>
  108. /// 1 - Mercator sizes.<br/>
  109. /// 2 - Fixed size.
  110. /// </summary>
  111. public int sizeType = 0;
  112. /// <summary>
  113. /// Scale of terrains.
  114. /// </summary>
  115. public Vector3 terrainScale = Vector3.one;
  116. public Texture2D waterDetectionTexture;
  117. }
  118. }