|
@@ -1039,7 +1039,7 @@ let MergeEditor = {
|
|
|
maxLRUPoints : Potree.settings.maxLRUPoints
|
|
maxLRUPoints : Potree.settings.maxLRUPoints
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const maxMemory = 1500 //1500 //M 整体占用内存限制 (不考虑峰值,要等静止后退下来的值) //什么都不加载可能就占了300M
|
|
|
|
|
|
|
+ const maxMemory = Potree.settings.maxMemory || 2000 //1500 //M 整体占用内存限制 (不考虑峰值,要等静止后退下来的值) //什么都不加载可能就占了300M
|
|
|
const eachObjPosWeight = 100/1000/1000 //M 每个顶点pos是3*4个字节?法线3*4和uv2*4 + faceIndex比较难说
|
|
const eachObjPosWeight = 100/1000/1000 //M 每个顶点pos是3*4个字节?法线3*4和uv2*4 + faceIndex比较难说
|
|
|
const eachCloudPointWeight = 70/1000/1000 //M 每个点 pos + 颜色 + 法线 大概 根据测试算出来也是这个值 0.00007
|
|
const eachCloudPointWeight = 70/1000/1000 //M 每个点 pos + 颜色 + 法线 大概 根据测试算出来也是这个值 0.00007
|
|
|
//const eachVisiCPointWeight = eachCloudPointWeight * 5 // 或 maxMemory / (6*1000*1000) 大概值接近 (再除以一个数是因为显示的要比内存中的耗更多资源
|
|
//const eachVisiCPointWeight = eachCloudPointWeight * 5 // 或 maxMemory / (6*1000*1000) 大概值接近 (再除以一个数是因为显示的要比内存中的耗更多资源
|
|
@@ -1117,7 +1117,7 @@ let MergeEditor = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- if(visiRatio1 < visiRatio2 || Potree.lru.numPoints <= Potree.config.pointDensity.low.pointBudget / 10 * 1.1 ){//占比小的需要缩减缓存容器
|
|
|
|
|
|
|
+ if(visiRatio1 < visiRatio2 || Potree.lru.numPoints <= Potree.config.pointDensity.low.pointBudget * 1.1 ){//占比小的需要缩减缓存容器
|
|
|
|
|
|
|
|
if(Potree.settings.tiles3DMaxMemory < tiles3dMemoryUsage / 2 && this.lastMemoryState.tiles3dMemoryUsage == tiles3dMemoryUsage //已经很难减少了,这时候tiles3DMaxMemory很可能降到个位数
|
|
if(Potree.settings.tiles3DMaxMemory < tiles3dMemoryUsage / 2 && this.lastMemoryState.tiles3dMemoryUsage == tiles3dMemoryUsage //已经很难减少了,这时候tiles3DMaxMemory很可能降到个位数
|
|
|
|| Potree.settings.tiles3DMaxMemory < 2){
|
|
|| Potree.settings.tiles3DMaxMemory < 2){
|
|
@@ -1138,10 +1138,10 @@ let MergeEditor = {
|
|
|
resolved = true
|
|
resolved = true
|
|
|
}
|
|
}
|
|
|
}else{
|
|
}else{
|
|
|
- Potree.pointBudget = THREE.Math.clamp(Potree.numVisiblePoints, Potree.config.pointDensity.low.pointBudget / 10, Potree.pointBudget*0.8 )//先往降到可见数量方向降 (当画面中可见点确实很少时允许降低到low之下)
|
|
|
|
|
|
|
+ Potree.pointBudget = THREE.Math.clamp(Potree.numVisiblePoints, Potree.config.pointDensity.low.pointBudget , Potree.pointBudget*0.9 )//先往降到可见数量方向降 (当画面中可见点确实很少时允许降低到low之下)
|
|
|
|
|
|
|
|
Potree.settings.maxLRUPoints = Math.min(Potree.lru.numPoints, Potree.settings.maxLRUPoints);//先降到已使用的数量
|
|
Potree.settings.maxLRUPoints = Math.min(Potree.lru.numPoints, Potree.settings.maxLRUPoints);//先降到已使用的数量
|
|
|
- Potree.settings.maxLRUPoints *= 0.8
|
|
|
|
|
|
|
+ Potree.settings.maxLRUPoints *= 0.9
|
|
|
resolved = true
|
|
resolved = true
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1213,6 +1213,7 @@ let MergeEditor = {
|
|
|
|
|
|
|
|
let mSSE = math.linearClamp(Potree.fpsRendered2, [2, 52], [500, 70]) //有效降低卡顿 和贴图变白概率。越卡越提高msse
|
|
let mSSE = math.linearClamp(Potree.fpsRendered2, [2, 52], [500, 70]) //有效降低卡顿 和贴图变白概率。越卡越提高msse
|
|
|
let r = tiles3dMemoryUsage / Potree.settings.tiles3DMaxMemory
|
|
let r = tiles3dMemoryUsage / Potree.settings.tiles3DMaxMemory
|
|
|
|
|
+ if(tiles3dMemoryUsage == 0 && Potree.settings.tiles3DMaxMemory == 0)r = 0
|
|
|
viewer.setAllTilesets(model=>{
|
|
viewer.setAllTilesets(model=>{
|
|
|
let tileset = model.runtime.getTileset()
|
|
let tileset = model.runtime.getTileset()
|
|
|
tileset.options.initialMaxSSE = mSSE
|
|
tileset.options.initialMaxSSE = mSSE
|