SlideShare une entreprise Scribd logo
1  sur  98
Télécharger pour lire hors ligne
Lightmap 시스템 구축하기

     Ntreev Soft
        황재식
Agenda
• Lightmap 관련 기술 소개
 – Unwrapping 관련 기술 소개
 – Radiosity 관련 기술 소개


• 실제 게임 적용 사례 소개
Lightmap이란?
• 라이트 정보를 담고 있는 이미지

• Irradiance를 저장하
  고 있기 때문에
  Irradiance map이
  더 정확한 표현.
Quake2
Mirror’s Edge
Why?
패치(Patch)
• Lighting 계산을 위한 최소 단위

• 각각의 Patch는 Lightmap의 1픽셀에 대응

• 패치가 많을수록 보다 정교한 계산 가능
 – Lightmap 해상도가 커짐
 – 계산 시간이 더 오래 걸림
패치(Patch)




http://graphics.stanford.edu/courses/cs348b-00/lectures/lecture17/walk006.html
라이트맵 공정



Unwrapping   Baking
알고리즘 소개



Unwrapping   Baking
Unwrapping
• Segmentation
• Mesh parameterization
Atlas, Chart
• Atlas ≥ Chart


                  Chart




                          Atlas
좋은 Unwrapping 조건
• 균일한 Patch 사이즈
• 왜곡이 적어야 한다.
 – 내각의 크기와 세 변의 길이 비율이 Unwrapping
   된 후에도 비슷하게 보존될수록 왜곡이 적다라고 할
   수 있다.
     Large Chart     Low Distortion
알고리즘 종류
• Iso-charts
•   LSCM
•   ABF++
•   D-charts
•   MCGIM
•   기타 등등
Iso-charts
• 빠르고 효율적인 Chart 생성

• UVAtlas in DirectX9
  – D3DXUVAtlasCreate,
    D3DXUVAtlasPartition, D3DXUVAtlasPack
  – uvatlas.exe


• Halo3에서의 라이트맵에서도 사용됨.
Iso-charts 과정
• 서피스 분포 분석
• 스트레치 최적화
• 서피스의 분포를 고려해서 묶는다.
• 차트의 경계를 최적화한다.
• 스트레치 기준을 충족 시킬 때까지 차트를 재귀
  적으로 계속 나눈다.
• 패킹을 해서 Atlas로 만든다.
알고리즘 소개



Unwrapping   Baking
Baking
• Radiosity 알고리즘을 이용, Lightmap의 각
  각의 픽셀에 Irradiance를 계산해서 저장하는
  과정.

• 차례
 – Radiosity 소개
 – 용어 설명
 – Radiosity 알고리즘 소개
Radiosity
• Diffuse 머티리얼을 가지는
  서피스와 광원, 혹은 두
  Diffuse 서피스 사이의 빛의
  상호 작용을 계산하는 방식.

• Diffuse Material만 다루기
  때문에 카메라에 독립적이다.


• Direct Lighting과
  Indirect Lighting 계산
Direct Lighting
• 태양이나 전구 같이 직접
  빛을 내어 물체를 비추는
  광원에 대해서 계산을
  하는 것

• 장면에 가장 밝은 빛을
  제공하고 그림자를 생성
  한다.
Indirect Lighting
• 다른 오브젝트를 비추기
  전에 이미 반사되거나
  다른 표면에서 부딪혀서
  나온 빛을 계산한다.

• 장면의 구석구석을 밝히거나
  공간을 채우는 빛을 만든다.

• Color Bleeding 효과
용어설명
•   Flux
•   Solid Angle
•   Radiance
•   Irradiance
•   Radiosity
•   Form Factor
•   Monte Carlo Method
•   Russian Roulette
Flux
•   단위 시간 동안 표면을 통과하는 총 에너지 량
•   단위 : J/s, W(watt)
•   보통 Φ 표현
•   다른 말로
    Radiant Power
입체각(Solid Angle)
• 단위 :steradian
Radiance
• 단위 면적, 단위 Solid Angle에 대한 Flux 량
• L=d2Φ/(dwdAㅗ )= d2Φ /(dwdAcosΘ)




                               dAㅗ




                          dA
Irradiance
• 표면의 단위 면적에 들어오는 Flux 량
  전 방향으로 들어오는 모든 Radiance의 합
• 단위 : W/m2
• E = dΦ/dA (A:표면적)
Radiosity
• 표면의 단위 면적에서 나가는 Flux 량
• 단위 : W/m2
• M = B = dΦ/dA (A:표면적)
Form Factor
• 한 패치에서 발산된 에너지 중 다른 패치에 도달
  한 에너지 비율
Form Factor




Self-emitted      reflectivity     total
 radiosity                       radiosity




                                 Form factor
Monte Carlo Method
• 통계 확률 이론에 기반을 둔 개념으로 난수를 발생
  시켜 원하는 값의 확률적 분포나 수치를 구하는 방
  법

• 예1) π 구하기
  N = 전체 찍힌 점의 수
  Nc = 부채꼴 안의 점의 수
  A = 1(사각형 면적)
  Ac = π /4(부채꼴의 면적)
  Ac /A = π /4 =Nc /N


  Π = 4Nc/N
Monte Carlo Method 예2
• 광원에서 발사되는 Ray나
  Photon의 발생 위치와 발사
  방향을 랜덤하게 결정하는데
  사용하거나 반사면에서 생존
  여부를 가릴 때 사용한다.
Monte Carlo Estimator
• Monte Carlo 방법을 이용해서 적분의 근사치
  를 구할 수 있다.



      적분
                     Estimator


• 샘플링 개수(N)가 많을수록 실제 해에 가까워진
  다.
Importance Sampling
• Monte Carlo Estimator을 구할 때 표본을 실제
  피적분 함수 모양에 가깝게 샘플링 하면 더 적은 수
  의 샘플링으로 실제 해에 가까운 값을 얻을 수 있다.

• 예1) 직접광에 의한 라이팅을 계산할 때 패치에서
  광원 방향으로 더 많은 Ray를 생성한다.

• 예2) 간접광에 의한 라이팅을 계산할 때 패치의 노
  멀과 가까운 방향으로 더 많은 Ray을 생성한다.
Russian Roulette
• Indirect Lighting 계산에서 Ray나 Photon
  을 몇번이나 반사시킬지 정할 수 있어야 한다.

  – 반사 횟수로 제한
  – Power가 일정 수치 이하로 내려갈 경우 소멸
    • 위 두 가지 방식은 장면 내의 전체 에너지를 보존시켜주
      지 못한다.
  – 매번 반사될 때마다 Russian Roulette 이용
    • 에너지를 보존시켜준다.
Russian Roulette



• q에 의해서 살아남은 샘플에 가중치가 부여되어서
  총 에너지의 손실이 없는 결과를 얻을 수 있다.

• q에 의해서 Ray나 Photon의 Bounce 횟수를 조
  절할 수 있다.
Russian Roulette
// Possibly terminate every light path
if( nIntersections > 2 )
{
         float q = 0.5f;
         if( RandomFloat() > q )
                 break;
         irradiance /= q;
}

어두운 씬에서는 반사가 적게 이뤄져도 되기 때문에
q를 크게 설정해서 반사가 적게 이뤄지도록 하고
밝은 씬에서는 q를 크게 셋팅해서 많은 수의 반사가
이뤄지도록 할 수 있다.
Radiosity 알고리즘 분류 - 1

                                     Scene
            Monte Carlo Method     Rendering
               Ray-tracing 방식         방식
               Final Gathering
               Path-tracing 방식
 Classic       Stochastic Jacobi
Radiosity      Radiosity
               Irradiance Cache
               Photon mapping
               Instant Radiosity
Classic Radiosity
• 모든 패치 사이의 Form Factor를 미리 구해줘야 한다.
• 많은 저장 공간이 필요하고 시간이 오래 걸리기 때문에 비효율적
• n개의 패치가 있을 때 n2 * 0.5 번의 Form Factor 연산을 미리 해줘
  야 한다.
