장면에서 현실적으로 밝은 가상 객체
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Lighting Estimation API는 가상 객체를 렌더링할 때 다양한 조명 신호를 모방할 수 있는 세부적인 데이터를 제공합니다. ARCore는 다음 세 가지 조명 추정 모드를 지원합니다.
- 사용 중지됨
- 앰비언트 밝기 모드
- 환경 HDR 모드
기본 요건
계속하기 전에 기본 AR 개념과 ARCore 세션을 구성하는 방법을 이해해야 합니다.
조명 추정 사용 설정
앱에서 조명 추정을 사용 설정하려면 다음 단계를 따르세요.
- AR Foundation 프로젝트 또는 ARCore 확장 프로그램 프로젝트를 설정합니다.
- Hierarchy 탭에서 XR Session Origin > AR Camera로 이동합니다.

- AR Camera Manager 구성요소에서 Light Estimation를 선택합니다.
- Light Estimation 드롭다운 메뉴에서 사용할 모드를 선택합니다.

환경 HDR 모드 사용 설정
환경 HDR 모드를 사용하면 다음과 같은 조명 추정 설정을 사용할 수 있습니다.
이 모드는 다음 기준이 충족되면 자동으로 사용 설정됩니다.
대기 모드 밝기 사용 설정하기
기본 조명 추정치는 ARCameraManager
구성요소에서 앰비언트 밝기 모드가 선택되면 자동으로 사용 설정됩니다.
화면 밝기 모드에서는 다음과 같은 조명 추정 설정이 사용 설정됩니다.
올바른 조명 설정을 얻은 후에는 장면의 가상 객체를 실제 세계의 일부인 것처럼 조명할 수 있습니다.
ARCameraManager
구성요소는 조명 추정이 사용 설정된 경우 프레임의 조명 조건을 추정하는 frameReceived
이벤트를 발생시킬 수 있습니다. frameReceived
이벤트의 정보는 ARCameraFrameEventArgs
구조체에 ARLightEstimationData
로 저장됩니다.
런타임에 조명의 매개변수를 변경하려면 다음 단계를 따르세요.
- 장면에서 기존의 직사광선을 만들거나 수정합니다.
Directional Light에 새 스크립트를 연결합니다.
// Sample Lighting Estimation script
Light light;
void Awake ()
{
light = GetComponent<Light>();
}
void OnEnable()
{
if (cameraManager != null)
cameraManager.frameReceived += FrameChanged;
}
void OnDisable()
{
if (cameraManager != null)
cameraManager.frameReceived -= FrameChanged;
}
void FrameChanged(ARCameraFrameEventArgs args)
{
// Modify `light` parameters using ARCameraFrameEventArgs.
}
조명 변화를 감지하도록 이 새 스크립트를 수정합니다. 이 작업을 수행하는 방법의 예는 Unity의 BasicLightEstimation.cs
및 HDRLightEstimation.cs
스크립트를 확인하세요.
장면에서 환경 프로브 사용
장면에서 환경 프로브를 사용 설정하려면 다음 단계를 따르세요.
- 장면의
ARSessionOrigin
에서 자동 배치를 사용 설정합니다.
ARSessionOrigin
에 AREnvironmentProbeManager
구성요소를 추가합니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-14(UTC)
[null,null,["최종 업데이트: 2025-07-14(UTC)"],[[["\u003cp\u003eThe Lighting Estimation API enables virtual objects to realistically reflect real-world lighting conditions within AR experiences.\u003c/p\u003e\n"],["\u003cp\u003eARCore offers three light estimation modes: Disabled, Ambient Intensity, and Environmental HDR, each providing varying levels of lighting detail.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can enable lighting estimation by configuring settings on the AR Camera Manager component within their Unity project.\u003c/p\u003e\n"],["\u003cp\u003eTo utilize lighting data, developers can access light estimation information through the ARCameraManager's frameReceived event and apply it to virtual objects in the scene.\u003c/p\u003e\n"],["\u003cp\u003eEnvironment probes can be enabled to further enhance lighting realism by capturing and applying environmental reflections to virtual objects.\u003c/p\u003e\n"]]],[],null,["# Realistically light virtual objects in a scene\n\nThe [Lighting Estimation API](/ar/develop/unity-arf/lighting-estimation/introduction) provides detailed data that lets you mimic various lighting cues when rendering virtual objects. ARCore supports three light estimation modes:\n\n1. Disabled\n2. [Ambient Intensity mode](/ar/develop/unity-arf/lighting-estimation/introduction#ambient_intensity_mode)\n3. [Environmental HDR mode](/ar/develop/unity-arf/lighting-estimation/introduction#environmental_hdr_mode)\n\nPrerequisites\n-------------\n\nMake sure that you understand [fundamental AR concepts](/ar/develop/fundamentals)\nand how to [configure an ARCore session](/ar/develop/unity-arf/session-config) before proceeding.\n\nEnable Lighting Estimation\n--------------------------\n\nFollow these steps to enable lighting estimation in your app.\n\n1. Set up an [AR Foundation project](/ar/develop/unity-arf/getting-started-ar-foundation) or [ARCore Extensions project](/ar/develop/unity-arf/getting-started-extensions).\n2. In the **Hierarchy** tab, navigate to **XR Session Origin \\\u003e AR Camera**.\n\n1. Under the **AR Camera Manager** component, select **Light Estimation**.\n2. In the **Light Estimation** drop-down menu, select the mode(s) you wish to use.\n\n### Enable Environmental HDR mode\n\n[Environmental HDR mode](/ar/develop/unity-arf/lighting-estimation/introduction#environmental_hdr_mode) enables the following light estimation settings:\n\n- [Main Light Direction](/ar/develop/lighting-estimation#main-directional-light)\n- Main Light Intensity\n- [Ambient Spherical Harmonics](/ar/develop/unity-arf/lighting-estimation/introduction#ambient_spherical_harmonics)\n\nThis mode is automatically enabled when the following criteria are met:\n\n- Ambient Spherical Harmonics, Main Light Direction, and/or Main Light Intensity are selected in the Light Estimation mode provided by the [AR Camera manager](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/manual/#ar-camera-manager)\n- [Environment probes](/ar/develop/unity-arf/lighting-estimation/introduction#environment_probes) are enabled in an [`AREnvironmentProbeManager`](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/manual/environment-probe-manager.html)\n- A compatible [camera configuration](/ar/develop/unity-arf/camera-configs) is selected\n\n### Enable Ambient Intensity mode\n\nBasic light estimation is automatically enabled when [Ambient Intensity mode](/ar/develop/unity-arf/lighting-estimation/introduction#ambient_intensity_mode) is selected in the [`ARCameraManager`](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/manual/#ar-camera-manager) component.\n\nAmbient Intensity mode enables the following light estimation settings:\n\n- Ambient Color\n- Ambient Intensity\n\nUse lighting information in your scene\n--------------------------------------\n\nOnce you have obtained the correct lighting settings, you can light the virtual objects in your scene as if they were a part of the real world.\n\nThe [`ARCameraManager`](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.ARCameraManager.html) component can raise a [`frameReceived`](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.ARCameraManager.html#events) event that estimates frames' lighting conditions when lighting estimation is enabled. Information from [`frameReceived`](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.ARCameraManager.html#events) events are stored in [`ARCameraFrameEventArgs`](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.ARCameraFrameEventArgs.html) structs as [`ARLightEstimationData`](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.ARLightEstimationData.html).\n\nFollow these steps to change a light's parameters at runtime.\n\n1. Create or modify the existing Directional Light in your scene.\n2. Attach a new script to the Directional Light.\n\n // Sample Lighting Estimation script\n\n Light light;\n void Awake ()\n {\n light = GetComponent\u003cLight\u003e();\n }\n\n void OnEnable()\n {\n if (cameraManager != null)\n cameraManager.frameReceived += FrameChanged;\n }\n\n void OnDisable()\n {\n if (cameraManager != null)\n cameraManager.frameReceived -= FrameChanged;\n }\n\n void FrameChanged(ARCameraFrameEventArgs args)\n {\n // Modify `light` parameters using ARCameraFrameEventArgs.\n }\n\n3. Modify this new script to detect changes in lighting. For examples of how to do this, check out Unity's [`BasicLightEstimation.cs`](https://github.com/Unity-Technologies/arfoundation-samples/blob/main/Assets/Scripts/BasicLightEstimation.cs) and [`HDRLightEstimation.cs`](https://github.com/Unity-Technologies/arfoundation-samples/blob/main/Assets/Scripts/HDRLightEstimation.cs) scripts.\n\n### Use environment probes in your scene\n\nFollow these steps to enable [environment probes](/ar/develop/unity-arf/lighting-estimation/introduction#environment_probes) in your scene.\n\n1. Enable automatic placement in your scene's [`ARSessionOrigin`](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.ARSessionOrigin.html).\n2. Add an [`AREnvironmentProbeManager`](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/manual/environment-probe-manager.html) component to the [`ARSessionOrigin`](https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@4.2/api/UnityEngine.XR.ARFoundation.ARSessionOrigin.html)."]]