본문 바로가기
유니티 엔진

Unity 3.5 신기능 : Light Probes

by 대마왕J 2012. 1. 31.

Light Probes 라이트 프로브

Although lightmapping adds greatly to the realism of a scene, it has the disadvantage that non-static objects in the scene are less realistically rendered and can look disconnected as a result. It isn't possible to calculate lightmapping for moving objects in real time but it is possible to get a similar effect using light probes. The idea is that the lighting is sampled at strategic points in the scene, denoted by the positions of the probes. The lighting at any position can then be approximated by interpolating between the samples taken by the nearest probes.

라이트맵이 굉장한 리얼리티를 씬에 주고 있더라도, 이것은 정적이지 않은 오브젝트가 씬에 있을 때에는 오히려 낮은 리얼리티를 주고 결과물과 동떨어져 보이는 결과를 주는 단점이 습니다.
움직이고 있는 오브젝트를 리얼타임으로 라이트맵을 계산하는 것은 불가능하지만, 라이트 프랍을 이용하면 비슷한 효과는 낼 수 있습니다.
이 아이디어는 라이팅을 씬에 있는 고정된 포인트에 샘플링해 놓고, 이것을 프로브 포지션에 기록해 놓는 것입니다. 어느 지점의 라이트라도 가까운 프로브에 샘플링된 라이트 값으로 인터폴레이션 (주: 보간을 의미함)  되어서 대충 계산됩니다.
 
The interpolation is fast enough to be used during gameplay and helps avoid the disconnection between the lighting of moving objects and static lightmapped objects in the scene.

이 인터폴레이션(보간)은 게임 플레이 중간에 실시간으로 돌려도 될만큼 빠르며 라이트맵된 배경과 움직이는 오브젝트간의 라이팅의 단절을 피하는데 도움을 줍니다.

Adding Light probes 라이트 프로브 설치하기

The Light Probe Group component (menu: Component > Miscellaneous > Light Probe Group) can be added to any available object in the scene. The inspector can be used to add new probes to the group. The probes appear in the scene as yellow spheres which can be positioned in the same manner as GameObjects. Selected probes can also be duplicated with the usual keyboard shortcut (ctrl+d/cmd+d).
라이트 프로브 그룹 컴포넌트   (menu: Component > Miscellaneous > Light Probe Group) 는 씬에 있는 어느 오브젝트에다가라도 붙여질 수 있습니다. 인스팩터에서는 그룹에 새 프로브를 설치할 수 있습니다. 프로브는 씬에 노란 공으로 나타나며 이 위치는 게임오브젝트와 동일한 방법으로 위치시킬 수 있습니다. 키보드의 단축키로 복사하는 것도 가능합니다. (ctrl+d/cmd+d).

Choosing Light Probe positions 라이트 프로브 위치 선택

Remember to place probes where you want to sample light or sample darkness. The probes need to form a volume within the scene for the space subdivision to work properly.
 라이트나 어두움을 샘플링 하고 싶은 영역에 프로브를 위치시켜야 한다는 것을 기억하십시오. 프로브는 공간 구획에 부피를 차지하고 있어야 적절한 결과가 나옵니다 (주: 적절하게 공간을 차지하도록 만들어야 한다는 뜻)  

The simplest approach to positioning is to arrange them in a regular 3D grid pattern. While this setup is simple and effective, it is likely to consume a lot of memory (each light probe is essentially a spherical, panoramic HDR image of the view from the sample point). It is worth noting that probes are only needed for regions that players, NPCs or other dynamic objects can actually move to. Also, since lighting conditions are interpolated for positions between probes, it is not necessary to use lots of them across areas where the light doesn't change very much. For example, a large area of uniform shadow would not need a large number of probes and neither would a brightly lit area far away from reflective objects. Probes are generally needed where the lighting conditions change abruptly, for instance at the edge of a shadow area or in places where pieces of scenery have different colors.

 가장 쉬운 접근 방법은 이 프로브를 일반적인 3D 그리드 패턴에 정렬하여 위치시키는 것입니다. 이 방법은 간단하고 효과적이며, 이것은 또한 많은 메모리를 낭비합니다. (각 라이트 프로브는 본질적으로 공의, 파노라마 HDR 이미지뷰 포인트를 가지고 있습니다 ) 
프로브는 플레이어가 돌아다니는 영역에만 필요하며, NPC나 움직이는 오브젝트가 진짜로 돌아다니는 영역에만 만들어야 한다는 것을  주목할 가치가 있습니다. 또한. 프로브와 프로브 사이의 조명 인터폴레이션 상태 동안, 큰 영역의 변함없는 그림자 영역이 있다던가 하면 많은 프로브가 필요 없습니다. 그리고 반사 오브젝트에서 멀리 떨어져 있는 그냥 빛나는 영역에도 필요 없습니다. (주: 라이트맵은 오브젝트에서 반사된 빛을 표현하기 때문에, 오브젝트가 근처에 없다면 프로브를 박을 필요가 없다는 뜻) .
프로브는 일반적으로 조명 상태가 갑자기 변할때 필요하며 그림자의 끝 부분이라던가 풍경 조각 (주: 주변이) 다른 칼라일때 사용합니다. 
 

In some cases, the infrastructure of the game can be useful in choosing light probe positions. For example, a racing game typically uses waypoints around the track for AI and other purposes. These are likely to be good candidates for probe positions and it would likely be straightforward to set these positions from an editor script. Similarly, navigation meshes typically define the areas that can be reached by players and these also lend themselves to automated positioning of probes.

