灯光
所有文档

          AR开放平台

          灯光

          平行光属于AR场景开发的标配光线,建议在项目的场景配置(json)文件中添加平行光节点。

          环境光、聚光、点光、半球光用于高级材质的辅助光线,可通过搭配增强效果真实度。

          平行光

          {
              "name": "directLight",
              "type": "directLight",
              "chirlden": [],
              "lightNodeSuppl":
              {
                  "color": "255.0,255.0,255.0",
                  "intensity": 1.0,
                  "direction": "0, -1, -2",
                  "enableShadow": 1
              }
          }

          环境光

          {
              "name": "ambientLight",
              "type": "ambientLight",
              "chirlden": [],
              "lightNodeSuppl":
              {
                  "color": "255,255,255",
                  "intensity": 1
              }
          }

          聚光

          {
              "name": "spotLightUp",
              "type": "spotLight",
              "visible": 1,
              "position": "0,0,500",
              "scale": "5,5,5",
              "rotation": "0,0,0",
              "chirlden": [],
              "lightNodeSuppl":
              {
                  "color": "255,255,255",
                  "direction": "0,0,-1",
                  "distance": 17000,
                  "intensity": 2.5,
                  "decay": 0,
                  "angel": 30,
                  "penumbra": 1
              }
          }

          点光

          {
              "name": "pointLight",
              "type": "pointLight",
              "position": "0,10000,10000",
              "chirlden": [],
              "lightNodeSuppl":
              {
                  "color": "255,255,255",
                  "intensity": 1,
                  "distance": 70000,
                  "decay": 0,
                  "enableShadow": 1
              }
           }

          半球光

          {
              "name": "hemisphereLight",
              "type": "hemisphereLight",
              "chirlden": [],
              "lightNodeSuppl":
              {
                  "skyColor": "0,0,0",
                  "groundColor": "255,255,255",
                  "intensity": 1,
                  "direction": "0,-1,0"
              }
           }
          上一篇
          3D模型渲染
          下一篇
          camera