【问题标题】:Cesium Earth entity path quality铯地球实体路径质量
【发布时间】:2019-02-05 04:52:29
【问题描述】:

我使用Cesium Earth 库开发了一个应用程序。

问题是,绘制的线(实体路径)质量非常低,不平滑。如何让它变得更好?

  viewer = new Cesium.Viewer('cesiumContainer', {
    imageryProvider: false,
    shadows:true,
    skyAtmosphere: false,
    geocoder: false,
    shouldAnimate:true,
    clockViewModel: new Cesium.ClockViewModel(clock),
    imageryProviderViewModels: imageryViewModels,
    requestRenderMode : true
  });

entity[i] = viewer.entities.add({              
            path:{
               leadTime:leadTime,
               trailTime:trailTime,
               width:1.5,
               material: color,
               resolution:10
            }
});

satellite[id].position.setInterpolationOptions({
         interpolationDegree : 10,
         interpolationAlgorithm : Cesium.HermitePolynomialApproximation 
});

【问题讨论】:

  • 颜色看起来有点暗,可以试试黄色或青色或更亮的颜色吗?除了颜色深,还有其他质量问题吗?
  • @emackey 是的,问题是线条不流畅。看起来,我必须增加像素数量?
  • @ChrisCousins 无论如何,我需要 Cesium 库的解决方案
  • 你能贴出你实例化你的铯地球场景的代码吗?

标签: javascript cesium


【解决方案1】:

考虑为您的视图添加一个抗锯齿通道,并可能使您的容器 div 的尺寸成为屏幕上实际尺寸的两倍(使用 CSS 将其缩放到一半)。我也有类似的场景,不过是在three.js中,这里:https://ccnmtl.github.io/astro-interactives/sun-motion-simulator/源码在这里:https://github.com/ccnmtl/astro-interactives/blob/master/sun-motion-simulator/src/HorizonView.jsx

【讨论】:

  • 但是现在在 Cesium 中有 antialias:true 选项,就像你做的那样
  • 我发现 WebGL 中的 antialias 选项不可靠。如three.js 中所述,它仅适用于Chrome,不适用于Firefox。但是在我的系统(Chrome/Linux)上,我看不到它对视图有任何影响,在 three.js、pixi.js 或我猜是 Cesium 中。
  • 那你有什么建议?
  • FXAA内置于Cesium中,默认为viewer.scene.postProcessStages.fxaa.enabled,默认为true
  • @emackey 如果默认启用,为什么线条不平滑?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2021-09-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-05-18
  • 1970-01-01
相关资源
最近更新 更多