몇몇 경우에, 게임의 근본을 위한 구조가 라이트 프로브 위치로 유용할 때가 있습니다. 예를 들어서, 레이싱 게임같은 경우는 일반적으로 트랙 주위로 AI나 다른 목적을 위한 웨이포인트가 있습니다. 이들은 프로브 위지의 좋은 후보들이며 그리고 이것들을 에디터 스크립트에서 정직하게 포지셔닝 됩니다.  비슷하게, 캐릭터가 이동할 수 있는 네비게이션 메쉬 영역 같은 것들도 프로브가 자동으로 배치되도록 할 때 좋습니다.  

Here light probes have been baked over surfaces where our characters can walk on, but only where there are interesting lighting changes to capture:
 여기 라이트 프로브가 우리 캐릭터가 걸어갈 수 있는 표면에서 빛에 구워졌습니다. 그러나 단지 흥미있는 조명의 변화들만을 캡쳐했습니다. (주: 조명이 변화되는 곳에만 프로브를 놓았습니다)

Using Light Probes 라이트 프로브를 사용하기

To allow a mesh to receive lighting from the probe system, you should enable the Use Light Probes option on its MeshRenderer: 프로브 시스템으로부터 메쉬가 조명을 받게 하려면, 당신은 그것의 메쉬 렌더러에서 라이트 프로브 옵션을 켜줘야 합니다.

The probe interpolation requires a point in space to represent the position of the mesh that is receiving light. By default, the centre of the mesh's bounding box is used but it is possible to override this by dragging a Transform to the MeshRenderer's Light Probe Anchor property (this Transform's position will be used as the interpolation point instead). This may be useful when an object contains two separate adjoining meshes; if both meshes are lit individually according to their bounding box positions then the lighting will be discontinuous at the place where they join. This can be prevented by using the same Transform (for example the parent or a child object) as the interpolation point for both MeshRenderers.
프로브 인터폴레이션은 조명을 받는 메쉬의 , 이 공간에서의 위치하고 있는 점을 필요로 합니다. 기본적으로, 메쉬의 바운딩 박스가 사용되지만 이것을 메쉬 렌더러의 라이트 프로브 엥커 설정으로 드래깅해서 덮어쓰는 것도 가능합니다. ( 이 트렌스폼의 위치는 인터폴레이션 포인트 대신 사용될것입니다) 이것은 오브젝트가 두 개의 다른 메쉬가 붙어서 만들어져 있을때 유용합니다. ; 만일 두 메쉬가 그들의 바운딩 박스 포지션에 따라 조명이 각각된다면 라이팅은 그들이 합쳐진 곳에서 라이팅이 연결되지 않게 될 것입니다 . 이것은 두 메쉬 렌더러에서의 인터폴레이션 포인트에서 같은 트렌스폼을 사용함으로써 방지할 수 있습니다 (예를 들어서 부모나 자식 오브젝트로요)
 

When an object using light probes is the active selected object in the Light Probes Scene View mode, its interpolated probe will be rendered on top of it for preview. The interpolated probe is the one used for rendering the object and is connected with 4 thin blue lines (3 when outside of the probe volume) to the probes it is being interpolated between:
오브젝트가 라이트 프로브를 사용할 때 라이트 프로브 씬 뷰 모드가 선택된 오브젝트에서 활성화 될 겁니다. 이 인터폴레이션된 프로브는 프리뷰를 위해 상단에 렌더링 될겁니다. 렌더링에 사용된 인터폴레이션된 프로브는 서로간에 인터폴레이션 되는 4개의 푸른 라인입니다 ( 프로브 볼륨에서 밖으로 나갈땐 3개)  

Dual Lightmaps vs. Single Lightmaps mode

듀얼 라이트맵 vs 싱글 라이트맵 모드

In Single Lightmaps mode all static lighting (including lights set to 'Auto' lightmapping mode) is baked into the light probes. 싱글 라이트맵 모드안에 모든 스테틱 라이트 ( 'Auto' 라이트맵핑 모드로 셋팅된 라이트 포함) 는 라이트 프로브로 베이킹 됩니다.

In Dual Lightmaps mode light probes will store lighting in the same configuration as 'Near' lightmaps, i.e. full illumination from sky lights, emissive materials, area lights and 'Baked Only' lights, but only indirect illumination from 'Auto' lights. Thanks to that the object can be lit in real-time with the 'Auto' lights and take advantage of dynamic elements such as real-time shadows, but at the same time receive indirect lighting added to the scene by these lights.
 듀얼 라이트맵 모드에서 라이트 프로브는 'Near' 라이트맵과 같은 라이팅 환경을 저장하게 될 것입니다. 예를 들자면. 스카이 라이트의 최대 밝기, 자기 발광 메터리얼, 영역 라이트와 'Baked Only' 라이트 말입니다. 그렇지만 'Auto ' 라이트에서 온 간접 조명만 사용됩니다. 고맙게도 오브젝트는 Auto 라이트로 리얼 타임으로 라이팅 될 수 있으며, 거기서 얻을 수 있는 실시간 조명의 이득도 가질 수 있습니다. 리얼타임 그림자 같은 것 말입니다. 그렇지만 그들의 라이트로 인한 간접 조명도 동시에 더해서 받을 수 있습니다. (주: 듀얼 라이트맵을 사용하면 실시간 그림자와 함께 라이트 프로브도 사용할 수 있다는 말)

Page last updated: 2011-12-01
반응형

댓글