《马克思·佩恩 – 二十年后 – 图形评析》
Max Payne – two decades later – Graphics Critique (2021)

原始链接: https://darkcephas.blogspot.com/2021/07/max-payne-two-decades-later-graphics.html

## Max Payne 的开创性画面:20 年回顾 《Max Payne》于 2001 年发布,视觉效果惊艳,深受《黑客帝国》和黑色电影的影响。尽管目标是 DirectX 8.0,且硬件配置极其有限——450 MHz 的 CPU 和 16MB 的显卡——但该游戏通过巧妙的“障眼法”技术实现了惊人的真实感。 开发者通过预先计算效果和欺骗视觉来绕过硬件限制。其中关键在于精湛的粒子效果,例如逼真的子弹冲击和破碎玻璃,通过翻页动画和策略性贴花实现。光照依赖于预烘焙的光照贴图和细节纹理来模拟复杂性,而不会给资源带来压力。反射和镜面高光也被直接烘焙到纹理中,以弥补环境贴图的不足。 虽然具有开创性,但画面并非完美。粒子剪切问题、缺乏环境互动以及纹理应用的不一致性都曾被指出。然而,《Max Payne》对渲染的创新方法,优先考虑艺术幻觉而非原始力量,树立了新的标准。它的视觉质量多年来无人能及,巩固了其在实时渲染历史上的里程碑地位。

相关文章

原文

 

It has been two decades since the video game Max Payne was release on July 23, 2001.  The game itself was some incredible homage to The Matrix and Detective Film Noire but in this article we are only going to examine the graphics. The rendering present in the game was phenomenal for its time and as such received multiple graphics awards.  To understand the what the developers achieve and could have been achieved we have to first understand the PC computing landscape 20 years ago**.

Max Payne was released targeting directx 8.0 with specs of 450 Mhz cpu (singular) and 16 Mb graphics card. Two put this in perspective that is roughly three orders of magnitude less GPU memory than a modern RTX 2080. The DirectX 8.0 graphics API at least has pixel and vertex shaders but the spec had extreme limitations on caps like number of instructions.  The 450 Mhz cpu is more than two orders of magnitude slower than a modern PC cpu today.

So with this perspective in mind we can probably conclude** that the rendering will be limited to:

  • Forward only rendering (no render-to-texture) 
  • Very low resolution textures 
  • Hundreds of polys on screen

So with these severe limitations how was such realism and fidelity possible? The answer is an amazing technical synergy of rendering smoke and mirrors.  Most of these techniques could be summarized as tricking the human visual perception into thinking complex rendering computations are being done live in realtime when they are actually have been precalculated. The next sections will examine in detail each technique and how they contribute to the total graphical experience.

The particle effects of this game are its best graphical feature. For a game that involves slowmo matrix style fighting with bullets and other mildly destructive weaponry this investment and care certainly pays off.  Similar games of this time do not even come close to the effect fidelity found in this title**.

Bullet hits steam gas pipe in slowmo. First is spark impact of bullet going through steel with two types of spark particles. Again what looks like many sparks in the shape of a star is likely just one single quad with an animated flipbook texture. Note the long lasting leaking steam trail with hints of geometric complexity added as texture that simulates turbulent flow. This complexity is all fake as there is no such fluid simulation occurring**.
Bullets fired into glass until glass breaks with fragments on floor. The bullet hole impact on the glass is simply a decal but fragment ejection is clearly multiple independent particles. The broken glass falling is a flipbook animation with a delayed glass decal for the floor. The falling animation is repeated in reverse for the bouncing glass shards.  



General Criticism

While obviously phenomenal these effects could still be improved upon**.

  • The larger particle quads clip the ground in a visual unpleasant and unrealistic fashion. Soft clipping is normally implemented by reading the depth buffer which is not possible here. It might be possible to achieve soft clipping by CPU side manipulation of the particle quads that clip the ground plane. It might also be possible to do a ground plane representation in the pixel/vertex shader such that near plane quads fade out completely before touching the ground surface.
  • The particles do not interact with the environment at all. This is pretty common for particle systems in general. However there are situations where a few of these particles could have benefitted from a simple path trace of the static geometry. Given that the game is all about tracing bullets through the air this was definitely possible. There would be a limit on how many particles could do this but that could depend the dynamic scenario.
  • Finally the timing for decals to appear and the manner in which they appear is slightly offset from what is correct. This could be due to frame latencies in the engine itself but considering the excessive usage of slowmo in the title some timing cleanup would be beneficial.

