当前位置:网站首页>Cesium (4): the reason why gltf model is very dark after loading

Cesium (4): the reason why gltf model is very dark after loading

2022-07-07 16:29:00 Touch

1. edition

cesium 1.82.1


2. Effect of closing time on model brightness

viewer.scene.light = new Cesium.DirectionalLight({ 
  direction: new Cesium.Cartesian3(0.354925, -0.890918, -0.283358)
})

3. see gltf Model file

1、gltf The model file is opened with text , Open and view materials node , Take one of them as an example .

{
    "doubleSided" : true,
    "name" : "Material #2145370080",
    "pbrMetallicRoughness" : {
        "baseColorTexture" : {
            "index" : 9
        },
    "metallicFactor" : 0,
    "roughnessFactor" : 0.858578622341156
    }
},

among :

pbrMetallicRoughness: Specified based on metallic-roughness Material properties of the model ( Material properties that are not explicitly assigned will use the default values of the properties );

baseColorFactor: Including red , green , Blue and alpha composition , Constitute the basic color of the material ( The setting here is bright orange ).

metallicFactor: Used to specify the similarity between the reflection of the material and the metal .

roughnessFactor: Used to specify material roughness .

2、 Check materials Whether the material of the node has metallicFactor attribute ,metallicFactor The value of the 0-1 Between , The bigger the value is. , The darker the model .

原网站

版权声明
本文为[Touch]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202130608456856.html