《心灵杀手 2》中的北极光技术
Northlight technology in Alan Wake 2

原始链接: https://www.remedygames.com/article/how-northlight-makes-alan-wake-2-shine

介绍《心灵杀手 2》并重点介绍其创新技术 《心灵杀手 2》采用先进技术开发,提供全新体验和令人惊叹的图形。 该游戏的核心引擎具有新的面向数据的游戏对象模型、基于体素的角色控制器和逼真的风,可提供更流畅的导航和自然的运动。 其他值得注意的新增功能包括用于大规模环境创建和茂密植被的新散射工具,以及更新的 NPC 运动,从而产生高质量的动画和运动匹配。 此外,通过改用 Luau(一种流行的嵌入式脚本语言),开发人员可以更快地制作原型并实现各种游戏功能和 VFX 效果。 《心灵杀手 2》中的图形和渲染采用了新的 GPU 驱动的渲染管道,可实现更丰富的几何细节、网格着色器动画和更优化的网格。 该游戏完全支持 HDR,通过改进的透明度渲染(包括准确的雾和水模拟)提高整体可视性并增强故事讲述。 效果范围从雨和水模拟到角色受伤,所有这些都是使用基于节点的先进视觉特效工具实现的。 粉丝们可以期待尖端技术,例如全光线追踪直接照明、改进的去噪和间接照明算法。 所有这些技术进步带来了以前版本中无与伦比的身临其境的游戏体验。 资料来源:https://www.remedy.fi/alanwake/tech/、https://northlight.wiki/。

为了澄清有关“体素”的困惑,本文简要提及了此功能,并主要关注角色控制和运动。 然而,根据给定的上下文,“体素”的使用可能意味着在游戏环境中纳入体积元素,而不仅仅是导航增强。 尽管对这方面的进一步阐述将有助于清晰起见。 总体而言,本文重点介绍了 ECS 架构等游戏开发技术的重大进步,但未能对某些功能提供详细说明。
相关文章

原文

The Northlight team is super-excited to have Alan Wake 2 out there. We've created and polished off a lot of new tech so that Alan Wake 2 looks great and plays great. Here are the key highlights of the new features and tools that we'd like to give a moment in the spotlight. We're keeping the description to a fairly high level here; our engineers will be back with more in-depth topics in due course.

Core engine: New data-oriented game object model

Northlight switched to a completely new data-oriented game object framework during the development of Alan Wake 2. The new entity component system (ECS) based model enables memory-efficient storage and makes parallel execution efficient and safe. This means that the engine can support a varying number of target hardware cores efficiently, enabling bigger, more dynamic and fuller worlds. ECS also played a supporting role for our tools development, simplifying the building of the new Scattering tool for mass-authoring vegetation - ECS allowed us to simply have a lot more entities without the need to invent any custom solution for scattering objects in the world.

The ECS framework also made it to our gameplay programmers' "favorite tech" list as it helped implement the Case Board - Saga's visual storyboard for gathering evidence. ECS meant that iteration was quick because adding new or modifying existing systems or game objects was easy, and performance gains were clear when saving and loading the Case Board.

Voxel-Based Character Controller

Alan Wake 2 called forth reimagining character control in Northlight. We built a new Voxel-Based Character Control that enables smooth navigation in cramped, complex and dynamic environments; it makes character movement more natural and fluid. Our marketing folks would say the characters are more responsive and lifelike than ever before; our internal dev notes described it as "the characters won't bump or get stuck into objects in tight spaces".

Character path visualization showing predicted path (white) as the character tries to reach the movement target (yellow).

Reworked NPC locomotion

Our animation tech made some major changes into how Non-Player Characters (NPC) move. The revamped NPC locomotion means that in Alan Wake 2 all NPCs utilize animation-driven movement combined with new distance-based Motion Matching. This new tech improves movement quality and gives us more control over how and when animations are used.

Realistic wind

More realistic wind was on the must-have tech list for Alan Wake 2 - and that's we have, wind that realistically affects physics, particles, and cloth.

For example, game designers can now easily define indoor and outdoor areas that have different wind speeds, with smooth, stateless transitions between the two types of areas. The indoor vs. outdoor area definitions are used, for example, to ensure that there's no wind inside the car that Saga and Casey are driving. This is done through defining a moving "wind box" that specifies that the inside of the car is a wind-free indoor area.

Northlight Wind Debugger showing wind box that defines indoor vs. outdoor area. Block edge shows the transition.

The wind system tech is built on Signed Distance Fields (SDF) methods where wind boxes are used as primitives that define a smooth, global wind strength field. The wind boxes act like basic building blocks that define how strong the wind is in different areas, creating realistic and smoothly varying wind patterns between indoor and outdoor areas.

Scattering tool

We developed a new Scattering tool to allow for mass-authoring vegetation and propping environments on a grand scale. In Alan Wake 2 it was used to create denser, richer and more life-like environments with the longer-than-before draw distances (i.e. what defines how far the player can see objects and details in the game world).

