[RT in One Weekend Series 13] Where Next? (번역)

목차: Series 1: Index and Overview (Link) 이전 글: Series 12: Defocus Blur (Link) 먼저 Random 하게 많은 Sphere(구)를 그려서 이번 글에 사용할 표지 이미지를 만들어본다. 아래 코드 1은 Random 하게 많은 구를 그리기 위한 Main 코드이다. 코드 1: 많은 수의 구를 그리기 위한 Main 코드 #include <iostream> #include <fstream> #include “mkray.h” #include “mkhitablelist.h” #include “float.h” #include … Read more

[RT in One Weekend Series 12] Defocus Blur (번역)

목차: Series 1: Index and Overview (Link) 이전 글: Series 11: Poisionable Camera (Link) 다음 글: Series 13: Where Next? (Link) 이번 RT 시리즈의 마지막 Feature는 Defocus Blur이다. Photographers(사진사?)는 Defocus Blur Feature를 보통 “Depth of Field”라고 한다. 실제 카메라를 사용해서 사진을 찍으면 Defocus Blur 현상이 나타나는 이유는 카메라 렌즈가 구멍(Big Hole)으로 만들어져있기 때문이다 (현재 우리가 구현한 코드는 아주 작은 … Read more

[RT in One Weekend Series 11] Positionable Camera (번역)

목차: Series 1: Index and Overview (Link) 이전 글: Series 10: Dielectrics (Link) 다음 글: Series 12: Defocus Blur (Link) 이전 글에서 작성한 Diselectrics와 동일하게 Camera 역시 Debugging 하는데 어려움이 많다고 한다. 그래서 출처 1에서는 Camera 코드를 순차적으로 작성하여서 Debugging Overhead를 최소화하였다. 가장 먼저 FOV (Field Of View/Field Of Vision)을 조절하는 코드를 작성한다. 대부분의 게임과 동일하게 우리가 그리는 … Read more

[RT in One Weekend Series 10] Dielectrics + Snell’s Law (번역)

목차: Series 1: Index and Overview (Link) 이전 글: Series 9: Metal (Link) 다음 글: Series 11: Positionable Camera (Link) 투명한 Surface를 가진 물체 (물, 다이아몬드, 컵 등)을 Dielectric(유전체)이라고 한다. Ray가 투명한 Surface를 가진 물체와 Intersection(부딪히게) 되면 Ray는 Reflection(반사)와 Refraction(굴절)이 발생한다. 우리가 구현하고 있는 Ray Tracer에서는 Ray가 투명한 Surface를 가진 물체를 만나면 Ray를 반사하거나, 굴절시키는 … Read more

[RT in One Weekend Series 9] Metal (번역)

목차: Series 1: Index and Overview (Link) 이전 글: Series 8: Diffuse Materials (Link) 다음 글: Series 10: Dielectrics (Link) 이제 여러 개의 다른 Material을 가진 Object를 그려볼 차례이다. Material이 다른 여러 종류의 Object를 그리기 위해서는 Design Decision이 필요하다. 한 가지 방법은 Universal Material Class를 생성하고 필요 없는 Parameter를 0으로 설정하는 방법이다. 다른 방법은 Abstract Material Class를 생성하고 해당 클래스는 Ray의 반사 … Read more

[RT in One Weekend Series 8] Diffuse Materials (번역)

목차: Series 1: Index and Overview (Link) 이전 글: Series 7: Anti-aliasing (Link) 다음 글: Series 9: Metal (Link) MK: 이 장을 여러 번 읽었지만 이해를 정확하게 하지 못한 부분이 몇 군데 존재한다. 추가로 Diffuse (Matte) Material은 무광택 물체를 의미하는 것 같다. 이번 글에서 Diffuse (Matte) Material을 무광택 물체(Object)로 작성하였다. 추가로 출처 2에서 Diffuse Lighting이란 개념을 소개한다. Diffuse Material과 … Read more

[RT in One Weekend Series 7] Anti-aliasing (번역)

목차: Series 1: Index and Overview (Link) 이전 글: Series 6: Surface Normals and Multiple Objects (Link) 다음 글: Series 8: Diffuse Materials (Link) 이번 장에서는 Anti-Aliasing에 대한 설명을 작성한다. 예전에 Anti-Aliasing에 대한 글을 작성한 적이 있다 (출처 2). Anti-Aliasing을 간단히 설명하면 Object(물체)의 Edge 부분을 부드럽게 만드는 방법이다. 예를 들어 사진을 찍을 경우 물체의 Edge가 부드럽게 표현된다. Object Edge … Read more

[RT in One Weekend Series 6] Surface Normals and Multiple Objects (번역)

목차: Series 1: Index and Overview (Link) 이전 글: Series 5: Adding a Sphere (Link) 다음 글: Series 7: Antialiasing (Link) 이번 글에서는 구의 표면 색상값을 Normal Vector 값으로 변경하는 코드를 작성한다. MK: 그래픽에서 Normal Vector 값은 아주 많이 사용된다. 특히 Light (빛) 색상을 결정하는 단계에서 아주 기본적인 개념이다. 그림 1: 구의 Normal Vector 값을 계산하는 방법 그림1은 구에서 … Read more

[RT in One Weekend Series 5] Adding a Sphere (번역)

목차: Series 1: Index and Overview (Link) 이전 글: Series 4: Rays, a Simple Camara, and Background (Link) 다음 글: Series 6: Surface Normals and Multiple Objects (Link) Ray Tracer 예제에서 구(sphere)를 사용하는 경우가 많다고 한다. 가장 큰 이유는 Ray가 Travel을 할 때 구에 Hit을 했는지 여부를 판단하는 데 있어서 계산식이 아주 직관적이기 때문이다. 예를 들어서 특정 포지션 (cx, cy, cz)에 구가 … Read more

[RT in One Weekend Series 4] Rays, a Simple Camara, and Background (번역)

목차: Series 1: Index and Overview (Link) 이전 글: Series 3: The “vec3” Class (Link) 다음 글: Series 5: Adding a Sphere (Link) Ray Tracer의 가장 기본은 Ray이다. 보통 모든 Ray Tracer은 Ray Class를 가진다. Ray Class는 Ray가 도달하는 위치의 최종 색상 값을 계산한다. 출처 1의 기사(Article)에서는 Ray를 p(t) = A + t*B 함수로 정의하였다. p는 3D Position(위치)을 의미하며, t는 Float Number를 … Read more