언차티드4 테크아트 파트3 microshadowbrdf term

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

Upload: dae-hyek-kim

Post on 16-Apr-2017

901 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: 언차티드4 테크아트 파트3 MicroShadowBRDF Term

1

번역 및 설명 - 김대혁

http:// blog.naver.com/daehuck

Page 2: 언차티드4 테크아트 파트3 MicroShadowBRDF Term

2

First, as a review let’s talk about data: geometry, texture, and subpixel. Something like Albedo/Color or Specular IOR is pretty scale-agnostic. When we go from high- poly geo to low-poly, we typically capture the difference in a Normal map and Ambient Occlusion map.

첫 번째로, data 에 대해 말해봅시다. 지오메트리, 텍스쳐, 서브픽셀

Albedo/Color 나 스펙큘러 반사율은 크기에 구속 받지 않습니다. 우리가 하이폴리곢에서 로우폴리곢으로 오브젝트를 변환할 때 우리는 전통적으로 노말맵과 AO 맵에서 차이점들을 캡춰합니다.

Page 3: 언차티드4 테크아트 파트3 MicroShadowBRDF Term

30

When we have geometry or texture data that becomes subpixel, that’s essentially our BRDF, captured in parameters like Roughness or Anisotropic. 우리의 지오메트리나 텍스쳐가 subpixel 이 될 때 Roughness 나 Anisotropic 같은 패러미터로 변환되는데, 그겂이 본질적으로 우리의 BRDF(양 방향 분포 함수)입니다.

Page 4: 언차티드4 테크아트 파트3 MicroShadowBRDF Term

31

At each reduction step we lose data, and the error in the amount of energy increases. By providing new types of input data and spending some ALU, we can improve on each of these phenomena. For example, by supplying a heightmap, we can perform parallax occlusion and parallax shadowing at the texture level. The point is, it’s useful to examine these phenomena independently, because there may be ways to bring them back.

각각의 제거 과정에서 우리는 데이터를 잃습니다. 에너지 총량이 증가하는 에러도 얻습니다. 새로운 타입의 인풋데이타를 제공하고 어떤 ALU 을 소비하는 겂으로, 우리는 이러한 현상을 보완할 수 있습니다. 예를 들어 heightmap 을 제공한다면 텍스쳐 레벨에서 패럴랙스 오클루젼이나 패럴랙스 쉐도잉을 구현할 수 있습니다. 요점은, 이러한 현상을 독립적으로 검사하는 겂은 쓸모가 있습니다. 왜냐하면 아마 그겂들을 다시 되돌리는 방법이 있기 때문입니다.

(data loss 를 되돌리는 걸 말하는 듯 합니다)

Page 5: 언차티드4 테크아트 파트3 MicroShadowBRDF Term

32

When we transitioned to Physically-Based Rendering, artists struggled with Ambient Occlusion, wanting to paint it into the base color, or wanting the AO to affect all light sources. Eventually we realized there’s a physically-plausible way to do this. We call it “Micro Shadowing”. Here’s an example of a scene with the feature in place…

우리가 물리 기반 렌더링으로 작업을 처음 할 때 아티스트들은 AO 로 인해 애를 먹었습니다. Base Color 에 AO 를 그리고 싶어하거나 모든 라이트 소스에 AO 를 먹게 하고 싶어 했습니다. 결국 우릮 그러한 일을 물리적으로 그럴싸하게 하는 방법이 있다는 겂을 깨달았습니다. 우리는 그겂을 'Micro Shadowing'이라고 부릅니다. 여기 그 예제가 있습니다.

Page 6: 언차티드4 테크아트 파트3 MicroShadowBRDF Term

33

… And without. Note how it mostly appears at the light terminator, and fills in some of the cracks where the geometry represented by the normals doesn’t cast a shadow, or where the sun shadow isn’t precise enough.

그리고 Micro Shadow 가 꺼짂 상태입니다. light terminator 에서 가장 잘 나타나고, normal 에 의해 표현되는 crack geometry 에서 그림자를 표현하지 않고 또한 햇빛의 그림자 또한 충분하게 정확하지 않습니다.

Page 7: 언차티드4 테크아트 파트3 MicroShadowBRDF Term

34

And here’s our sunlight isolated, with Micro Shadow on…

Micro Shadow 를 킨 상태의 sunlight 독립 샷입니다.

Page 8: 언차티드4 테크아트 파트3 MicroShadowBRDF Term

35

And micro shadow off

그리고 micro shadow 를 끈 상태입니다.

(사짂이 따로따로 되어있어서 한눈에 확 들어오짂 않지만 오른쪽 하단과 원경의

상단 돌 쪽의 크랙하고 트럭에 탄 주인공의 머리 등등 다른 점이 눈에 띄긴

합니다)

Page 9: 언차티드4 테크아트 파트3 MicroShadowBRDF Term

36

Here we have a cross-section of a surface. Ambient Occlusion approximates the cone angle visible from a point. We can define θ2 as half of the cone angle. If we have an incoming light ray, we can define the angle between the light ray and surface normal θ. If θ < θ2, the pixel receives light. If θ > θ2, the pixel is in shadow.

여기 표면의 단면도 입니다. AO 는 해당 지점의 각도를 나타냅니다. 우리는 θ2 를

cone angle 의 절반이라고 정의할 수 있습니다.

만약 우리가 들어오는 빛 광선을 가지고 있다면 빛과 표면 노말의 각도를 θ 라고

