import gltf model but it's too dark.

1. A concise explanation of the problem you’re experiencing.

I’v import a gltf model into my cesium map, and put it high above the earth, it became nearly black when it’s on the opposite side of the sun.

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

var plane = scene.primitives.add(Cesium.Model.fromGltf({

url: “/gltf/red_baron/scene.gltf”,

modelMatrix: Cesium.Transforms.headingPitchRollToFixedFrame(position, hpRoll, Cesium.Ellipsoid.WGS84, fixedFrameTransform),

minimumPixelPriceSize: 128,

castShadows: false,

receiveShadows: false,

scale: 600

}));

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

I need to make some fly machine like a satelite, and I want the part in my view is always in light.

4. The Cesium version you’re using, your operating system and browser.

Cesium 1.40

Hi there,

We have an issue in GitHub opened for tracking this issue here. I’ve bumped that thread with this report. Your model file may be corrupt, try reconverting.

Additionally, you can make sure you are not enabling shadows when you create the Viewer.

Thanks,

Gabby

I tried set shadows to false when create Viewer, but it doesn’t help.
I also tried disable model shadow

var plane = scene.primitives.add(Cesium.Model.fromGltf({

url: “/gltf/red_baron/scene.gltf”,

modelMatrix: Cesium.Transforms.headingPitchRollToFixedFrame(position, hpRoll, Cesium.Ellipsoid.WGS84, fixedFrameTransform),

minimumPixelPriceSize: 128,

shadows: Cesium.ShadowMode.DISABLED,

scale: 600

}));

but still not working.

The gltf file should fine, I used an online gltf viewer to render the same file, and it looks good.

And in my case, the model is not always dark, the model is a plane which circles the earth, when it goes to the confront side to the sun, it become a little brighter and I can see its color (although not as colorful as in the online gltf render), and it become nearly a mess of dark when it goes to the opposite side.

I guess this is normal since no sun shine it become dark, which also applied to the surface of the earth, But I simply don’t want it works like that, I need all place is on shining.

my view creation code:

var viewer = new Cesium.Viewer(‘galaxy’, {

//scene3DOnly: true,

selectionIndicator: false,

baseLayerPicker: true,

animation: false,

timeline: false,

infoBox: false,

geocoder: false,

shadows: false,

imageProvider: new Cesium.BingMapsImageryProvider({

url: ‘https://dev.virtualearth.net’,

mapStyle: Cesium.BingMapsStyle.CANVAS_LIGHT // Can also use Cesium.BingMapsStyle.ROAD

})

});

viewer.scene.globe.enableLighting = false;

Thank you for all the help

I see. Someone ran into a similar problem with lighting on their model in this thread. Solutions there include increasing the ambient light on your model, and removing any lights from a model before converting to glTF. Hopefully one of those solutions work!

The issue at #3737 has just been closed and may resolve your issue. Look for the change in Cesium 1.45 on May 1, or get it now in the master branch on GitHub https://github.com/AnalyticalGraphicsInc/cesium.