From 0e2edbb5d4ce62697b4a9625cdaba63d97fac059 Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Mon, 15 Sep 2008 13:44:58 +0000 Subject: From: mike pitman fixes the terrain spikes, and is the result of mostly a tuning operation on the smooth and flatten tools. I dug in and found that the spikes apparently result from smooth's overly aggressive iteration steps toward the average curvature, which leads to an instability that blows up the heights. I introduced a scaling factor to dampen the 'duration' parameter which tames progress and seems to keep things stable. --- OpenSim/Region/Environment/Modules/World/Terrain/TerrainUtil.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Environment/Modules/World/Terrain/TerrainUtil.cs') diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainUtil.cs b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainUtil.cs index def28eb..797c6a0 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainUtil.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainUtil.cs @@ -34,7 +34,8 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain { public static double MetersToSphericalStrength(double size) { - return Math.Pow(2, size); + //return Math.Pow(2, size); + return (size + 1) * 2.0; // MCP: a more useful brush size range } public static double SphericalFactor(double x, double y, double rx, double ry, double size) -- cgit v1.1