• 계산 도중 중간 결과를 보기 힘들다.
Monte Carlo Method
• Form Factor를 미리 구할 필요가 없다.

• Classic 방식에 비해서 더 적은 저장 공간과 짧
  은 계산 시간으로 괜찮은 퀄리티의 결과물을 얻
  을 수 있다.

• 중간에 결과를 확인해 볼 수 있다.
Scene Rendering 방식
• 패치에서 노멀 방향으로 보이는 씬을 렌더링 한 다
  음 렌더링 된 텍스쳐의 각각의 픽셀을 패치로 들어
  오는 Radiance로 간주하고 Irradiance를 구하
  는 방식.

• Ray-tracing 같은 복잡한 알고리즘을 알 필요가
  없고 별도로 Form Factor를 구하지 않아도 된다.

• 모든 패치를 광원으로 간주한다.
Scene Rendering 방식



            2
                     3
    1




4               5        6
Scene Rendering 방식




7       8        9




10          11
Scene Rendering 방식
• Hemisphere map 대신
  Hemicube map사용




        Distance Map   Lambert's Cosine Map
Radiosity 알고리즘 분류 - 2

Gathering         Shooting            속도개선

Scene Rendering   Stochastic Jacobi
                     Radiosity
Ray-tracing 방식
                                      Irradiance
                  Photon Mapping
                                       Cache
Final Gathering


Path-tracing 방식   Instant Radiosity
Shooting
• 한 패치에서 발산된 에너지에 영향을 받는 다른
  주변 패치의 에너지 상태를 업데이트 한다.

• 계산 결과를 빨리 볼 수 있지만 작은 패치에 대해
  서 노이즈 결함을 발생 시킨다.
Gathering
• 한 패치에서 보이는 다른 패치로부터 발산되는
  에너지를 모아서 패치의 에너지 상태를 업데이트
  한다.

• 노이즈 결함을 없애서 렌더링 퀄리티를 올리는데
  사용될 수 있다.
Ray-traced 방식

Gathering         Shooting            속도개선

Scene Rendering   Stochastic Jacobi
                     Radiosity
Ray-tracing 방식
                                      Irradiance
                  Photon Mapping
                                       Cache
Final Gathering


Path-tracing 방식   Instant Radiosity
Ray-tracing 방식
• Direct Lighting
  – 각각의 패치에서 광원을 향해 Ray을 발사, 1차
    Lighting 정보를 생성한다.
  – 그림자 생성


• Indirect Lighting
  – Final Gathering 단계, 패치 주변으로 Ray을
    발사해서 Radiance 정보를 수집한다.
Direct Lighting 의사코드
directIllumination(x)
    estimateRadiance = 0;
    for all shadow rays
    {
           generate point y on light source
           estimateRadiance += Le(y, yx) *
    Reflectance * G(x,y) * V(x,y) / pdf(y);
    }
    extimateRadiance = estimateRadiance /
    #shadowRays;
    return(estimateRadiance)


V(x,y) : 패치 x에서 패치 y가 보이는지 여부
G(x,y) =
Direct Lighting
Final Gathering

Gathering             Shooting            속도개선

Scene Rendering       Stochastic Jacobi
                         Radiosity
Ray-traced 방식
                                          Irradiance
                      Photon Mapping
                                           Cache
Final Gathering


Path-tracing 방식       Instant Radiosity
Final Gathering
• 이미 계산된 Radiosity를
  Ray-tracing을 이용해서
  더 정확하고 부드러운 결과를
  만들어 냄.

• Indirect Lighting계산하기
  위해 사용되거나
  Shooting, Photon mapping
  계산 후 2pass에서 Rendering
  퀄리티를 높이기 위해서 사용
Sampling
• Hemisphere Sampling을
  이용, 패치에서 반구 방향으로
  무작위로 Ray 발사.
• 충돌된 가장 가까운 지점의
  Radiance을 가져온다.

• Importance Sampling을
  이용해서 패치의 노멀 방향에 가까운 방향의 Ray를 더
  많이 발사하면 더 적은 연산으로 동일한 결과를 얻을 수
  있다.
Final Gathering 결과
Path-tracing 방식

Gathering         Shooting            속도개선

Scene Rendering   Stochastic Jacobi
                     Radiosity
Ray-tracing 방식
                                      Irradiance
                  Photon Mapping
                                       Cache
Final Gathering


Path-tracing 방식   Instant Radiosity
Path-tracing 방식
• 실질적으로 반사가 수행하는 Ray는
  하나만 생성하고 나머지 Ray는 주변의
  Radiance를 수집하는 역할만 한다.

• Ray-tracing 방식은 bounce될 때에도
  여러 개의 반사Ray가 생성된다.

• Path-tracing 방식은 Final Gathering을
  수행 한 후 간접광을 빠르게 한번 더
  계산할 때 주로 사용된다.
  한 방향으로만 브랜칭 되기 때문에
  Ray-Tracing 방식보다 속도는 빠르지만
  최종 렌더링 퀄리티는 떨어진다.
Stochastic Jacobi Radiosity

Gathering         Shooting            속도개선

Scene Rendering   Stochastic Jacobi
                     Radiosity
Ray-traced 방식
                                      Irradiance
                  Photon mapping
                                       Cache
Final Gathering


Path-tracing 방식   Instant Radiosity
Stochastic Jacobi Radiosity
• 처음pass에서는 광원에서 Ray를 발사해서
  주변 패치의 에너지 상태를 업데이트 시키고 이후 pass
  에서는 각각의 패치에서 반사되는 빛을 고려해서 주변
  패치의 에너지 상태를 업데이트 한다.

• 패치와 광원사이의 Form Factor는 광원에서 발사된
  전체 Ray수와 패치가 받은 Ray수의 비율로 나타낸다.
              Fij = Nij/Ni
          Ni는 패치i 에서 발사된 Ray 수,
   Nij는 패치 i에서 발사된 Ray중 패치 j에 도달한 Ray 수
Ray 생성




Local line – 1pass       Global line – 2,3,4…pass
Stochastic Jacobi Radiosity
Irradiance Cache

Gathering         Shooting            속도개선

Scene Rendering   Stochastic Jacobi
                     Radiosity
Ray-tracing 방식
                                      Irradiance
                  Photon Mapping
                                       Cache
Final Gathering


Path-tracing 방식   Instant Radiosity
Irradiance Cache
• 인접한 패치의 Irradiance를 보간해서 Patch
  의 Irradiance를 구한다.

• Direct Lighting의 경우 패치사이의
  Irradiance 변화량이 큰 곳이 많이 존재하지만
  Indirect Lighting의 경우에는 상대적으로 인
  접한 패치끼리의 변화량이 적은 곳이 대부분이기
  때문에 이러한 보간 연산이 가능하다.
가중치 부여
• 보간에 참여하는 각각의 패치에 가중치를 부여한다.




• 거리가 작고 노멀 벡터의 내적과 주변 지오메트리와
  거리가 클수록 높은 가중치를 갖게 된다.
버림 조건
• 다음과 같은 조건을 갖는 인접한 패치는 무시된
  다.
 – 노멀 벡터의 차이가 너무 크다.
 – 주어진 패치보다 앞에 존재한다.
                           n
 n   E(p,n)                    E(p,n)

         p    p’
                           p


                                        p’
Irradiance 계산 - 1
• 패치 사이 변화가 큰 부분에서는 Irradiance를 직접
  계산하고 계산된 값을 Octree 구조를 갖는
  Irradiance Cache에 저장한다.




          http://www.rorydriscoll.com/2009/01/18/irradiance-caching-part-1/
Irradiance 계산 - 2
• 변화량이 작은 부분에서는 Irradiance Cach
  e를 이용, 주변의 패치를 검색 한 후 아래 식으로
  Irradiance를 보간한다. 이 결과 역시 Cache
  에 저장한다.