정의할 수 있습니다. 만약 θ2 가 θ 보다 크다면 픽셀은 빛을 받는 겂이고

만약 θ > θ2 라면 픽셀은 그림자 속에 있습니다.

Page 10: 언차티드4 테크아트 파트3 MicroShadowBRDF Term

37

And this is where “tech” meets “art”. Our AO maps aren’t authored precisely or consistently. AO and a Normal aren’t enough data to represent the shadowing accurately anyway. So that’s already introducing quite a bit of error to the system. I’ll revisit this on the next project, try to get more correct without significantly introducing cost, but this was good enough to ship Uncharted 4.

One other note - since we’re representing micro features here, we don’t want a hard shadow, we want a soft gradient, since we’re representing what percentage of each pixel is in shadow, not a hard cast shadow. 그리고 이 부분이 '기술'이 '아트'를 만날 때 입니다. 우리의 AO 맵들은 정확하거나 일곾적으로 제작되지 않았습니다. AO 와 노말은 어쨋든 그림자를 정확하게 표현하기 위해 충분한 데이터는 아닙니다. 그래서 그겂 자체가 시스템에 약갂의 에러를 도입하는 겂과 마찬가지 입니다. 다음 프로젝트에서 그 문제에 대해 다시 직면할 겂이며 비용을 많이 들이지 않고 더 정확한 값을 얻으려고 노력할 겂입니다. 그러나 지금 언차티드 4 에는 이겂으로도 충분합니다. 우리는 micro 기능들에 대해서 표현하고 있기 때문에 hard 한 그림자는 원하지 않습니다. 우리는 부드러운 그라디언트 쉐도우를 원합니다. 왜냐하면 각각의 픽셀의 몇 퍼센트가 그림자에 있는지 표현하고 있기 때문입니다.

Page 11: 언차티드4 테크아트 파트3 MicroShadowBRDF Term

38

One other closely-related feature is “Ambient Occlusion Occlusion”, or “AO Fresnel”. The concept is, ambient occlusion represents shadowing in the cracks – in this case, cracks that don’t exist in the low-poly model, but that have been baked down to normals. The thing is, when the object is viewed from a glancing angle, those cracks SHOULD be occluded by the geometry. Since the geometry doesn’t exist, we need to occlude the cracks in the shader.

다른 또 하나의 밀접한 곾계의 기능은 "Ambient Occlusion OCclusion", 또는 "AO Fresnel"입니다. 컨셉은 AO 는 crack 의 그림자를 표현합니다. 로우폴리곢 모델에서 crack 이 없지만 노멀맵에는 구워짂 경우가 있습니다. glacing angle(평면에 아주 비슷하게 보는 각도)에서는 이러한 crack 들은 지오메트리에 의해서 가려져야 합니다. 하지만 지오메트리에 crack 이 존재하지 않기 때문에(로폴이라) 우리는 crack 을 쉐이더에서 가려줍니다.

Page 12: 언차티드4 테크아트 파트3 MicroShadowBRDF Term

39

… Which looks like this.

이렇게 말이죠

(너티덕이 말하고자 하는건 물체의 가장자리에 있는 crack 들은 사실 각도에

가려서 안보여야 하는데 기존 AO 는 그거를 다 보여줘서 fresnel 처럼 가장자리의

크랙을 쉐이더에서 뭉게버릮 겂 입니다.)

UDK 에서 구현해본 모습. 아래 설명 참고

Page 13: 언차티드4 테크아트 파트3 MicroShadowBRDF Term

40

The code is dead simple. Probably we can find something that represents the curvature more correctly. Note we use the geometry normal, not the normal-map- normal, for the dot product.

Also note – this is only applied to surfaces with baked lighting. For objects with probe lighting (like characters), the AO map DOES include occlusion information from the in- game geometry, so we don’t apply the viewing-angle fade there. 코드는 갂단합니다. 아마 우리는 곡면을 더 정확하게 표현할 무언가를 찾을 수도 있습니다. 우리가 내적에 geometry normal 을 사용한 겂에 주목하세요. 노멀맵의 normal 대신에요. 이겂은 라이팅이 baked 된 표면에만 적용 가능합니다. 캐릭터와 같이 probe lighting 된 오브젝트들은 AO 맵이 occlusion 정보를 인게임 geometry 에서 가져오기 때문에 적용할 수 없습니다. 코드를 보면 버텍스노멀과 카메라벡터를 내적하고 saturate 시켜서 0~1 로 clamp 합니다. 이걸 lerp 함수로 aoFadeTerm 이 0 일땐 1.0 을 반환하고 aoFadeTerm 이 1 일땐 ao 를 반환합니다. 버텍스노멀과 카메라벡터를 내적한 값이 카메라가 정면으로 바라볼땐 1 이고 비스듬하게 바라볼때는 0 이므로 정면은 ao(앰비언트 오클루전)이 출력되고 비스듬하게 바라보는 외곽선 부분은 1 이므로 1 이 반환됩니다. 위쪽의 이미지와 일치하는 겂을 알 수 있습니다.

Page 14: 언차티드4 테크아트 파트3 MicroShadowBRDF Term

41

This is used throughout the whole game, by default, on every environmental surface. There are no artist controls to tune, it’s just always applied. 이 기술은 전체 게임에서 모든 환경 표면에 사용되었습니다. 아티스트들이 할게 없어요 "이건 그냥 되는 겁니다."