From e5be8d01b67e5f30f8dd1c660a4a7a40fb0ade5b Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Tue, 17 Mar 2015 10:36:39 -0700 Subject: [PATCH] tweaks to automatic-LOD adjustments --- interface/src/LODManager.h | 7 +++++-- libraries/octree/src/OctreeConstants.h | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/interface/src/LODManager.h b/interface/src/LODManager.h index b67b9ebc97..9d210a8e5b 100644 --- a/interface/src/LODManager.h +++ b/interface/src/LODManager.h @@ -21,13 +21,16 @@ const float ADJUST_LOD_DOWN_FPS = 40.0; const float ADJUST_LOD_UP_FPS = 55.0; const float DEFAULT_ADJUST_AVATAR_LOD_DOWN_FPS = 30.0f; -const quint64 ADJUST_LOD_DOWN_DELAY = 1000 * 1000 * 5; +const quint64 ADJUST_LOD_DOWN_DELAY = 1000 * 1000 * 0.5; // Consider adjusting LOD down after half a second const quint64 ADJUST_LOD_UP_DELAY = ADJUST_LOD_DOWN_DELAY * 2; const float ADJUST_LOD_DOWN_BY = 0.9f; const float ADJUST_LOD_UP_BY = 1.1f; -const float ADJUST_LOD_MIN_SIZE_SCALE = DEFAULT_OCTREE_SIZE_SCALE * 0.25f; +// This controls how low the auto-adjust LOD will go a value of 1 means it will adjust to a point where you must be 0.25 +// meters away from an object of TREE_SCALE before you can see it (which is effectively completely blind). The default value +// DEFAULT_OCTREE_SIZE_SCALE means you can be 400 meters away from a 1 meter object in order to see it (which is ~20:20 vision). +const float ADJUST_LOD_MIN_SIZE_SCALE = 1.0f; const float ADJUST_LOD_MAX_SIZE_SCALE = DEFAULT_OCTREE_SIZE_SCALE; const float MINIMUM_AVATAR_LOD_DISTANCE_MULTIPLIER = 0.1f; diff --git a/libraries/octree/src/OctreeConstants.h b/libraries/octree/src/OctreeConstants.h index 9300ff98c0..a975469053 100644 --- a/libraries/octree/src/OctreeConstants.h +++ b/libraries/octree/src/OctreeConstants.h @@ -21,6 +21,8 @@ const int TREE_SCALE = 16384; // ~10 miles.. This is the number of meters of t // This controls the LOD. Larger number will make smaller voxels visible at greater distance. const float DEFAULT_OCTREE_SIZE_SCALE = TREE_SCALE * 400.0f; + +// This is used in the LOD Tools to translate between the size scale slider and the values used to set the OctreeSizeScale const float MAX_LOD_SIZE_MULTIPLIER = 2000.0f; const int NUMBER_OF_CHILDREN = 8;