Photon Mapping

Gathering         Shooting            속도개선

Scene Rendering   Stochastic Jacobi
                     Radiosity
Ray-tracing 방식
                                      Irradiance
                  Photon Mapping
                                       Cache
Final Gathering


Path-tracing 방식   Instant Radiosity
Photon Mapping
• Two-Pass 알고리즘
 – 1Pass
   •   광원에서 Photon 발산
   •   서피스와 충돌, 반사
   •   충돌된 Photon을 Photon map에 저장
   •   패치 별로 주어진 반경 안에 있는 Photon을 검색해서 Irradia
       nce 계산(검색된 Photon의 Flux을 모두 더한 후 원의 면적
       으로 나눠준다.)
 – 2Pass
   • Final Gathering

• 적은 비용으로 Caustic 효과를 낼 수 있다.
Photon Mapping
• Photon : Flux 운반체
• Photon map
   – 서피스와 부딪힌 지점의 Photon 정보 저장
   – Balanced Kd-Tree
   – Global Photon Map(Direct, Indirect)
   – Caustic Photon Map
Photon State Machine
                                    Specular



                         Caustic          Nonspecular
              Specular



Emission
           Direct                   Specular/        Caustic
                                    Nonspecular


           Nonspecular   Indirect              Specular/
                                               Nonspecular
Photon Mapping 결과
Instant Radiosity

Gathering         Shooting            속도개선

Scene Rendering   Stochastic Jacobi
                     Radiosity
Ray-tracing 방식
                                      Irradiance
                  Photon mapping
                                       Cache
Final Gathering


Path-tracing 방식   Instant Radiosity
Instant Radiosity
• Direct, Indirect Lighting을
  Point 광원으로 표현한다.

• Diffuse로 이뤄진
  Scene에서만 가능하다.

• GPU Rendering을 이용해서
  구현 가능하다.
  (Keller’s Paper)
Instant Radiosity
개발 사례
• Unwrapping : UVAtlas
• Baking : Beast
Unwrapping 차례
• UVAtlas 소개
• UVAtlas 에서 사용되는 주요인자
 – Stretch
 – Gutter Width
 – IMT
• Lightmap 압축
• Instancing
UVAtlas 소개
• DirectX에서 제공하는 Iso-charts 알고리즘을
  이용한 UV Unwrapping API

• 용도
 – Normal/displacement mapping
 – Texture-space PRT simulations and light ma
   ps
 – Surface painting
 – Texture-space lighting
UVAtlas 주요 인자
• Stretch

• Gutter Width

• Integrated Metric Tensors(IMT)
Stretch - 1
• Chart를 어느 정도로 펼 것인가?
• 0~1 사이 값. 0.16667이 기본값.




        0             0.1   0.1667 이상
Stretch – 2




CSG맵은 Stretch가 0에 가까   일반 Mesh로 이루어진 맵은
울수록 결과가 좋았음            0.16정도 했을 때 괜찮았음.
Gutter Width
• Chart 사이 너비
• Padding이라도고 함.
• Multi Sampling시 인접한 Chart의 색을 침범하지 못하도록
  하는 역할.




             2             30
Integrated Metric Tensors - 1
• Texture-space에서 삼각형을 어떻게 펼 것인지 정의
• 픽셀의 색 변화량이 큰 부분에 더 많은 공간을 할당하는
  것이 가능(Lightmap compression in halo3)
Integrated Metric Tensors - 2
• D3DX IMT 관련 함수를 이용해서 IMT 생성
 – D3DXComputeIMTFromPerVertexSignal
 – D3DXComputeIMTFromPerTexelSignal
 – D3DXComputeIMTFromSignal
 – D3DXComputeIMTFromTexture


• 유저가 임의로 생성한 IMT도 Chart를 생성할
  때 사용 가능함.
Lightmap 압축




        Lightmap compression in Halo3
Lightmap 압축




       Lightmap compression in Halo3
Mesh와 Instance
• Mesh는 Vertex, Face, Material 정보

• Instance는 Mesh ID와 Transform 정보를
  가지고 있음.

• 한 씬에 동일한 Mesh가 여러 개 존재할 때
  Instance로 관리하면 자원을 효율적으로 관리
  할 수 있음.
Instancing




• 동일한 Mesh가 여러 개 존재 할 때 오직 한 Mesh에 대해서만
Chart를 만들고 다른 Instance는 이미 만들어진 Chart사용.

• Instance는 Lightmap에서의 UV 시작위치만 저장.
Baking 차례
•   Radiosity 미들웨어 소개
•   Beast 소개
•   렌더링 샘플
•   퀄리티를 높이기 위한 팁
•   동영상
Radiosity 미들웨어
• Beast

• Lightsprint

• Enlighten

• 기타 등등
Beast 소개
• Baking 전용 미들웨어

• Illuminate Labs에서 개발

• 대표작 : Mirror’s Edge

• Montel Carlo 방식에 기반한 렌더러
  – Final Gathering, Path tracing,
    Photon mapping, Irradiance Cache 등을 지원
Direct Lighting
Indirect Lighting
Soft Shadow
Color Bleeding
퀄리티를 높이기 위한 간단한 팁
• 라이트맵 바탕색을
  전체 계산된 라이트맵
  차트의 색과 비슷하게
  하라.

• 계산이 끝난 후에
  차트의 Edge를
  1~2픽셀 정도
  바깥으로 늘려라.
Lightmap Baking 동영상
참고자료
• Advanced Global Illumination
• Physically Based Rendering
• Light map compression in halo3
Q&A


이메일 주소 : youcu81@gmail.com

블로그 : emptymind.tistory.com

Contenu connexe

Tendances

Progressive Lightmapper: An Introduction to Lightmapping in Unity
Progressive Lightmapper: An Introduction to Lightmapping in UnityProgressive Lightmapper: An Introduction to Lightmapping in Unity
Progressive Lightmapper: An Introduction to Lightmapping in UnityUnity Technologies
 
Unreal Summit 2016 Seoul Lighting the Planetary World of Project A1
Unreal Summit 2016 Seoul Lighting the Planetary World of Project A1Unreal Summit 2016 Seoul Lighting the Planetary World of Project A1
Unreal Summit 2016 Seoul Lighting the Planetary World of Project A1Ki Hyunwoo
 
Calibrating Lighting and Materials in Far Cry 3
Calibrating Lighting and Materials in Far Cry 3Calibrating Lighting and Materials in Far Cry 3
Calibrating Lighting and Materials in Far Cry 3stevemcauley
 
Practical Occlusion Culling in Killzone 3
Practical Occlusion Culling in Killzone 3Practical Occlusion Culling in Killzone 3
Practical Occlusion Culling in Killzone 3Guerrilla
 
Volumetric Lighting for Many Lights in Lords of the Fallen
Volumetric Lighting for Many Lights in Lords of the FallenVolumetric Lighting for Many Lights in Lords of the Fallen
Volumetric Lighting for Many Lights in Lords of the FallenBenjamin Glatzel
 
Ndc2010 전형규 마비노기2 캐릭터 렌더링 기술
Ndc2010 전형규   마비노기2 캐릭터 렌더링 기술Ndc2010 전형규   마비노기2 캐릭터 렌더링 기술
Ndc2010 전형규 마비노기2 캐릭터 렌더링 기술henjeon
 
Shadow mapping 정리
Shadow mapping 정리Shadow mapping 정리
Shadow mapping 정리changehee lee
 
Past, Present and Future Challenges of Global Illumination in Games
Past, Present and Future Challenges of Global Illumination in GamesPast, Present and Future Challenges of Global Illumination in Games
Past, Present and Future Challenges of Global Illumination in GamesColin Barré-Brisebois
 
Checkerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOCCheckerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOCQLOC
 
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) NDC15 Ver.
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) NDC15 Ver.유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) NDC15 Ver.
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) NDC15 Ver.ozlael ozlael
 
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14AMD Developer Central
 
