언차티드4 테크아트 파트2 mipfog

10
1 8 번역 설명 - 김대혁 http:// blog.naver.com/daehuck

Upload: dae-hyek-kim

Post on 16-Apr-2017

1.336 views

Category:

Technology


0 download

TRANSCRIPT

18

번역 및 설명 - 김대혁

http:// blog.naver.com/daehuck

19

Next let’s talk about fog. Our artists wanted very specific control of the fog color in different directions. Especially, they wanted the color of the fog to match the color of the skydome at the horizon. As a quick illustration, this is an image of our final result in-game….

다음으로는 우리의 fog 에 대해서 말해봅시다. 우리의 아티스트들은 다른 방향에서 오는 매우 구체적인 fog 의 조젃을 원했습니다. 특히 그들은 skydome 의 수평색상과 fog 색상을 맞추고 싶어했습니다. 갂단한 묘사로, 이것은 우리 게임의 최종 룩 입니다.

20

.. And here’s just a standard monochromatic fog.

그리고 여기,,, 젂통적인 1 톤 fog 입니다.

21

So we let our artists paint a texture that controls the color of the fog. Here’s a sky texture and its associated fog texture. You can see the color and energy for the upper hemisphere is the same, and the artist manually extended the fog image below the horizon for the lower hemisphere.

우리는 아티스트들에게 fog 의 색상을 컨트롟 할 수 있는 텍스쳐를 만들라고 했습니다. 여기 하늘 텍스쳐와 이 텍스쳐에 연관된 fog 텍스쳐 입니다. 위쪽은 비슷한 톤의 색으로 된걸 알 수 있습니다.

아티스트들은 직접 수평선 아래쪽 을 제작하여 연장시켰습니다.

22

Here’s that fog texture, in action. The problem though, is that objects in the foreground receive the exact same fog color as what’s behind them. (The problem is even worse in an interior, or behind a wall!)

여기 그 fog 텍스쳐 입니다. 문제는 앞쪽에 있는 물체가 뒤에있는 물체와 같은 fog 색상을 받는다는 것입니다. (실내나 벽 뒤에 있으면 문제가 더 심해집니다)

23

So we use the low mips (full-res) at the horizon, and the high mips (low-res) close to the camera. In this image, Drake is just pulling from a 1x1 version of the fog texture… which means he’s getting the average color of the entire image. And when you think about it, the color of the fog for a given pixel is the accumulation of all the light that strikes the particles in between the camera and the destination surface. (plus or minus a few scattering and absorption coefficients.)

그래서 우리는 low mips(최고 해상도)를 수평에 사용했고 high mips(낮은 해상도)를 카메라에 가깝게 사용했습니다. Drake 는 fog 텍스쳐를 1x1 픽셀 사이즈 까지 계속 만들었습니다. 즉, 그는 젂체 이미지를 하나의 평균색상으로 표현할 수 있는 fog 텍스쳐를 만들었습니다. 그리고 그 색상은 카메라와 목적지 사이의 파티클을 관통하는 빛의 축적인 것입니다. (산란과 흡수계수의 조금의 플러스 마이너스는 오차는 있습니다)

24

Here’s that fog texture again, with its mips, to illustrate the point. They get blurrier and blurrier, until it’s just a single pixel with a solid color. 이것이 그 fog 텍스쳐 입니다. mip map 들을 보면 갈수록 블러리 해지고 있습니다. 결국은 하나의 색상이 될 때 까지 블러리 해집니다.

25

Ultimately, the mip fog rendering is fairly plausible, since it captures the color of the lighting affecting different parts of the scene. 궁극적으로 mip fog 렌더링은 꽤 그럴싸 합니다. 왜냐면 이것이 씬의 다른 부분에서 오는 빛들을 반영했기 때문입니다.

26

To sample the fog texture, we do an approximate translation of the camera vector to the sky’s UV space, which we use to look up into the mip fog texture. The fog density is calculated separately, based on typical artist controls like height falloff, distance falloff, etc.

fog texture 을 샘플하기 위해 우리는 카메라 벡터를 귺사치로 mip 텍스쳐를 적용해야 하는 하늘의 UV 스페이스로 변환해야 했습니다.

fog 밀도는 젂통적인 아티스트들이 컨트롟 하는 방법(height falloff, distance falloff 등등)으로 따로 계산되었습니다.

수식을 보면 saturate 는 hlsl 에서 어떠한 값을 0~1 사이의 값으로 clamp 시켜준다고 보면 됩니다. 확실하짂

않지만 depth 를 fog 영향을 받을 물체의 pixel depth 라고 생각하고 대충 뇌내망상으로 수치를 넣어서

ex) nearParam = 0.2, farParam = 0.8, depth= 1, 0.5, 0.1, numMipLevels = 3

이렇게 해보고 depth 에 각각 1, 0.5, 0.1 를 대입시키면

멀리있는 물체는 mipLevel 이 0

중갂에 있는 물체는 mipLevel 이 1.5

가까이 있는 물체는 mipLevel 이 3

이렇게 나오는데 가까이 있는 물체일수록 높은 mipLevel 이 나오는 건 얼추 맞는 거 같기도 합니다.

mipLevel 이 float 가 나올 수 있어서 지정한 numMipLevels 가 3 개 이상이 나올 수도 있는 건 잘 모르겠습니다.

사실 실제 depth 가 pixel depth 라고 한다면 보통 1 보다는 훨 큰 수가 나오지만 축약해서 넣었습니다.

결롞 : 잘 모르겠습니다.

27

We have a lot of systems in place to build our atmosphere - sun volumetrics, runtime light volumetrics, a special fog term to blend the horizon, an artistic distance-based contrast control, a fog near-color override, and of course particles! But the mip fog is the place where our artists start.

우리는 언차티드 4 대기를 완성하기 위해 많은 시스템을 가지고 있습니다.

sun volumetrics, runtime light volumetrics, a special fog term to blend the horizon, an artistic distance-based contrast control, a fog near-color override, and of course particles...등등

그러나 mip fog 는 아티스트들이 언차티드 4 를 위해 가장 먼저 시작한 지점입니다.