public void GenerateTerrainAfterErosion()
 {
     // this can be parallelized
     TerrainInfo._Terrain.terrainData.SetHeights(0, 0, TerrainInfo.HeightMap);
     TerrainInfo.TemperatureMap = NoiseGeneration.GenerateTemperatureMap(TerrainInfo.TerrainWidth, TerrainInfo.TerrainHeight, TerrainInfo.HeightMap, TerrainInfo);
     TerrainInfo.MoistureMap    = NoiseGeneration.GenerateMoistureMap(TerrainInfo.TerrainWidth, TerrainInfo.TerrainHeight, TerrainInfo.HeightMap);
 }
Example #2
0
 // A lot of stuff can be paralelized, stuff is decoupled for clarity when developing, in the end will be re-facced so shit that can get run paralel will
 public void GenerateTerrainOnDemand()
 {
     TerrainInfo.HeightMap = NoiseGeneration.GenerateTerrain(TerrainInfo);
     TerrainInfo._Terrain.terrainData.SetHeights(0, 0, TerrainInfo.HeightMap);
     TerrainInfo.TemperatureMap = NoiseGeneration.GenerateTemperatureMap(TerrainInfo.TerrainWidth, TerrainInfo.TerrainHeight, TerrainInfo.HeightMap);
     TerrainInfo.MoistureMap    = NoiseGeneration.GenerateMoistureMap(TerrainInfo.TerrainWidth, TerrainInfo.TerrainHeight, TerrainInfo.HeightMap);
     ApplyErosion();
     AssignSplatMap.DoSplat(TerrainInfo);
     TerrainInfo.BiomeMap = BiomeGeneration.GenerateBiomeMap(TerrainInfo);
     ContentManager.InitializeBiomePlacementObjects(TerrainInfo);
     ContentGenerator.GenerateBiomeContent(TerrainInfo);
 }
 // A lot of stuff can be paralelized, stuff is decoupled for clarity when developing, in the end will be re-facced so shit that can get run paralel will
 public void GenerateTerrainOnDemand(bool onlyUseTerrainParameteters = false)
 {
     TerrainInfo.HeightMap = NoiseGeneration.GenerateTerrain(TerrainInfo);
     TerrainInfo._Terrain.terrainData.SetHeights(0, 0, TerrainInfo.HeightMap);
     if (TerrainInfo.GenerateTerrain)
     {
         TerrainInfo.TemperatureMap = NoiseGeneration.GenerateTemperatureMap(TerrainInfo.TerrainWidth, TerrainInfo.TerrainHeight, TerrainInfo.HeightMap, TerrainInfo);
         TerrainInfo.MoistureMap    = NoiseGeneration.GenerateMoistureMap(TerrainInfo.TerrainWidth, TerrainInfo.TerrainHeight, TerrainInfo.HeightMap);
     }
     if (!onlyUseTerrainParameteters)
     {
         ApplyErosion();
         TerrainInfo.BiomeMap = BiomeGeneration.GenerateBiomeMap(TerrainInfo);
         var RoadList = RoadGenerator.GenerateRoad(TerrainInfo, SplineScript);
         AssignSplatMap.DoSplat(TerrainInfo);
         ContentManager.InitializeBiomePlacementObjects(TerrainInfo);
         ContentGenerator.PlaceHousesNearRoads(RoadList, TerrainInfo, ContentManager.GetParentContentObject());
         ContentGenerator.GenerateBiomeContent(TerrainInfo);
     }
 }