Real-Time Global Illumination Techniques
Real-Time Global Illumination TechniquesReal-Time Global Illumination Techniques
Real-Time Global Illumination TechniquesJangho Lee
 
Compute shader
Compute shaderCompute shader
Compute shaderQooJuice
 
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonLow-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonAMD Developer Central
 
Secrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologySecrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologyTiago Sousa
 

Tendances (20)

Global illumination
Global illuminationGlobal illumination
Global illumination
 
A Real-time Radiosity Architecture
A Real-time Radiosity ArchitectureA Real-time Radiosity Architecture
A Real-time Radiosity Architecture
 
Motion blur
Motion blurMotion blur
Motion blur
 
Progressive Lightmapper: An Introduction to Lightmapping in Unity
Progressive Lightmapper: An Introduction to Lightmapping in UnityProgressive Lightmapper: An Introduction to Lightmapping in Unity
Progressive Lightmapper: An Introduction to Lightmapping in Unity
 
Frostbite on Mobile
Frostbite on MobileFrostbite on Mobile
Frostbite on Mobile
 
Unreal Summit 2016 Seoul Lighting the Planetary World of Project A1
Unreal Summit 2016 Seoul Lighting the Planetary World of Project A1Unreal Summit 2016 Seoul Lighting the Planetary World of Project A1
Unreal Summit 2016 Seoul Lighting the Planetary World of Project A1
 
Calibrating Lighting and Materials in Far Cry 3
Calibrating Lighting and Materials in Far Cry 3Calibrating Lighting and Materials in Far Cry 3
Calibrating Lighting and Materials in Far Cry 3
 
Practical Occlusion Culling in Killzone 3
Practical Occlusion Culling in Killzone 3Practical Occlusion Culling in Killzone 3
Practical Occlusion Culling in Killzone 3
 
Volumetric Lighting for Many Lights in Lords of the Fallen
Volumetric Lighting for Many Lights in Lords of the FallenVolumetric Lighting for Many Lights in Lords of the Fallen
Volumetric Lighting for Many Lights in Lords of the Fallen
 
Ndc2010 전형규 마비노기2 캐릭터 렌더링 기술
Ndc2010 전형규   마비노기2 캐릭터 렌더링 기술Ndc2010 전형규   마비노기2 캐릭터 렌더링 기술
Ndc2010 전형규 마비노기2 캐릭터 렌더링 기술
 
Shadow mapping 정리
Shadow mapping 정리Shadow mapping 정리
Shadow mapping 정리
 
Past, Present and Future Challenges of Global Illumination in Games
Past, Present and Future Challenges of Global Illumination in GamesPast, Present and Future Challenges of Global Illumination in Games
Past, Present and Future Challenges of Global Illumination in Games
 
Checkerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOCCheckerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOC
 
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) NDC15 Ver.
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) NDC15 Ver.유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) NDC15 Ver.
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) NDC15 Ver.
 
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
 
Sw occlusion culling
Sw occlusion cullingSw occlusion culling
Sw occlusion culling
 
Real-Time Global Illumination Techniques
Real-Time Global Illumination TechniquesReal-Time Global Illumination Techniques
Real-Time Global Illumination Techniques
 
Compute shader
Compute shaderCompute shader
Compute shader
 
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil PerssonLow-level Shader Optimization for Next-Gen and DX11 by Emil Persson
Low-level Shader Optimization for Next-Gen and DX11 by Emil Persson
 
Secrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologySecrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics Technology
 

En vedette

Paris Master Class 2011 - 07 Dynamic Global Illumination
Paris Master Class 2011 - 07 Dynamic Global IlluminationParis Master Class 2011 - 07 Dynamic Global Illumination
Paris Master Class 2011 - 07 Dynamic Global IlluminationWolfgang Engel
 
명암 표현하기
명암 표현하기명암 표현하기
명암 표현하기rick choi
 
Naman quantum cryptography
Naman quantum cryptographyNaman quantum cryptography
Naman quantum cryptographynamanthakur
 
Devtree lightmapping unity5_2_1stday
Devtree lightmapping unity5_2_1stdayDevtree lightmapping unity5_2_1stday
Devtree lightmapping unity5_2_1stdaySangYun Yi
 
비실사렌더링-툰 쉐이딩
비실사렌더링-툰 쉐이딩비실사렌더링-툰 쉐이딩
비실사렌더링-툰 쉐이딩quxn6
 
[0806 박민근] 림 라이팅(rim lighting)
[0806 박민근] 림 라이팅(rim lighting)[0806 박민근] 림 라이팅(rim lighting)
[0806 박민근] 림 라이팅(rim lighting)MinGeun Park
 
Gunz Postmortem
Gunz PostmortemGunz Postmortem
Gunz Postmortem기룡 남
 
Mudbox2014 workflow
Mudbox2014 workflowMudbox2014 workflow
Mudbox2014 workflowtoppiccg
 
2015 데브루키 페차쿠차 "Rim Light(림라이트) 만들기"
2015 데브루키 페차쿠차 "Rim Light(림라이트) 만들기"2015 데브루키 페차쿠차 "Rim Light(림라이트) 만들기"
2015 데브루키 페차쿠차 "Rim Light(림라이트) 만들기"은아 정
 
유니티 Rpg게임배경 스타트업 5번째 스터디 자료
유니티 Rpg게임배경 스타트업 5번째 스터디 자료유니티 Rpg게임배경 스타트업 5번째 스터디 자료
유니티 Rpg게임배경 스타트업 5번째 스터디 자료Je Lyoung Kim
 
NDC2015 유니티 정적 라이팅 이게 최선인가요
NDC2015 유니티 정적 라이팅 이게 최선인가요  NDC2015 유니티 정적 라이팅 이게 최선인가요
NDC2015 유니티 정적 라이팅 이게 최선인가요 Wuwon Yu
 
mudbox2014 Open Study #1
mudbox2014 Open Study #1mudbox2014 Open Study #1
mudbox2014 Open Study #1toppiccg
 
취업준비자들의 블루오션 3D 프린팅
취업준비자들의 블루오션 3D 프린팅취업준비자들의 블루오션 3D 프린팅
취업준비자들의 블루오션 3D 프린팅Chiwon Song
 
언차티드4 테크아트 파트1 톤맵핑&색보정
언차티드4 테크아트 파트1 톤맵핑&색보정언차티드4 테크아트 파트1 톤맵핑&색보정
언차티드4 테크아트 파트1 톤맵핑&색보정Dae Hyek KIM
 
라이트,라이트맵,라이트프로브,누가가장가볍고이쁠까
라이트,라이트맵,라이트프로브,누가가장가볍고이쁠까라이트,라이트맵,라이트프로브,누가가장가볍고이쁠까
라이트,라이트맵,라이트프로브,누가가장가볍고이쁠까GukHwan Ji
 
[2012 대학특강] 아티스트 + 프로그래머
[2012 대학특강] 아티스트 + 프로그래머[2012 대학특강] 아티스트 + 프로그래머
[2012 대학특강] 아티스트 + 프로그래머포프 김
 
3강 shader fx 기초실습_텍스쳐 조작
3강 shader fx 기초실습_텍스쳐 조작3강 shader fx 기초실습_텍스쳐 조작
3강 shader fx 기초실습_텍스쳐 조작JP Jung
 
물리기반렌더링 알레고리드믹 한국어 번역
물리기반렌더링 알레고리드믹 한국어 번역물리기반렌더링 알레고리드믹 한국어 번역
물리기반렌더링 알레고리드믹 한국어 번역Dae Hyek KIM
 

En vedette (20)

Paris Master Class 2011 - 07 Dynamic Global Illumination
Paris Master Class 2011 - 07 Dynamic Global IlluminationParis Master Class 2011 - 07 Dynamic Global Illumination
Paris Master Class 2011 - 07 Dynamic Global Illumination
 
명암 표현하기
명암 표현하기명암 표현하기
명암 표현하기
 
