본문 바로가기
유니티 엔진

Unity 3.5 신기능 : HDR (High Dynamic Range)

by 대마왕J 2012. 1. 30.

HDR (High Dynamic Range)
HDR 하이 다이나믹 레인지 : 고 계조영역

 

Overview 총론

Normally when rendering a scene pixel values are clamped with a maximum intensity of 1.0, HDR rendering removes this limitation and allows stored pixel values to have an intensity greater than 1.0. As monitors normally only display intensities in the range of 0.0 - 1.0 this range needs to be mapped back into a visible range. This is achieved via a process known as tone mapping.
 보통 씬의 픽셀이 렌더링 될때 , 빛의 최대강도는 1.0에서 짤립니다. HDR 렌더링은 이러한 제한을 제거하고 픽셀에 조명 강도를 1.0 이상으로 저장할 수 있게 합니다. 모니터도 일반적으로 빛의 강도를 0.0~1.0으로만 표현할 수 있고, 이 영역은 보이는 영역으로 다시 리맵핑 되어야 합니다. 이것은 톤 매핑이라는 프로세스를 통해 달성됩니다. (주: 조명 강도가 1.0 이상으로 높게 저장된 조명 값은 톤매핑이라는 과정을 통해 모니터의 한계인 1.0 안으로 조정됩니다 )

Enabling HDR
HDR활성화

HDR rendering is a per camera setting in Unity. It is exposed via a new property on the camera. By selecting this checkbox it is telling unity to internally use the HDR pipeline.
 HDR 렌더링은 유니티의 각각의 카메라 셋팅에 있습니다. 이것은 카메라의 새로운 속성에 노출되어 있습니다. 이 체크박스를 선택하면 유니티에게 내부적으로 HDR 파이프라인을 사용하라고 얘기하는 것입니다.

Working with HDR
HDR과 일하기

Once HDR is enabled the scene is rendered as it normally would be, but into an HDR buffer. When the rendering is completed the resultant image is passed to the Unity post processing effect pipeline, it is here that HDR bloom, tonemapping and other HDR image effects can be configured. At some stage the image should be mapped back into the LDR range for display via an image effect. ImageEffectTransformsToLDR is a new attribute can be added to an image effect to indicate that the target buffer should be in LDR instead of HDR.
 HDR이 활성화되면 씬은 일단 보통으로 렌더링될 겁니다만, HDR 버퍼로 들어갑니다. 렌더링이 끝나면 결과 이미지는 유니티 후처리 이펙트 파이프라인으로 옮겨집니다. 여기에는 HDR 블룸, 톤매핑 그리고 다른 HDR 이미지 이펙트가 설정되어 있습니다. 어떤 스테이지에 오면  이미지가 이미지 이펙트에 의해 LDR (주: HDR의 반대) 로 다시 맵핑됩니다.  ImageEffectTransformsToLDR 은 타겟 버퍼가 HDR 대신 LDR로 되게 하는 이미지 이펙트가 더해질 수 있게 해주는 기능입니다. (주: HDR이었던 이미지가 중간에 과정을 거쳐서 다시 LDR로 바뀌게 됩니다. HDR로는 출력할 수 없기 때문에 반드시 최종적으로는 LDR로 바꿔줘야 하거든요)

Tonemapping
톤매핑

Tonemapping is the process of mapping HDR values back into the LDR range. There are many different techniques, and what is good for one project may not be the best for another. A variety of tonemapping image effects have been included in Unity. To use them select Assets -> Import Package -> Image Effects (Pro Only) select the camera in the scene then select Component -> Image Effects ->ToneMapping a detailed description of the tonemapping types can be found in the image effects documentation.
톤매핑은 HDR 값을 LDR 영역 값으로 돌리도록 해주는 프로세스입니다. 이것은 많은 다른 테크닉이 있고, 어떤 프로젝트를 위한 좋은 설정이 다른 프로젝트에도 최적의 것은 아닙니다. 톤매핑 이미지 이펙트의 다양함은 유니티에 내장되어 있습니다. 이들을 사용하려면 Assets -> Import Package -> Image Effects (Pro Only) 을 불러옵니다. 카메라를 선택하고 Component -> Image Effects ->ToneMapping 을 선택합니다. 톤매핑 타입에 대한 세부적인 기술은 image effects documentation. 에서 찾을 수 있습니다.

An exceptionally bright seen rendered in HDR. Tonemapping is used to bring the bright intensities back into the displayable range.
 비정상적으로 밝은 씬이 HDR 렌더링입니다. 톤매핑은 이런 밝기를 정상적으로 보이는 밝기로 돌려줍니다.
(주: 원래 위에 보이는 비정상적으로 밝은 씬이 실제 세계에서는 정상인 씬입니다. 그렇지만 저 상태가 모니터로는 표현할 수 없기 때문에 강제로 내려준게 아래입니다. 톤매핑이 이것입니다. )

