【发布时间】:2018-06-11 12:56:04
【问题描述】:
在 Forge Viewer 中,远近计算是在内部 updateCameraMatrices 方法中完成的。在该方法中,有一个最终的启发式方法可以更好地微调第 31320 行附近的近值:
// One more attempt to improve the near plane: make it 1/100,000 of the distance of the
// far plane, if that's higher.
// See https://wiki.autodesk.com/display/LMVCORE/Z-Buffer+Fighting for reasoning.
// 1e-4 is generally good below, but inside Silver Cross we get a lot of near clipping. So, 1e-5.
dMin = Math.max(dMin, dMax * 1e-5);
在我在查看器中加载的一些 BIM 模型中,我可以看到某些视角的 Z-fighting。如果我按照 cmets 中的说明将值从 1e-5 (1/100,000) 更改为 1e-4 (1/10,000),z-fighting 就消失了。 对于大型模型(如建筑物),这似乎也是一个更合适的值。它可能不太适合 3D CAD 模型等小规模模型。
如果我打算渲染的只是建筑规模的模型(来自 Revit、Navisworks 等),我可以安全地将此值更改为 1e-4 吗?
Forge Viewer 是否允许在其 API 中配置近/远计算?
【问题讨论】:
标签: autodesk-forge