Metropolis Instant Radiosity
Metropolis Instant RadiosityMetropolis Instant Radiosity
Metropolis Instant Radiosity
 
Naman quantum cryptography
Naman quantum cryptographyNaman quantum cryptography
Naman quantum cryptography
 
Devtree lightmapping unity5_2_1stday
Devtree lightmapping unity5_2_1stdayDevtree lightmapping unity5_2_1stday
Devtree lightmapping unity5_2_1stday
 
Light
LightLight
Light
 
비실사렌더링-툰 쉐이딩
비실사렌더링-툰 쉐이딩비실사렌더링-툰 쉐이딩
비실사렌더링-툰 쉐이딩
 
[0806 박민근] 림 라이팅(rim lighting)
[0806 박민근] 림 라이팅(rim lighting)[0806 박민근] 림 라이팅(rim lighting)
[0806 박민근] 림 라이팅(rim lighting)
 
Gunz Postmortem
Gunz PostmortemGunz Postmortem
Gunz Postmortem
 
Mudbox2014 workflow
Mudbox2014 workflowMudbox2014 workflow
Mudbox2014 workflow
 
2015 데브루키 페차쿠차 "Rim Light(림라이트) 만들기"
2015 데브루키 페차쿠차 "Rim Light(림라이트) 만들기"2015 데브루키 페차쿠차 "Rim Light(림라이트) 만들기"
2015 데브루키 페차쿠차 "Rim Light(림라이트) 만들기"
 
유니티 Rpg게임배경 스타트업 5번째 스터디 자료
유니티 Rpg게임배경 스타트업 5번째 스터디 자료유니티 Rpg게임배경 스타트업 5번째 스터디 자료
유니티 Rpg게임배경 스타트업 5번째 스터디 자료
 
NDC2015 유니티 정적 라이팅 이게 최선인가요
NDC2015 유니티 정적 라이팅 이게 최선인가요  NDC2015 유니티 정적 라이팅 이게 최선인가요
NDC2015 유니티 정적 라이팅 이게 최선인가요
 
mudbox2014 Open Study #1
mudbox2014 Open Study #1mudbox2014 Open Study #1
mudbox2014 Open Study #1
 
취업준비자들의 블루오션 3D 프린팅
취업준비자들의 블루오션 3D 프린팅취업준비자들의 블루오션 3D 프린팅
취업준비자들의 블루오션 3D 프린팅
 
언차티드4 테크아트 파트1 톤맵핑&색보정
언차티드4 테크아트 파트1 톤맵핑&색보정언차티드4 테크아트 파트1 톤맵핑&색보정
언차티드4 테크아트 파트1 톤맵핑&색보정
 
라이트,라이트맵,라이트프로브,누가가장가볍고이쁠까
라이트,라이트맵,라이트프로브,누가가장가볍고이쁠까라이트,라이트맵,라이트프로브,누가가장가볍고이쁠까
라이트,라이트맵,라이트프로브,누가가장가볍고이쁠까
 
[2012 대학특강] 아티스트 + 프로그래머
[2012 대학특강] 아티스트 + 프로그래머[2012 대학특강] 아티스트 + 프로그래머
[2012 대학특강] 아티스트 + 프로그래머
 
3강 shader fx 기초실습_텍스쳐 조작
3강 shader fx 기초실습_텍스쳐 조작3강 shader fx 기초실습_텍스쳐 조작
3강 shader fx 기초실습_텍스쳐 조작
 
물리기반렌더링 알레고리드믹 한국어 번역
물리기반렌더링 알레고리드믹 한국어 번역물리기반렌더링 알레고리드믹 한국어 번역
물리기반렌더링 알레고리드믹 한국어 번역
 

Similaire à Build Lightmap system

Real-time near-field global illumination based on a voxel model
Real-time near-field global illumination based on a voxel modelReal-time near-field global illumination based on a voxel model
Real-time near-field global illumination based on a voxel modelJaeyun Lee
 
언리얼엔진4를 활용한 레이트레이싱 리얼타임 영상 제작하기
언리얼엔진4를 활용한 레이트레이싱 리얼타임 영상 제작하기언리얼엔진4를 활용한 레이트레이싱 리얼타임 영상 제작하기
언리얼엔진4를 활용한 레이트레이싱 리얼타임 영상 제작하기YOUNGJO CHO
 
Reflective Shadow Maps
Reflective Shadow MapsReflective Shadow Maps
Reflective Shadow MapsBongseok Cho
 
[shaderx5] 4.6 Real-Time Soft Shadows with Shadow Accumulation
[shaderx5] 4.6 Real-Time Soft Shadows with Shadow Accumulation[shaderx5] 4.6 Real-Time Soft Shadows with Shadow Accumulation
[shaderx5] 4.6 Real-Time Soft Shadows with Shadow Accumulation종빈 오
 
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019devCAT Studio, NEXON
 
실전프로젝트 정서경 양현찬
실전프로젝트 정서경 양현찬실전프로젝트 정서경 양현찬
실전프로젝트 정서경 양현찬현찬 양
 
Lighting in Stingray
Lighting in StingrayLighting in Stingray
Lighting in StingrayJaehoon Lee
 
7강 shader basic lighting_배포용 삭제버전
7강 shader basic lighting_배포용 삭제버전7강 shader basic lighting_배포용 삭제버전
7강 shader basic lighting_배포용 삭제버전JP Jung
 
포인트 셰도우
포인트 셰도우포인트 셰도우
포인트 셰도우Sukwoo Lee
 
[NDC17] 물리 기반 대기와 구름 만들기
[NDC17] 물리 기반 대기와 구름 만들기[NDC17] 물리 기반 대기와 구름 만들기
[NDC17] 물리 기반 대기와 구름 만들기JinHwan Kim
 
구세대 엔진 신데렐라 만들기 최종본 유트브2
구세대 엔진 신데렐라 만들기 최종본 유트브2구세대 엔진 신데렐라 만들기 최종본 유트브2
구세대 엔진 신데렐라 만들기 최종본 유트브2Kyoung Seok(경석) Ko(고)
 
[14.10.21] Far Cry and DX9 번역(shaderstudy)
[14.10.21] Far Cry and DX9 번역(shaderstudy)[14.10.21] Far Cry and DX9 번역(shaderstudy)
[14.10.21] Far Cry and DX9 번역(shaderstudy)해강
 
크게, 아름답게,빠르게, 일관되게 만들기: Just Cause 2 개발에서 배운 교훈들 (GPU Pro)
크게, 아름답게,빠르게, 일관되게 만들기: Just Cause 2 개발에서 배운 교훈들 (GPU Pro)크게, 아름답게,빠르게, 일관되게 만들기: Just Cause 2 개발에서 배운 교훈들 (GPU Pro)
크게, 아름답게,빠르게, 일관되게 만들기: Just Cause 2 개발에서 배운 교훈들 (GPU Pro)민웅 이
 
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal NetworksFaster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal NetworksOh Yoojin
 
논문-정규분포변환
논문-정규분포변환논문-정규분포변환
논문-정규분포변환jdo
 
Basic ofreflectance kor
Basic ofreflectance korBasic ofreflectance kor
Basic ofreflectance korchangehee lee
 
Depth buffershadow
Depth buffershadowDepth buffershadow
Depth buffershadowMoonLightMS
 
[1023 박민수] 깊이_버퍼_그림자_1
[1023 박민수] 깊이_버퍼_그림자_1[1023 박민수] 깊이_버퍼_그림자_1
[1023 박민수] 깊이_버퍼_그림자_1MoonLightMS
 

Similaire à Build Lightmap system (20)

Real-time near-field global illumination based on a voxel model
Real-time near-field global illumination based on a voxel modelReal-time near-field global illumination based on a voxel model
Real-time near-field global illumination based on a voxel model
 
