Estimated scene lighting information associated with a captured video frame in an AR session.
估计场景照明信息与ARSession中捕获的视频帧相关联。
Overview
If you render your own overlay graphics for the AR scene, you can use this information in shading algorithms to help make those graphics match the real-world lighting conditions of the scene captured by the camera. (The ARSCNView class automatically uses this information to configure SceneKit lighting.)
概述
如果您为AR场景渲染自己的叠加图形,则可以在着色算法中使用此信息,以帮助使这些图形与相机捕捉的场景的真实照明条件相匹配。 (ARSCNView类自动使用此信息配置SceneKit照明。)
Examining Light Parameters
ambientIntensity
The estimated intensity, in lumens, of ambient light throughout the scene.
整个场景中的环境光线的估计强度(流明)。
Discussion
This value is based on the internal exposure compensation of the camera device, and scaled to be appropriate for use in rendering architectures that use realistic lighting metrics. A value of 1000 represents "neutral" lighting.
For example, you can pass this value directly to the intensity property of a SceneKit ambient light for lighting results that roughly match those of the real-world scene captured by the device camera. (However, passing this value to SceneKit is generally not necessary; the ARSCNView class automatically sets SceneKit lighting based on this value.)
讨论
此值基于相机设备的内部曝光补偿,并且适合用于渲染使用逼真照明度量标准的体系结构。 值为1000代表“中性”照明。
例如,您可以将此值直接传递给SceneKit环境光的强度属性,以获得与设备摄像头拍摄的真实场景大致相同的照明效果。 (但是,将此值传递给SceneKit通常不是必需的; ARSCNView类将根据此值自动设置SceneKit照明。)
ambientColorTemperature
The estimated color temperature, in degrees Kelvin, of ambient light throughout the scene.
估计的整个场景中环境光的色温,单位为开尔文。
Discussion
This value is based on the internal white balance compensation of the camera device, and scaled to be appropriate for use in rendering architectures that use realistic lighting metrics. A value of 6500 represents neutral (pure white) lighting; lower values indicate a "warmer" yellow or orange tint, and higher values indicate a "cooler" blue tint.
For example, you can pass this value directly to the temperature property of a SceneKit ambient light for lighting results that roughly match those of the real-world scene captured by the device camera. (However, passing this value to SceneKit is generally not necessary; the ARSCNView class automatically sets SceneKit lighting based on this value.)
讨论
该值基于相机设备的内部白平衡补偿,并适合用于渲染使用逼真照明度量标准的体系结构。 值为6500代表中性(纯白色)照明; 较低的值表示“较暖”的黄色或橙色色调,较高的值表示“较冷”的蓝色色调。
例如,您可以将此值直接传递给SceneKit环境光的温度属性,以获得与设备相机捕获的真实世界场景大致相同的照明效果。 (但是,将此值传递给SceneKit通常不是必需的; ARSCNView类将根据此值自动设置SceneKit照明。)
Inherits From NSObject