From d17f183bac520ad1a65e1619d1957549921db4ca Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Thu, 14 Jul 2022 11:08:24 -0700 Subject: [PATCH] le epic --- NewHorizons/External/Modules/HeightMapModule.cs | 6 +++--- NewHorizons/Handlers/PlanetCreationHandler.cs | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/NewHorizons/External/Modules/HeightMapModule.cs b/NewHorizons/External/Modules/HeightMapModule.cs index 5d2a1c5d..d457868a 100644 --- a/NewHorizons/External/Modules/HeightMapModule.cs +++ b/NewHorizons/External/Modules/HeightMapModule.cs @@ -38,8 +38,8 @@ namespace NewHorizons.External.Modules /// Higher values means more detail but also more memory/cpu/gpu usage. /// This value will be 1:1 with the heightmap texture width, but only at the equator. /// - [Range(50, 2000)] - [DefaultValue(200)] - public int resolution = 200; + [Range(1 * 4, 500 * 4)] + [DefaultValue(50 * 4)] + public int resolution = 50 * 4; } } \ No newline at end of file diff --git a/NewHorizons/Handlers/PlanetCreationHandler.cs b/NewHorizons/Handlers/PlanetCreationHandler.cs index 47ee251b..c74494bf 100644 --- a/NewHorizons/Handlers/PlanetCreationHandler.cs +++ b/NewHorizons/Handlers/PlanetCreationHandler.cs @@ -466,7 +466,9 @@ namespace NewHorizons.Handlers if (body.Config.HeightMap != null) { - var res = (int)(body.Config.HeightMap.resolution / 4); + // resolution = tris per face + // divide by 4 to account for all the way around the equator + var res = body.Config.HeightMap.resolution / 4; HeightMapBuilder.Make(go, sector, body.Config.HeightMap, body.Mod, res); }