언리얼엔진4를 활용한 레이트레이싱 리얼타임 영상 제작하기
언리얼엔진4를 활용한 레이트레이싱 리얼타임 영상 제작하기언리얼엔진4를 활용한 레이트레이싱 리얼타임 영상 제작하기
언리얼엔진4를 활용한 레이트레이싱 리얼타임 영상 제작하기
 
Reflective Shadow Maps
Reflective Shadow MapsReflective Shadow Maps
Reflective Shadow Maps
 
[shaderx5] 4.6 Real-Time Soft Shadows with Shadow Accumulation
[shaderx5] 4.6 Real-Time Soft Shadows with Shadow Accumulation[shaderx5] 4.6 Real-Time Soft Shadows with Shadow Accumulation
[shaderx5] 4.6 Real-Time Soft Shadows with Shadow Accumulation
 
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
 
실전프로젝트 정서경 양현찬
실전프로젝트 정서경 양현찬실전프로젝트 정서경 양현찬
실전프로젝트 정서경 양현찬
 
Lighting in Stingray
Lighting in StingrayLighting in Stingray
Lighting in Stingray
 
7강 shader basic lighting_배포용 삭제버전
7강 shader basic lighting_배포용 삭제버전7강 shader basic lighting_배포용 삭제버전
7강 shader basic lighting_배포용 삭제버전
 
포인트 셰도우
포인트 셰도우포인트 셰도우
포인트 셰도우
 
[NDC17] 물리 기반 대기와 구름 만들기
[NDC17] 물리 기반 대기와 구름 만들기[NDC17] 물리 기반 대기와 구름 만들기
[NDC17] 물리 기반 대기와 구름 만들기
 
구세대 엔진 신데렐라 만들기 최종본 유트브2
구세대 엔진 신데렐라 만들기 최종본 유트브2구세대 엔진 신데렐라 만들기 최종본 유트브2
구세대 엔진 신데렐라 만들기 최종본 유트브2
 
[14.10.21] Far Cry and DX9 번역(shaderstudy)
[14.10.21] Far Cry and DX9 번역(shaderstudy)[14.10.21] Far Cry and DX9 번역(shaderstudy)
[14.10.21] Far Cry and DX9 번역(shaderstudy)
 
크게, 아름답게,빠르게, 일관되게 만들기: Just Cause 2 개발에서 배운 교훈들 (GPU Pro)
크게, 아름답게,빠르게, 일관되게 만들기: Just Cause 2 개발에서 배운 교훈들 (GPU Pro)크게, 아름답게,빠르게, 일관되게 만들기: Just Cause 2 개발에서 배운 교훈들 (GPU Pro)
크게, 아름답게,빠르게, 일관되게 만들기: Just Cause 2 개발에서 배운 교훈들 (GPU Pro)
 
7_조명.pptx
7_조명.pptx7_조명.pptx
7_조명.pptx
 
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal NetworksFaster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
 
논문-정규분포변환
논문-정규분포변환논문-정규분포변환
논문-정규분포변환
 
High dynamic range
High dynamic rangeHigh dynamic range
High dynamic range
 
Basic ofreflectance kor
Basic ofreflectance korBasic ofreflectance kor
Basic ofreflectance kor
 
Depth buffershadow
Depth buffershadowDepth buffershadow
Depth buffershadow
 
[1023 박민수] 깊이_버퍼_그림자_1
[1023 박민수] 깊이_버퍼_그림자_1[1023 박민수] 깊이_버퍼_그림자_1
[1023 박민수] 깊이_버퍼_그림자_1
 

Dernier

Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Wonjun Hwang
 
캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스
 
Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Wonjun Hwang
 
A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)Tae Young Lee
 
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Kim Daeun
 
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionMOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionKim Daeun
 

Dernier (6)

Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)
 
캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차
 
Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)
 
A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)
 
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
 
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionMOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
 