Max Payne used prebaked lightmaps for static geometry.  This means static geometry has an entirely separate texture layer that corresponds to the sum incoming irradiance.  The reason why this is separate and not simply baked into the texture of static objects is because the high resolution albedo textures are reused everywhere in a scene. Each usage may have a different lighting condition which means they need to correspond to different parts of a texture.  Since the light map uniquely covers the entire visible scene the texel density is quite low.  It should also be noted that for Max Payne this appears to only be a light map and apparently not a Radiosity map with indirect reflections**.

Detail textures modulate the albedo of surface to simulate micro surface features that cannot be represented in the texture due to strict memory constraints. They are simply a way to realize high resolution textures without an overhead that would be unacceptable circa 2001. These textures do not have any color information and are usually represented with a single 8 bit 'red' channel. 

General Criticism 

This is a great technique and was used in games before 2001. Its usage here is a bit inconsistent with some surfaces having no detail textures and others having clearly the wrong detail texture applied to the surface. It is not clear how this could be improved without increased polygons and increased number detail textures.

Modern AAA games use high quality polygonal models to represent 3D object details.  Even in the case of surface (2D) detail the complexity is represented with heightfields or bump maps so the surface can react correctly to different lighting conditions.  In 2001 both of these techniques were simply not feasible for this title.  In Max Payne both surface and 3D details are baked directly into the albedo texture of the object.  Baking this information directly into the albedo texture is perfectly correct for a single perspective.  The trick is doing this in a way that it looks acceptable for the all the perspectives that are common.  



Note the prebaked doorknob shadow might be passible but the wood detail texture ruins the effect. There is also a complete absence of any shadowmap on the toilet which causes it to appear to float without contacting the floor.



General Criticism

This technique works very well in most circumstances but really could have been supplemented by a proper Level of Detail (LOD) system. Even a simple system that added a few parallax semi transparent planes would at least contribute some depth to these geometries. 

This section is nearly identical to the previous section on fake geometry but with a specific focus on reflections and specular highlights. Max Payne has no environment maps. Even it could afford an environment map texture sample the game also has no normal maps. To prevent the game from looking like a Lambertian alternative dimension the reflections and highlights were also tastefully baked directly into the albedo texture. This technique is quite hit or miss as in reality specular highlights are highly view dependent. (Reflection map is an old term and a more modern term might be something like incoming irradiance)

An example of where baked reflections tend to shine. The highlights suggest a reflection to the light but in reality this texture is used on the seats in the dark background as well. Without the shadow map to dim these highlights this technique would be quite off-putting and noticeably inaccurate. 

General Criticism

As with other techniques in this game the primary issue here is consistency. Many of the objects have great baked specular highlights but they do not fit quite right with the rest objects in the scene. A bit more effort in terms of technical artistry was required to make the specular reflections fit perfectly with each unique usage of the object or texture. Care needs to be taken in the approach as many older titles perfected this technique by unfortunately creating repetitive chunks of common geometry.

This section just contains a menagerie of different techniques that contribute to an overall impression of increased rendering fidelity.

General Criticism

Although not covered here specifically the general outline of the decals in the game look quite poor specifically when they involve opacity. It would have been nicer to see crisper outlines on things like graffiti or a different art style to blend them into the walls. In terms of the planar reflection trick, it would have been nice to see this trick used in a few more situations throughout the game. Specifically, there are a handful of mirrors in the game. Simple planar reflections in these cases would have made for a more dynamic rendering impression.

In this final section we shall look at a screenshots from a few key scenes to get a sense of how all these techniques come together to produce a single compelling image.




With a larger investment and perhaps different technical choices Max Payne could possibly have looked even better than it did in 2001. However the graphical result produced at that time was still far and away better than other titles in this period. The rendering quality of this game was not seen in other titles for several years. This game stands as a remarkable technical accomplishment and a significant entry in the history of progression in realtime rendering. 

* All screenshots of all games were taken by the author and are presented here for the intent purpose of review and criticism (technical and aesthetic)

** All 'claims' here are in the form of opinions made based on the author's industry experience and not on detailed inspection of source code or on secret non-public knowledge

Highlighted references: 

https://en.wikipedia.org/wiki/Max_Payne_(video_game)

https://store.steampowered.com/app/12140/Max_Payne/

https://www.nvidia.com/en-us/geforce/graphics-cards/rtx-2080/

https://hardwaresecrets.com/directx-versions/

https://cdn.cloudflare.steamstatic.com/apps/valve/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf

https://developer.valvesoftware.com/wiki/$detail

https://learnopengl.com/Advanced-OpenGL/Cubemaps

https://en.wikipedia.org/wiki/Lambertian_reflectance

联系我们 contact @ memedata.com