资讯 社区 文档 控制台
技术能力
语音技术
文字识别
人脸与人体
图像技术
语言与知识
视频技术
AR与VR
数据智能
场景方案
部署方案
行业应用
智能教育
智能医疗
智能零售
智能工业
企业服务
智能政务
信息服务
智能园区

灯光

灯光

平行光属于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