Build Lightmap system

  • 1. Lightmap 시스템 구축하기 Ntreev Soft 황재식
  • 2. Agenda • Lightmap 관련 기술 소개 – Unwrapping 관련 기술 소개 – Radiosity 관련 기술 소개 • 실제 게임 적용 사례 소개
  • 3. Lightmap이란? • 라이트 정보를 담고 있는 이미지 • Irradiance를 저장하 고 있기 때문에 Irradiance map이 더 정확한 표현.
  • 7. 패치(Patch) • Lighting 계산을 위한 최소 단위 • 각각의 Patch는 Lightmap의 1픽셀에 대응 • 패치가 많을수록 보다 정교한 계산 가능 – Lightmap 해상도가 커짐 – 계산 시간이 더 오래 걸림
  • 12. Atlas, Chart • Atlas ≥ Chart Chart Atlas
  • 13. 좋은 Unwrapping 조건 • 균일한 Patch 사이즈 • 왜곡이 적어야 한다. – 내각의 크기와 세 변의 길이 비율이 Unwrapping 된 후에도 비슷하게 보존될수록 왜곡이 적다라고 할 수 있다. Large Chart Low Distortion
  • 14. 알고리즘 종류 • Iso-charts • LSCM • ABF++ • D-charts • MCGIM • 기타 등등
  • 15. Iso-charts • 빠르고 효율적인 Chart 생성 • UVAtlas in DirectX9 – D3DXUVAtlasCreate, D3DXUVAtlasPartition, D3DXUVAtlasPack – uvatlas.exe • Halo3에서의 라이트맵에서도 사용됨.
  • 16. Iso-charts 과정 • 서피스 분포 분석 • 스트레치 최적화 • 서피스의 분포를 고려해서 묶는다. • 차트의 경계를 최적화한다. • 스트레치 기준을 충족 시킬 때까지 차트를 재귀 적으로 계속 나눈다. • 패킹을 해서 Atlas로 만든다.
  • 18. Baking • Radiosity 알고리즘을 이용, Lightmap의 각 각의 픽셀에 Irradiance를 계산해서 저장하는 과정. • 차례 – Radiosity 소개 – 용어 설명 – Radiosity 알고리즘 소개
  • 19. Radiosity • Diffuse 머티리얼을 가지는 서피스와 광원, 혹은 두 Diffuse 서피스 사이의 빛의 상호 작용을 계산하는 방식. • Diffuse Material만 다루기 때문에 카메라에 독립적이다. • Direct Lighting과 Indirect Lighting 계산
  • 20. Direct Lighting • 태양이나 전구 같이 직접 빛을 내어 물체를 비추는 광원에 대해서 계산을 하는 것 • 장면에 가장 밝은 빛을 제공하고 그림자를 생성 한다.
  • 21. Indirect Lighting • 다른 오브젝트를 비추기 전에 이미 반사되거나 다른 표면에서 부딪혀서 나온 빛을 계산한다. • 장면의 구석구석을 밝히거나 공간을 채우는 빛을 만든다. • Color Bleeding 효과
  • 22. 용어설명 • Flux • Solid Angle • Radiance • Irradiance • Radiosity • Form Factor • Monte Carlo Method • Russian Roulette
  • 23. Flux • 단위 시간 동안 표면을 통과하는 총 에너지 량 • 단위 : J/s, W(watt) • 보통 Φ 표현 • 다른 말로 Radiant Power
  • 25. Radiance • 단위 면적, 단위 Solid Angle에 대한 Flux 량 • L=d2Φ/(dwdAㅗ )= d2Φ /(dwdAcosΘ) dAㅗ dA
  • 26. Irradiance • 표면의 단위 면적에 들어오는 Flux 량 전 방향으로 들어오는 모든 Radiance의 합 • 단위 : W/m2 • E = dΦ/dA (A:표면적)
  • 27. Radiosity • 표면의 단위 면적에서 나가는 Flux 량 • 단위 : W/m2 • M = B = dΦ/dA (A:표면적)
  • 28. Form Factor • 한 패치에서 발산된 에너지 중 다른 패치에 도달 한 에너지 비율
  • 29. Form Factor Self-emitted reflectivity total radiosity radiosity Form factor
  • 30. Monte Carlo Method • 통계 확률 이론에 기반을 둔 개념으로 난수를 발생 시켜 원하는 값의 확률적 분포나 수치를 구하는 방 법 • 예1) π 구하기 N = 전체 찍힌 점의 수 Nc = 부채꼴 안의 점의 수 A = 1(사각형 면적) Ac = π /4(부채꼴의 면적) Ac /A = π /4 =Nc /N Π = 4Nc/N
  • 31. Monte Carlo Method 예2 • 광원에서 발사되는 Ray나 Photon의 발생 위치와 발사 방향을 랜덤하게 결정하는데 사용하거나 반사면에서 생존 여부를 가릴 때 사용한다.
  • 32. Monte Carlo Estimator • Monte Carlo 방법을 이용해서 적분의 근사치 를 구할 수 있다. 적분 Estimator • 샘플링 개수(N)가 많을수록 실제 해에 가까워진 다.
  • 33. Importance Sampling • Monte Carlo Estimator을 구할 때 표본을 실제 피적분 함수 모양에 가깝게 샘플링 하면 더 적은 수 의 샘플링으로 실제 해에 가까운 값을 얻을 수 있다. • 예1) 직접광에 의한 라이팅을 계산할 때 패치에서 광원 방향으로 더 많은 Ray를 생성한다. • 예2) 간접광에 의한 라이팅을 계산할 때 패치의 노 멀과 가까운 방향으로 더 많은 Ray을 생성한다.
  • 34. Russian Roulette • Indirect Lighting 계산에서 Ray나 Photon 을 몇번이나 반사시킬지 정할 수 있어야 한다. – 반사 횟수로 제한 – Power가 일정 수치 이하로 내려갈 경우 소멸 • 위 두 가지 방식은 장면 내의 전체 에너지를 보존시켜주 지 못한다. – 매번 반사될 때마다 Russian Roulette 이용 • 에너지를 보존시켜준다.
  • 35. Russian Roulette • q에 의해서 살아남은 샘플에 가중치가 부여되어서 총 에너지의 손실이 없는 결과를 얻을 수 있다. • q에 의해서 Ray나 Photon의 Bounce 횟수를 조 절할 수 있다.
  • 36. Russian Roulette // Possibly terminate every light path if( nIntersections > 2 ) { float q = 0.5f; if( RandomFloat() > q ) break; irradiance /= q; } 어두운 씬에서는 반사가 적게 이뤄져도 되기 때문에 q를 크게 설정해서 반사가 적게 이뤄지도록 하고 밝은 씬에서는 q를 크게 셋팅해서 많은 수의 반사가 이뤄지도록 할 수 있다.
  • 37. Radiosity 알고리즘 분류 - 1 Scene Monte Carlo Method Rendering Ray-tracing 방식 방식 Final Gathering Path-tracing 방식 Classic Stochastic Jacobi Radiosity Radiosity Irradiance Cache Photon mapping Instant Radiosity
  • 38. Classic Radiosity • 모든 패치 사이의 Form Factor를 미리 구해줘야 한다. • 많은 저장 공간이 필요하고 시간이 오래 걸리기 때문에 비효율적 • n개의 패치가 있을 때 n2 * 0.5 번의 Form Factor 연산을 미리 해줘 야 한다. • 계산 도중 중간 결과를 보기 힘들다.
  • 39. Monte Carlo Method • Form Factor를 미리 구할 필요가 없다. • Classic 방식에 비해서 더 적은 저장 공간과 짧 은 계산 시간으로 괜찮은 퀄리티의 결과물을 얻 을 수 있다. • 중간에 결과를 확인해 볼 수 있다.
  • 40. Scene Rendering 방식 • 패치에서 노멀 방향으로 보이는 씬을 렌더링 한 다 음 렌더링 된 텍스쳐의 각각의 픽셀을 패치로 들어 오는 Radiance로 간주하고 Irradiance를 구하 는 방식. • Ray-tracing 같은 복잡한 알고리즘을 알 필요가 없고 별도로 Form Factor를 구하지 않아도 된다. • 모든 패치를 광원으로 간주한다.
  • 41. Scene Rendering 방식 2 3 1 4 5 6
  • 43. Scene Rendering 방식 • Hemisphere map 대신 Hemicube map사용 Distance Map Lambert's Cosine Map
  • 44. Radiosity 알고리즘 분류 - 2 Gathering Shooting 속도개선 Scene Rendering Stochastic Jacobi Radiosity Ray-tracing 방식 Irradiance Photon Mapping Cache Final Gathering Path-tracing 방식 Instant Radiosity
  • 45. Shooting • 한 패치에서 발산된 에너지에 영향을 받는 다른 주변 패치의 에너지 상태를 업데이트 한다. • 계산 결과를 빨리 볼 수 있지만 작은 패치에 대해 서 노이즈 결함을 발생 시킨다.
  • 46. Gathering • 한 패치에서 보이는 다른 패치로부터 발산되는 에너지를 모아서 패치의 에너지 상태를 업데이트 한다. • 노이즈 결함을 없애서 렌더링 퀄리티를 올리는데 사용될 수 있다.
  • 47. Ray-traced 방식 Gathering Shooting 속도개선 Scene Rendering Stochastic Jacobi Radiosity Ray-tracing 방식 Irradiance Photon Mapping Cache Final Gathering Path-tracing 방식 Instant Radiosity
  • 48. Ray-tracing 방식 • Direct Lighting – 각각의 패치에서 광원을 향해 Ray을 발사, 1차 Lighting 정보를 생성한다. – 그림자 생성 • Indirect Lighting – Final Gathering 단계, 패치 주변으로 Ray을 발사해서 Radiance 정보를 수집한다.
  • 49. Direct Lighting 의사코드 directIllumination(x) estimateRadiance = 0; for all shadow rays { generate point y on light source estimateRadiance += Le(y, yx) * Reflectance * G(x,y) * V(x,y) / pdf(y); } extimateRadiance = estimateRadiance / #shadowRays; return(estimateRadiance) V(x,y) : 패치 x에서 패치 y가 보이는지 여부 G(x,y) =
  • 51. Final Gathering Gathering Shooting 속도개선 Scene Rendering Stochastic Jacobi Radiosity Ray-traced 방식 Irradiance Photon Mapping Cache Final Gathering Path-tracing 방식 Instant Radiosity
  • 52. Final Gathering • 이미 계산된 Radiosity를 Ray-tracing을 이용해서 더 정확하고 부드러운 결과를 만들어 냄. • Indirect Lighting계산하기 위해 사용되거나 Shooting, Photon mapping 계산 후 2pass에서 Rendering 퀄리티를 높이기 위해서 사용
  • 53. Sampling • Hemisphere Sampling을 이용, 패치에서 반구 방향으로 무작위로 Ray 발사. • 충돌된 가장 가까운 지점의 Radiance을 가져온다. • Importance Sampling을 이용해서 패치의 노멀 방향에 가까운 방향의 Ray를 더 많이 발사하면 더 적은 연산으로 동일한 결과를 얻을 수 있다.
  • 55. Path-tracing 방식 Gathering Shooting 속도개선 Scene Rendering Stochastic Jacobi Radiosity Ray-tracing 방식 Irradiance Photon Mapping Cache Final Gathering Path-tracing 방식 Instant Radiosity
  • 56. Path-tracing 방식 • 실질적으로 반사가 수행하는 Ray는 하나만 생성하고 나머지 Ray는 주변의 Radiance를 수집하는 역할만 한다. • Ray-tracing 방식은 bounce될 때에도 여러 개의 반사Ray가 생성된다. • Path-tracing 방식은 Final Gathering을 수행 한 후 간접광을 빠르게 한번 더 계산할 때 주로 사용된다. 한 방향으로만 브랜칭 되기 때문에 Ray-Tracing 방식보다 속도는 빠르지만 최종 렌더링 퀄리티는 떨어진다.
  • 57. Stochastic Jacobi Radiosity Gathering Shooting 속도개선 Scene Rendering Stochastic Jacobi Radiosity Ray-traced 방식 Irradiance Photon mapping Cache Final Gathering Path-tracing 방식 Instant Radiosity
  • 58. Stochastic Jacobi Radiosity • 처음pass에서는 광원에서 Ray를 발사해서 주변 패치의 에너지 상태를 업데이트 시키고 이후 pass 에서는 각각의 패치에서 반사되는 빛을 고려해서 주변 패치의 에너지 상태를 업데이트 한다. • 패치와 광원사이의 Form Factor는 광원에서 발사된 전체 Ray수와 패치가 받은 Ray수의 비율로 나타낸다. Fij = Nij/Ni Ni는 패치i 에서 발사된 Ray 수, Nij는 패치 i에서 발사된 Ray중 패치 j에 도달한 Ray 수
  • 59. Ray 생성 Local line – 1pass Global line – 2,3,4…pass
  • 61. Irradiance Cache Gathering Shooting 속도개선 Scene Rendering Stochastic Jacobi Radiosity Ray-tracing 방식 Irradiance Photon Mapping Cache Final Gathering Path-tracing 방식 Instant Radiosity
  • 62. Irradiance Cache • 인접한 패치의 Irradiance를 보간해서 Patch 의 Irradiance를 구한다. • Direct Lighting의 경우 패치사이의 Irradiance 변화량이 큰 곳이 많이 존재하지만 Indirect Lighting의 경우에는 상대적으로 인 접한 패치끼리의 변화량이 적은 곳이 대부분이기 때문에 이러한 보간 연산이 가능하다.
  • 63. 가중치 부여 • 보간에 참여하는 각각의 패치에 가중치를 부여한다. • 거리가 작고 노멀 벡터의 내적과 주변 지오메트리와 거리가 클수록 높은 가중치를 갖게 된다.
  • 64. 버림 조건 • 다음과 같은 조건을 갖는 인접한 패치는 무시된 다. – 노멀 벡터의 차이가 너무 크다. – 주어진 패치보다 앞에 존재한다. n n E(p,n) E(p,n) p p’ p p’
  • 65. Irradiance 계산 - 1 • 패치 사이 변화가 큰 부분에서는 Irradiance를 직접 계산하고 계산된 값을 Octree 구조를 갖는 Irradiance Cache에 저장한다. http://www.rorydriscoll.com/2009/01/18/irradiance-caching-part-1/
  • 66. Irradiance 계산 - 2 • 변화량이 작은 부분에서는 Irradiance Cach e를 이용, 주변의 패치를 검색 한 후 아래 식으로 Irradiance를 보간한다. 이 결과 역시 Cache 에 저장한다.
  • 67. Photon Mapping Gathering Shooting 속도개선 Scene Rendering Stochastic Jacobi Radiosity Ray-tracing 방식 Irradiance Photon Mapping Cache Final Gathering Path-tracing 방식 Instant Radiosity
  • 68. Photon Mapping • Two-Pass 알고리즘 – 1Pass • 광원에서 Photon 발산 • 서피스와 충돌, 반사 • 충돌된 Photon을 Photon map에 저장 • 패치 별로 주어진 반경 안에 있는 Photon을 검색해서 Irradia nce 계산(검색된 Photon의 Flux을 모두 더한 후 원의 면적 으로 나눠준다.) – 2Pass • Final Gathering • 적은 비용으로 Caustic 효과를 낼 수 있다.
  • 69. Photon Mapping • Photon : Flux 운반체 • Photon map – 서피스와 부딪힌 지점의 Photon 정보 저장 – Balanced Kd-Tree – Global Photon Map(Direct, Indirect) – Caustic Photon Map
  • 70. Photon State Machine Specular Caustic Nonspecular Specular Emission Direct Specular/ Caustic Nonspecular Nonspecular Indirect Specular/ Nonspecular
  • 72. Instant Radiosity Gathering Shooting 속도개선 Scene Rendering Stochastic Jacobi Radiosity Ray-tracing 방식 Irradiance Photon mapping Cache Final Gathering Path-tracing 방식 Instant Radiosity
  • 73. Instant Radiosity • Direct, Indirect Lighting을 Point 광원으로 표현한다. • Diffuse로 이뤄진 Scene에서만 가능하다. • GPU Rendering을 이용해서 구현 가능하다. (Keller’s Paper)
  • 75. 개발 사례 • Unwrapping : UVAtlas • Baking : Beast
  • 76. Unwrapping 차례 • UVAtlas 소개 • UVAtlas 에서 사용되는 주요인자 – Stretch – Gutter Width – IMT • Lightmap 압축 • Instancing
  • 77. UVAtlas 소개 • DirectX에서 제공하는 Iso-charts 알고리즘을 이용한 UV Unwrapping API • 용도 – Normal/displacement mapping – Texture-space PRT simulations and light ma ps – Surface painting – Texture-space lighting
  • 78. UVAtlas 주요 인자 • Stretch • Gutter Width • Integrated Metric Tensors(IMT)
  • 79. Stretch - 1 • Chart를 어느 정도로 펼 것인가? • 0~1 사이 값. 0.16667이 기본값. 0 0.1 0.1667 이상
  • 80. Stretch – 2 CSG맵은 Stretch가 0에 가까 일반 Mesh로 이루어진 맵은 울수록 결과가 좋았음 0.16정도 했을 때 괜찮았음.
  • 81. Gutter Width • Chart 사이 너비 • Padding이라도고 함. • Multi Sampling시 인접한 Chart의 색을 침범하지 못하도록 하는 역할. 2 30
  • 82. Integrated Metric Tensors - 1 • Texture-space에서 삼각형을 어떻게 펼 것인지 정의 • 픽셀의 색 변화량이 큰 부분에 더 많은 공간을 할당하는 것이 가능(Lightmap compression in halo3)
  • 83. Integrated Metric Tensors - 2 • D3DX IMT 관련 함수를 이용해서 IMT 생성 – D3DXComputeIMTFromPerVertexSignal – D3DXComputeIMTFromPerTexelSignal – D3DXComputeIMTFromSignal – D3DXComputeIMTFromTexture • 유저가 임의로 생성한 IMT도 Chart를 생성할 때 사용 가능함.
  • 84. Lightmap 압축 Lightmap compression in Halo3
  • 85. Lightmap 압축 Lightmap compression in Halo3
  • 86. Mesh와 Instance • Mesh는 Vertex, Face, Material 정보 • Instance는 Mesh ID와 Transform 정보를 가지고 있음. • 한 씬에 동일한 Mesh가 여러 개 존재할 때 Instance로 관리하면 자원을 효율적으로 관리 할 수 있음.
  • 87. Instancing • 동일한 Mesh가 여러 개 존재 할 때 오직 한 Mesh에 대해서만 Chart를 만들고 다른 Instance는 이미 만들어진 Chart사용. • Instance는 Lightmap에서의 UV 시작위치만 저장.
  • 88. Baking 차례 • Radiosity 미들웨어 소개 • Beast 소개 • 렌더링 샘플 • 퀄리티를 높이기 위한 팁 • 동영상
  • 89. Radiosity 미들웨어 • Beast • Lightsprint • Enlighten • 기타 등등
  • 90. Beast 소개 • Baking 전용 미들웨어 • Illuminate Labs에서 개발 • 대표작 : Mirror’s Edge • Montel Carlo 방식에 기반한 렌더러 – Final Gathering, Path tracing, Photon mapping, Irradiance Cache 등을 지원
  • 95. 퀄리티를 높이기 위한 간단한 팁 • 라이트맵 바탕색을 전체 계산된 라이트맵 차트의 색과 비슷하게 하라. • 계산이 끝난 후에 차트의 Edge를 1~2픽셀 정도 바깥으로 늘려라.
  • 97. 참고자료 • Advanced Global Illumination • Physically Based Rendering • Light map compression in halo3
  • 98. Q&A 이메일 주소 : youcu81@gmail.com 블로그 : emptymind.tistory.com