Calibrating Lighting and Materials in Far Cry 3
暂无分享,去创建一个
Far Cry 3 is a first-person shooter due to be released in 2012 on Xbox 360, PlayStation 3 and PC. With indoor and outdoor environments, and a real-time day-night cycle, the game engine must support a huge variety of lighting scenarios. Materials must react correctly under all possible lighting conditions and all possible viewing angles. This made us turn to a physically-based model. By accurately simulating the physical properties of lights and materials, we are able to ensure that every object would react as expected under any lighting condition. This leads to an improved workflow for artists who are no longer trying to overcome lighting problems, and thus also gives a higher quality result. For materials, we observed that diffuse albedo is a physical property that we can use as in our material representation. We developed a colour correction tool that calculates diffuse albedo from photographs, using a Macbeth ColorChecker R © grid as reference. Artists could then build textures using this colour-corrected photographic reference. Not only did this help with balancing material response under all lighting conditions, but it enabled us to have vivid, but not garish, colours required of a tropical island. Other physical properties, such as specular reflectance, were also accurately simulated to ensure the faithful reproduction of both diffuse and specular lighting effects. To calibrate our lighting, we generated second-order spherical harmonics from the sky dome to use for the ambient light, whereas previously, a separate, single colour ambient light was used. Linking ambient lighting to the sky dome not only ensured consistency but also added a variety of colours to the lighting. Problems came when art direction requested a look which would result from the application of a polarising filter, which blocks the direct sky light, but not the diffuse sky lighting. This was solved with a tailored post-process for the sky. Finally, we implemented a physically-based shading model in order to accurately use the data we provided. Energy conserving specular was of critical importance to simply our material parameters and to ensure specular highlights were of the correct brightness. As the vast majority of materials in Far Cry 3 are dielectric, we chose the Torrance-Sparrow microfacet BRDF with Schlick’s Fresnel approximation, the Blinn-Phong NDF and the Schlick-Smith visibility term. With performance at a premium, we found a fast approximation to the geometric term that could be combined for free with the normalisation factor of the Blinn-Phong NDF. To correctly filter specular highlights, we selected Toksvig maps over LEAN mapping for memory and performance reasons. These were generated from our normal maps and placed them in a spare channel of our DXT5 normal map textures. Artists could optionally use a single value average Toksvig factor to solve any compression issues.
[1] Carsten Wenzel,et al. Real-time atmospheric effects in games , 2006, SIGGRAPH Courses.
[2] Marc Olano,et al. LEAN mapping , 2010, I3D '10.
[3] Brent Burley. Physically-Based Shading at Disney , 2012 .
[4] Michael Toksvig. Mipmapping Normal Maps , 2005, J. Graph. Tools.
[5] Dipl.-Ing,et al. Real-time Rendering , 2022 .
[6] S. Darula,et al. CIE GENERAL SKY STANDARD DEFINING LUMINANCE DISTRIBUTIONS , 2002 .