Cesium 加载模型比较暗

Cesium 加载模型比较暗_第1张图片

    let position = Cesium.Cartesian3.fromDegrees(
      104.17401, 30.65793, 10
    );
    const heading = Cesium.Math.toRadians(135);
    const pitch = 0;
    const roll = 0;
    const hpr = new Cesium.HeadingPitchRoll(heading, pitch, roll);
    const orientation = Cesium.Transforms.headingPitchRollQuaternion(
      position,
      hpr
    );
    viewer.entities.add({
      name: "test",
      position: position,
      orientation: orientation,
      model: {
        uri: "./test.gltf",
        minimumPixelSize: 128,
        maximumScale: 20000,
        heightReference: Cesium.HeightReference.RELATIVE_TO_GROUND,
        imageBasedLightingFactor:new Cesium.Cartesian2(4,1)
      },
    });

解决:

Cesium 加载模型比较暗_第2张图片

 通过调整模型的漫反射和高光参数将模型变亮

imageBasedLightingFactor:new Cesium.Cartesian2(4,1)

处理后: 

Cesium 加载模型比较暗_第3张图片

你可能感兴趣的:(Cesium,前端,javascript,开发语言)