NEW RENDERING ENGINE
新的渲染引擎
You're probably wondering, but why? The game looked fine, this was a truly massive undertaking and not something we wanted to be doing at this stage in development. There were various things we had to or wanted to improve, but individually they did not justify making a totally new rendering engine. However, already deep into the work with procedural items, we started running into serious problems we had no control over, and with great reluctance we finally accepted that if we didn't do this and do it now, we'd just be wasting time and energy and the game would have an uncertain future.
你可能想知道,但为什么?游戏看起来还不错,这确实是一项庞大的工程,不应是我们在开发阶段要做的事情。我们有各种必须或想要改进的东西,但就单个而言,它们并不能成为制作一个全新的渲染引擎的理由。然而,在已经深入到程序性项目的工作中,我们开始遇到我们无法控制的严重问题,带着极大的不情愿,我们最终接受了这样一个事实:如果我们现在不这样做,那么我们只是在浪费时间和精力,游戏将有一个不确定的未来。
We're going to explain the problems we've solved with the new renderer, as well as some important benefits that came with a fresh design and take on every part of rendering.
我们将解释我们用新的渲染器所解决的问题,以及对渲染的每一个部分进行全新的设计和处理所带来的一些重要好处。
Compatibility and driver issues became a serious problem, particularly as we worked on our new procedural systems. Exanima has a unique and unusual rendering engine, and the things we were trying to do just weren't being properly supported by GPUs, and we couldn't expect them to. We really tried to find workarounds, but everything failed and a drastically different approach to rendering was the only fix.
兼容性和驱动问题成为一个严重的问题,特别是当我们在新的程序性系统上工作时。Exanima有一个独特的、不寻常的渲染引擎,我们试图做的事情只是没有得到GPU的适当支持,我们不能指望它们。我们的确试图找到解决办法,但一切方式都行不通,彻底改变渲染方法是唯一的解决办法。
Driver CPU bottlenecks have always been a problem, but over just two years we'd lost a huge 30% performance to driver updates as they moved away from our less trodden path. With GPUs and monitors advancing very quickly, while CPUs mostly just get more cores, this was becoming a very serious problem. With our new rendering engine we were able to literally triple framerates or even better in the more CPU bound cases.
驱动程序CPU瓶颈一直是一个问题,但在短短的两年时间里,随着驱动程序更新离开了我们较少涉足的道路,我们已经失去了30%的巨大性能。随着GPU和显示器的快速发展,CPU大多只是获得更多的内核,这正成为一个非常严重的问题。 有了我们的新渲染引擎,我们能够将帧率提高三倍,甚至在更多的CPU约束的情况下还能有更好的表现。
Our material system, while competent, was very difficult to use. Artists were faced with choices that required a physics degree and a calculator. Complex materials were also resource intensive. In practice either due to complexity or for the sake of efficiency, things rarely looked as they should. Our new material system is much more streamlined, easy to use and efficient, it removes the uncertainty and makes high quality materials simple and cheap, with lots of support from our tools.
我们的材料系统虽然能够胜任,但却很难使用。艺术家们面临着需要物理学学位和计算器的选择。复杂的材料也是资源密集型的。 在实践中,无论是由于复杂性还是出于效率的考虑,事情很少看起来像它们应该的那样。我们的新材料系统更加精简,易于使用和高效,它消除了不确定性,使高质量的材料变得简单和便宜,并得到我们的工具的大量支持。
A hard light source limit was an issue with our old renderer, particularly with multiplayer on the horizon, where we'd have less control over how many lights would be in one place at once. The new renderer is still a forward renderer, but isn't strictly limited in how many lights it can handle.
硬性的光源限制是我们旧的渲染器的一个问题,特别是在多人游戏即将开始的时候,我们对一个地方同时有多少灯光的控制就更少。新的渲染器仍然是一个前向渲染器,但在处理灯光的数量上没有严格的限制。
Global illumination (GI) or indirect lighting is a fundamental part of rendering. Without it shadows would be black voids rather than just dark. Exanima's dark environments require at least a basic version of this, but our solution wasn't great. It didn't scale well to large open spaces, didn't support much verticality; while indirect light didn't pass through walls, it ignored everything else, even doors, resulting in very flat and weird looking areas of shadow. It also performed very poorly for moving lights, once again an issue for multiplayer and a limitation in general.
全局照明(GI)或间接照明是渲染的一个基本部分。 没有它,阴影将是黑色的空洞,而不仅仅是黑暗。 Exanima的黑暗环境至少需要一个基本版本,但我们的解决方案并不出色。 它不能很好地扩展到大型开放空间,不支持很多垂直度。 虽然间接光没有穿过墙壁,但它忽略了其他一切,甚至门,导致阴影区域非常平坦,看起来很奇怪。 它对移动灯光的表现也很差,这对多人游戏来说又是一个问题,也是一个普遍的限制。
This is a notoriously difficult problem to solve. Baked solutions can't deal with dynamic objects and lights and are a huge burden on content creation; ambient occlusion only darkens corners, it doesn't deal with actual light and darkness; other solutions tend to be cumbersome and slow, with extreme hardware requirements.
这是一个众所周知的难以解决的问题。 烘烤的解决方案不能处理动态对象和灯光,对内容创作是一个巨大的负担。 环境闭塞只使角落变暗,它并不处理实际的光和暗。 其他解决方案往往是繁琐和缓慢的,对硬件要求极高。
We were able to come up with our own GI solution which solved all our problems and drastically improved the game's visuals. Our solution is completely real-time dynamic, blindingly fast and works in any situation, whether it's a dark little room or a valley viewed from a tower with the open sky above. It captures even small details adding lots of depth and doesn't care how many objects or lights are dynamic, it just does its job.
我们能够想出自己的GI解决方案,解决了我们所有的问题,并极大地改善了游戏的视觉效果。 我们的解决方案完全是实时动态的,速度快得令人眼花缭乱,在任何情况下都能发挥作用,无论是在黑暗的小房间,还是从高塔上看到的山谷,上面都有开阔的天空。 它甚至可以捕捉到小的细节,增加很多深度,而且不在乎有多少物体或灯光是动态的,它只是做它的工作。
Here's what things would look like with no GI at all:
以下是完全没有GI(全局照明)的情况下的状态。

Full size image(全尺寸图片)
Flat ambient brightness things up, but it looks bad and there can be no darkness anywhere.
宽敞环境下照亮的东西,看起来很糟糕,任何地方都没有阴影。

Full size image(全尺寸图片)
Our new GI solution approximates the light being scattered in the environment. There's lots of depth, detail and soft shadows.
我们新的GI解决方案近似于环境中被散射的光线。 有很多深度、细节和柔和的阴影。

Full size image(全尺寸图片)
The added depth also adds lots of visual clarity, making it easier to see, especially in relative darkness.
在增加的深度的同时也增加了很多视觉清晰度,使其更容易看到,特别是在相对黑暗的环境中。
The GI also allows glowing objects and effects to cast their glow on nearby surfaces and their own soft shadows, without any expensive light sources being involved. These can have any shape, which has many applications and will be hugely important for the upcoming force thaumaturgy.
GI还允许发光的物体和效果在附近的表面上投下它们的光芒和它们自己的柔和阴影,而不涉及任何昂贵的光源。 这些东西可以有任何形状,这有很多应用,对即将到来的“巫术”之力来说将是非常重要的。

Full size image(全尺寸图片)
Here's an example of the classic blue jar using the new GI. The moving crate casts soft shadows and can even block the glow close up.
下面是一个使用新GI下的经典蓝罐的例子。 移动的板条箱投下柔和的阴影,甚至可以阻挡近距离的光亮。