본문 바로가기
유니티 엔진

GGX in Unity 5.3

by 대마왕J 2016. 2. 8.
http://blogs.unity3d.com/2016/01/25/ggx-in-unity-5-3/

 

유니티 5.3에서 스페큘러가 GGX 스페큘러로 바뀌었군요.

언리얼에서도 사용되고 있는 녀석이고 좀 더 뭐랄까 파형이 높고 부드러워요.

5.4에서는 IBL도 강화할 생각인가 봅니다. 음 확실히 언리얼을 의식하고 있다는 느낌적인 느낌?

 

글은 뭐 쉬우니 번역 안합니다.

In Unity 5.3 Standard Shader, we have switched to GGX as the BRDF of choice for both analytical lights, such as point/directional light, but also for image based lighting. Furthermore, a complete overhaul has been performed on our implementation for convolution of cube maps to achieve both accurate and noiseless results at low execution time (latter part is in Unity 5.4). The most characteristic difference between GGX and normalized Phong is that the microfacet distribution profiles associated with GGX has a higher and more narrow spike, followed by a prevailing tail as we see here.

Profiles for GGX and Normalized Phong.

The impact of this on the final lit result is that GGX has a brighter highlight, followed by a trailing halo as shown below, which gives a more realistic appearance.

Comparison between GGX and conventional normalized phong.

Cross-industry Compatible Materials

In academics, physically based BRDFs use roughness as the parameter to control the microfacet distribution function. Academic roughness is defined as the root mean square slope of the profile. A common misunderstanding is that roughness maps in CG are the same as academic roughness, which is not the case. The reason academic roughness is not used for texture maps or sliders is because the “blur levels” are not evenly distributed, which is both very difficult to work with, but also leverages the limited bit precision of a texture map poorly. To avoid confusion, Unity uses smoothness instead of roughness maps, where smoothness is converted into academic roughness in the shader, using the formula (1-smoothness)^2. Distribution wise this is equivalent to Burley’s roughness, but reversed such that the most blurry response maps to 0.0 and perfect mirror reflection maps to 1.0, which we find more intuitive.

The significance to such a standardized distribution is that it allows you to import content into Unity made with external tools and achieve similar results. Most CG painting tools today support smoothness maps. To be clear, an identical match is not guaranteed, but proportionality between diffuse, specular brightness and overall blurriness of the specular reflection should be close. The following comparison shot between Unity 5 and Substance Painter, was kindly provided by Wes McDermott from Allegorithmic.

As we see the visuals are very similar. I would also like to thank Wes and Allegorithmic for their collaboration and helpful iteration on this. For more details on the subject people are encouraged to check out their detailed course on PBR and Unity 5.

Coming in Unity 5.4

In Unity 5.4 we have focused on improving the speed of cube map convolution and getting exceptionally clean visuals for the image based lighting (IBL). Below we see a comparison between a sphere lit in Unity 5.4 vs. a conventional path tracer at 50000 rays per pixel.

As we see, there is a significant amount of noise using the conventional path tracer on the right, even at 50000 rays per pixel. The reason for this is because a basic path tracer (BRDF importance sampling) struggles with environment maps, which contain hot singularities such as a sun at physically proportional intensity. Unity 5.4 is now resilient to this problem and the off-line cube map convolution is roughly 2 times faster than Unity 5.2.

반응형

댓글