HDR Bloom
HDR 블룸

Using HDR allows for much more control in post processing. LDR bloom has an unfortunate side effect of blurring many areas of a scene even if their pixel intensity is less than 1.0. By using HDR it is possible to only bloom areas where the intensity is greater than one. This leads to a much more desiarable outcome with only super bright elements of a scene bleeding into neighboring pixels. The built in 'Bloom and Lens Flares' image effect now also supports HDR. To attach it to a camera select Assets -> Import Package -> Image Effects (Pro Only) select the camera in the scene then select Component -> Image Effects ->Bloom (Supports HDR and Lens Flare) a detailed description of the 'Bloom and Lens Flares' effect can be found in the image effects documentation.
HDR은 훨씬 많은 컨트롤을 후처리에서 할 수 있게 해 줍니다.  LOD 블룸(주: 기존의 블룸) 은 운나쁘게도 밝기가 1.0 이하인 값에서도 부작용으로 블룸이 먹어 버리곤 했었습니다. HDR을 사용하면, 이제 확실하게 밝기가 1.0 이상인 부분만 블룸을 정확히 줄 수 가 있게 됩니다. 이것은 이제 더욱 더 확실하게 '굉장히 밝은 영역이 인접한 영역에 영향을 끼치는' 정확한 결과물을 나타낼 수 있게 해 줍니다. (주: 블룸이 정확해져서, 쓸 데 없는 것이 타버리는 것을 방지할 수 있습니다)기본 내장된 'Bloom and Lens Flares' 이미지 이펙트는 또한 HDR을 지원합니다. 이것을 카메라에 붙이려면 Assets -> Import Package -> Image Effects (Pro Only) 를 불러오고 카메라를 선택한 후  Component -> Image Effects ->Bloom (Supports HDR and Lens Flare) 를 적용하면 됩니다. 더 많은 세부 문서는 이미지 이펙트의 'Bloom and Lens Flares'항목에서 찾으시면 됩니다.

An exceptionally bright scene where bloom has been applied to intensities of > 1.0. The bloomed image has also been tonemapped back into a displayable range.
1.0 이상의 과도하게 밝은 이미지에 블룸이 적용되었습니다. 블룸 이미지는 보여지는 영역 안으로 다시 톤매핑 되게 됩니다. (주: 역시 너무 밝아 안보이거든요 HDR 상태에서는)  

Advantages of HDR
HDR의 장점

  • Colors not being lost in high intensity areas
    아주 밝은 영역에서도 칼라값을 잃어버리지 않습니다.  
  • Better bloom support
    훨씬 좋은 블룸을 제공합니다.
  • Reduction of banding in low frequency lighting areas
    적은 주파수의 라이트 영역에서의 밴딩을 줄입니다.  

Disadvantages of HDR
HDR의 단점

  • Uses Floating Point buffers, so is slower
    부동 소수점 포인트의 버퍼를 사용합니다. 그래서 느립니다.  
  • Not supported on all hardware
    모든 하드웨어에서 사용되는것은 아닙니다.

Usage notes
사용 방법

Forward Rendering
포워드 렌더링

In forward rendering mode HDR is only supported if you have an image effect present. This is due to performance considerations. If you have no image effect present then no tone mapping will exist and intensity truncation will occur. In this situation the scene will be rendered directly to the backbuffer where HDR is not supported.
 포워드 렌더링 모드에서 HDR은 당신이 이미지 이펙트를 제공할때에만 지원합니다. 이것은 퍼포먼스 고려에 기인합니다. 만일 당신이 이미지 이펙트를 적용하지 않으면 톤매핑은 없을 것이면 밝기는 짤려 버릴 겁니다 (주: 1.0 이상 밝기는 날라가 버릴 겁니다. 기존처럼 말이죠) 이 상황에서 씬은 백버퍼에 HDR을 고려하지 않은 채 바로 렌더링 될겁니다.

Deferred Rendering
디퍼드 렌더링 (지연 렌더링)

In HDR mode the light prepass buffer is also allocated as a floating point buffer. This reduces banding in the lighting buffer. HDR is supported in deferred rendering even if no image effects are present.
 HDR 모드에서 라이트 프리패스 버퍼는 또한 부동소수점 버퍼로 할당됩니다 (주: 어차피 플로팅 포인트로 렌더링된다는 말씀) . 이것은 라이트 퍼버의 밴딩을 줄입니다 (주: 밴딩. 줄무늬. 계조가 부족해서 생기는 그라디에이션의 끊김을 말함) 디퍼드 렌더러에서는 이미지 이펙트가 설정되지 않더라도 HDR이 가동됩니다.

Page last updated: 2011-11-22
반응형

댓글