Luau

We switched our scripting language from a proprietary language into Luau, embeddable scripting language derived from Lua by our friends at Roblox. It exposes a comprehensive set of engine functionality and supports live-editing. Luau is used for level scripting and also for various gameplay systems such as the weapon upgrade system. Luau allowed the game team to prototype and implement various game features and VFX effects without needing help from engine programmers.

We've also cooked up our own VS Code language server extension, so that it all integrates seamlessly into Remedy’s development pipelines. And adopting Luau helped us boot out some 80 000 lines of code we no longer need to maintain.

VFX team used Luau to implement a weather system - The different weather conditions can be quickly tested through a debug panel.

New GPU-driven rendering pipeline

Alan Wake 2 showcases Northlight's brand-new GPU-driven rendering pipeline. It allows us to push more geometry into the world without sacrificing performance. With GPU-driven rendering using mesh shaders, we can now do occlusion culling down to a single-pixel precision and use everything in a scene as an occluder. This ability to only draw what is visible means that the world of AW2 has more geometric detail than we’ve ever shipped before.

Diving a bit deeper into how it works: we also cull meshlets, in addition to the mesh. Meshlets are smaller, more optimized, groups of triangles extracted from the mesh. In the images below you can see what meshlets look like around Cauldron Lake's convenience store location.

What the player sees...
...vs. what's fed into the renderer (silly amount of geometric detail!). Colors represent clusters.

Character-style rigs on foliage - Large scale procedural GPU animation

The expansive primordial forest environments of Alan Wake 2 are brought to life through our new shader-based vegetation system. It's based on a new skinning system that runs entirely on GPU and supports "art-driven" bone shader animations. In Alan Wake 2 it enabled us to use full character-style rigs on all the foliage visible in the environments.

We're calling the new system art-driven here because the bone shaders expose an API with which artists can write their own shader code that hooks into the underlying system. So technically artists could use it to animate anything they'd like: foliage, objects bobbing up and down on water, power cables wobbling in the wind, etc.

GPU bone visualization - The skeleton rigs animating all vegetation. Each line is one bone, with almost 300,000 bones in Cauldron Lake being processed every frame.

GPU bone visualization OFF
GPU bone visualization ON

HDR support

Alan Wake 2 fully supports HDR. We've made sure that the game looks great out-of-the-box with default settings, regardless of whether your display supports SDR or HDR.

On the tech side, adding HDR support could almost be said to have been a simple 'let's change the output format' operation; the more significant effort was done on the creative side. Alan Wake 2 is authored in HDR, meaning that the color grading was done by actual human colorists to ensure that the unique art styles and aesthetics, the storytelling and mood of Alan Wake 2 is amplified in both HDR and SDR.

Transparency and atmospheric effects

The pervasive fog scenes in Alan Wake 2 are built upon improvements into how we render transparency. We're using MBOIT (Moment-Based Order-Independent Transparency) to make see-through surfaces blend together smoothly, even when they have different levels of detail.

During Alan Wake 2's development, Northlight did a complete overhaul of transparent rendering. We now draw transparency in three resolutions with MBOIT, which makes it possible to blend fog, transparent geometry and effects seamlessly. In addition to better blending of fog and other transparent elements, we’ve improved pipelines to allow more fine-grained control over fog placement in the world. Combining all this to per-pixel transparent lighting and fog-affected reflections makes opaque and transparent elements fit together better than in our previous projects.

Our fog also approximates multiple light scattering, giving it a thick and realistic look that improves atmosphere.

Note how the water refracts correctly and supports non-uniform blur for realistic looking water.
Transparent Rendering - A perfect blend of different transparent effects: fog, particles and water all use MBOIT.

VFX

Effects are an essential part of Alan Wake 2’s visuals and expand on what we achieved in Control. The node-based VFX tools in Northlight have evolved significantly in terms of supported features and runtime performance. Visual effects artists are now able to author complex and dynamic effects like rain, wetness, water simulation, and character wounds. VFX tools also benefit from GPU-driven rendering and can push a lot of geometry through the GPU. This is required, for example, when rendering rain blocker objects to a dynamic mask that prevents rain from appearing indoors or under cover.

Screenshot of Dark Place with visual effects OFF.
Screenshot of Dark Place with visual effects ON. 'Fade Out' enemies and weather effects are key parts of the visual identity.

Ray tracing

We have added support for fully ray-traced direct lighting and combined this with improved denoising and indirect lighting algorithms with Nvidia. Ray tracing in Alan Wake 2 is more accurate and robust than what has been seen in Control. Ray tracing also makes the animated foliage look amazing, now that all the geometry animation (foliage) is authored and simulated using skinning.

With Alan Wake 2, PC players can experience (GPU and CPU setup permitting) the latest Nvidia DLSS innovations - DLSS Frame Generation, DLSS Ray Reconstruction, Path Traced Indirect Lighting - all the things that enable us to say 'never before' once more.

联系我们 contact @ memedata.com