幻想供电
In March, Unity announced real-time ray tracing support for NVIDIA RTX technology. Real-time ray tracing introduces photorealistic lighting qualities to Unity’s High-Definition Render Pipeline (HDRP), unlocking new potential in Unity’s visual capabilities. Preview release of NVIDIA RTX in Unity is planned for 2019.3.
3月,Unity宣布了对NVIDIA RTX技术的实时光线追踪支持。 实时光线追踪为Unity的高清渲染管线(HDRP)引入了逼真的照明质量,从而释放了Unity视觉功能的新潜力。 计划于2019.3。在Unity中预览版NVIDIA RTX。
To show off this new lighting technology, we took on the challenge to match a CG Unity-rendered BMW to a real BMW 8 Series Coupe that we filmed in a warehouse. The final project incorporated both the live interactive demo and a pre-rendered 4K video, cutting between the real car and the CG car. We challenged viewers to distinguish between the two. Our final video featured 11 CG BMW shots.
为了展示这种新的照明技术 ,我们面临了将CG Unity渲染的BMW与我们在仓库拍摄的真实BMW 8系双门轿跑车相匹配的挑战。 最终项目结合了实时互动演示和预渲染的4K视频,在真实汽车和CG汽车之间切换。 我们向观众提出挑战,以区分两者。 我们的最终视频收录了11张CG BMW镜头。
Both the advertising and automotive industries thrive on fast turnaround. We produced a sample commercial featuring a BMW to demonstrate how decisions made during the advertisement creation process can benefit from the versatility of a real-time engine.
广告和汽车行业都在快速周转中蓬勃发展。 我们制作了一个带有BMW的示例广告,以演示在广告创建过程中做出的决策如何从实时引擎的多功能性中受益。
We launched the demo and made official announcements at the Game Developers Conference (GDC) as well as at NVIDIA’s GPU Technology Conference (GTC).
我们在游戏开发者大会(GDC)和NVIDIA的GPU技术大会(GTC)上启动了该演示并发布了正式声明。
This blog post will take you through our production process.
这篇博客文章将带您完成我们的制作过程。
预生产 (Pre-production)
Previsualization was essential in helping us prepare for the shoot, and in creating a polished, professional ad. We worked directly in Unity alongside Director of Photography Christoph Iwanow to create a full CG version of the film. For this initial take, we used simple lighting and shaders and focused on nailing down pacing, camera placement, shot framing, depth of field, and areas of focus.
预可视化对于帮助我们为拍摄做准备以及制作精美,专业的广告至关重要。 我们与摄影总监克里斯托夫·伊万诺(Christoph Iwanow)直接在Unity工作,为电影制作了完整的CG版本。 对于最初的拍摄,我们使用简单的照明和着色器,并着重确定起搏,相机放置,构图,景深和聚焦区域。
Using Unity’s Physical Camera feature, we were able to match the real-life on-set camera and lenses to be used down to the most precise detail: sensor size, ISO, shutter speed, lens distortions, and more. This allowed us to match the look and feel of the real camera in order to achieve a 1:1 match on all levels.
使用Unity的物理相机功能 ,我们可以将实际使用的相机和镜头匹配到最精确的细节:传感器尺寸,ISO,快门速度,镜头变形等等。 这使我们能够匹配真实相机的外观,从而在所有级别上实现1:1匹配。
Cinemachine enabled us to easily create believable camera movements while retaining rapid iteration speeds.
Cinemachine使我们能够轻松创建令人信服的相机运动,同时保持快速的迭代速度。
The previsualization stage was also our lighting experimentation playground. The real-life lighting equipment we planned to use was also replicated in Unity in every detail: the shapes and dimensions of the lights, temperature, and intensity. We could instantly see what light tubes hanging from the ceiling would look like and refine their placement, intensity, and color; we could generate perfect reflections on the car. This process would otherwise take up several hours of precious on-set time.
可视化前的阶段也是我们的照明实验场。 我们计划使用的现实照明设备也已在Unity中进行了详细复制:照明灯的形状和尺寸,温度和强度。 我们可以立即看到悬挂在天花板上的光导管的外观,并优化它们的位置,强度和颜色。 我们可以在汽车上产生完美的反射。 否则,此过程将花费几个小时的宝贵启动时间。
By digitally replicating the real-world lighting and camera setups, Christoph was able to experiment with more combinations and find the look he wanted in advance of filming, so we could use filming time more effectively.
通过数字复制现实世界的照明和相机设置,Christoph可以尝试更多的组合并在拍摄之前找到他想要的外观,因此我们可以更有效地利用拍摄时间。
后期制作 (Post-production)
The day after filming, we could start refining shots right away. Since the previz was done in Unity, we didn’t need to migrate assets. We used the lighting references we took on set, as well as referencing the real car, to ensure that our asset reacted realistically in look development. The technology now allows us to use image textures on area lights, so we were able to use photos of the actual light sources as textures for more realistic lighting and reflections.
拍摄的第二天,我们可以立即开始完善镜头。 由于预览是在Unity中完成的,因此我们不需要迁移资产。 我们使用了我们设定的照明参考以及真实的汽车,以确保我们的资产在外观开发中做出切合实际的React。 该技术现在使我们能够在区域光上使用图像纹理,因此我们能够将实际光源的照片用作纹理,以实现更逼真的照明和反射。
With the power of Unity, we were able to render in 4K ultra high definition from day one. This is an obvious advantage over offline rendering, where in many cases work-in-progress deliveries are rendered at lower resolutions to save costs and time. By delivering in 4K from the very first iterations, we were able to fine-tune small details in look dev and lighting. Many more iterations on renders in a short time allowed us to obtain strong visuals with a small art team. It also meant the results in the final renders were predictable.
借助Unity的强大功能,我们从第一天开始就可以4K超高清渲染。 与离线渲染相比,这是一个明显的优势,在许多情况下,离线渲染会以较低的分辨率渲染进行中的交付,以节省成本和时间。 通过从最初的迭代中提供4K,我们就可以微调外观开发和照明中的小细节。 在短时间内进行了更多的渲染迭代,这使我们可以由一个小型美术团队获得强大的视觉效果。 这也意味着最终渲染的结果是可预测的。
For the shots using plate integrations, the footage was tracked outside of Unity, and the camera and track data were then imported into Unity as an FBX file.
对于使用印版集成的镜头,将镜头跟踪到Unity外部,然后将摄像机和跟踪数据作为FBX文件导入到Unity中。
As for the other cameras that we created directly in Unity, two Cinemachine features were essential in creating believable and realistic camera movements:
至于我们直接在Unity中创建的其他相机,Cinemachine的两个功能对于创建真实逼真的相机运动至关重要:
Cinemachine Storyboard extension: Among its many features, the Storyboard extension allows you to align camera angles. It was an essential tool for us in easily replicating the specific camera movements required to recreate a shot completely in CG. We used a frame from the on-set camera footage as an overlay to act as a guide to align the CG camera. This was done for the first, middle and last frames of some shots.
Cinemachine情节提要扩展板:情节提要扩展板具有许多功能,可让您对齐相机角度。 它是我们轻松复制完全重拍CG所需的特定相机运动所需的基本工具。 我们使用摄像机镜头中的帧作为覆盖,以作为对齐CG摄像机的指导。 这是针对某些镜头的第一帧,中间帧和最后一帧进行的。
Cinemachine noise: Applying procedural noise to our camera moves made it easy for us to get rid of the unnatural perfectness of CG cameras by adding convincing micro-movements to the camera’s motion. We could ensure the movements were interesting, without being obviously repetitive.
电影机噪声:将程序性噪声应用于摄像机的运动,可以通过在摄像机的运动中添加令人信服的微运动来轻松摆脱CG摄像机不自然的完美。 我们可以确保动作有趣,而不必明显重复。
Our original concept featured a CG BMW with a different paint color than the real BMW. As the project evolved, we felt it was a stronger statement to have both cars be the same color so we could cut between them seamlessly. Changing the color of the car was a late-stage decision that could be made organically in Unity, as lighting and look dev artists could work on updates concurrently. A similar project in an offline renderer would have dailies with notes like “rotate the wheel 20 degrees to the right” or “drop the key light down a stop.” Instead of needing a full day turnaround for small technical changes, we could work out these changes interactively and focus our energy on creative decisions.
我们最初的概念是CG宝马,其漆面颜色与真正的宝马不同。 随着项目的发展,我们认为将两辆汽车的颜色相同是一个更有力的主张,因此我们可以在它们之间进行无缝切割。 更改汽车的颜色是后期的决定,可以在Unity中有机地做出决定,因为灯光和外观开发艺术家可以同时进行更新。 离线渲染器中的一个类似项目中,每天都会有一些注释,例如“将轮子向右旋转20度”或“将钥匙灯放下一个挡块”。 无需为微小的技术变更而需要一整天的周转时间,我们可以交互式地进行这些变更,并将精力集中在创造性的决策上。
For the two shots using plate integrations, we used Shader Graph to create a screen-space projected material with the original footage at HD resolution. We used this shader on the ground and walls around the car so that we could have realistic reflections from the plate onto the car. We supplemented with additional lighting, rendered the shots out of Unity, and then finished the final ground integration with the full-res plate using external compositing software.
对于使用印版集成的两个镜头,我们使用了Shader Graph来创建具有高清分辨率原始素材的屏幕空间投影材料。 我们在汽车的地面和墙壁上使用了此着色器,以便可以从板到汽车上产生逼真的反射。 我们补充了额外的照明,从Unity中渲染了镜头,然后使用外部合成软件完成了与Full-res板的最终地面集成。
实时光线追踪 (Real-time ray tracing)
The usual technique used in game production to simulate reflections relies on a set of reflection probes set up at various locations combined with screen space ray tracing. This usually results in various light leaks and a coarse approximation of surface properties. With real-time ray tracing, we can now correctly reflect what is offscreen without any setup from the artists. However, such a reflection effect requires some arrangement of the rendering engine. In traditional game production, everything that isn’t within the frustum of the camera tends to be disabled, but now it is possible to reflect objects illuminated and shadowed by sources that are not initially visible onscreen. In addition to accurately simulating metal objects, effective ray tracing requires multiple bounces, which isn’t affordable within our performance constraint. We chose to handle only one bounce. The result of other bounces have been approximated but using the color of the metal multiply by current indirect diffuse lighting.
游戏制作中用于模拟反射的常用技术依赖于在不同位置设置的一组反射探针,并结合屏幕空间光线跟踪。 这通常导致各种漏光和表面性质的粗略近似。 通过实时光线跟踪,我们现在可以正确反映屏幕外的内容,而无需艺术家进行任何设置。 但是,这种反射效果需要渲染引擎的某种布置。 在传统的游戏制作中,所有不在摄像机视锥范围内的东西都倾向于被禁用,但是现在可以反射由最初在屏幕上不可见的光源照明和阴影的对象。 除了精确模拟金属物体外,有效的光线追踪还需要多次反射,这在我们的性能限制内是无法承受的。 我们选择只处理一次反弹。 其他反弹的结果已被近似,但是使用金属的颜色乘以当前的间接漫射照明。
Traditional offline renderers are good at managing the rendering of large textured area lights. However, using an offline renderer is costly and produces a lot of noise, (the more rays you use, the less noise, but that increases the rendering cost per frame). To achieve a real-time frame rate while upholding quality, our Unity Labs researchers developed an algorithm in conjunction with Lucasfilm and NVIDIA (see the paper they produced, Combining Analytic Direct Illumination and Stochastic Shadows). With this approach, the visibility (area shadow) can be separated from the direct lighting evaluation, while the visual result remains intact. Coupled with a denoising technique applied separately on these two components, we were able to launch very few rays (just four in the real-time demo) for large textured area lights and achieve our 30 fps target.
传统的脱机渲染器擅长管理大型纹理区域灯光的渲染。 但是,使用脱机渲染器成本很高,并且会产生大量噪点(您使用的光线越多,噪点就越少,但这会增加每帧的渲染成本)。 为了在保持质量的同时实现实时帧速率,我们的Unity实验室研究人员与Lucasfilm和NVIDIA共同开发了一种算法(请参阅他们产生的论文, 将分析直接照明和随机阴影相结合 )。 通过这种方法,可以将可见性(区域阴影)与直接照明评估分开,而视觉结果保持不变。 结合在这两个组件上分别应用的降噪技术,我们能够为大型纹理区域灯发出极少的光线(实时演示中只有四束光线),并达到了30 fps的目标。
Indirect diffuse or diffuse light bouncing enhances the lighting of a scene by grounding objects and reacting to changing lighting conditions. The usual workflow for game production is painful and relies on setting up Light Probes in a scene or using lightmaps. For the movie, we used a brute force one-bounce indirect diffuse approach with ray tracing – with this approach several rays are launched, allowing us to get the desired light bleeding effect.
间接的漫反射或漫反射光反射通过将物体接地并对变化的照明条件做出React来增强场景的照明。 通常,游戏制作的工作流程很痛苦,并且依赖于在场景中设置“光探测器”或使用光照贴图。 对于电影,我们使用了带有射线追踪的强力单反射间接扩散方法–通过这种方法,可以发射多条射线,从而使我们能够获得所需的发光效果。
Such an approach gives artists immense freedom, without them having to set up anything. However, it is costly.
这种方法为艺术家提供了极大的自由,而无需他们进行任何设置。 但是,这是昂贵的。
For the real-time version, we selected a cheaper approach: with ray tracing, we were able to rebake a set of light probes each frame dynamically; traditionally, we would have used a set of pre-bake light probes baked lightmaps.
对于实时版本,我们选择了一种更便宜的方法:通过光线跟踪,我们能够动态地重新烘焙每帧的一组光探测器; 传统上,我们将使用一组预烘焙光探针烘焙光照贴图。
Just as ray-traced reflection can replace the screen space technique, real-time ray tracing can generate ambient occlusion comparable to that produced by the widely used screen space technique. The resource-friendly indirect diffuse method mentioned above can be enhanced with ray-traced ambient occlusion to better handle the light leaks implied by the technique. For performance reasons, we chose not to support transparent objects, which would require handling the transmission of light through transparent objects.
正如光线跟踪反射可以代替屏幕空间技术一样,实时光线跟踪可以产生与广泛使用的屏幕空间技术可比的环境光遮挡。 上面提到的资源友好型间接漫射方法可以通过光线跟踪的环境光遮挡来增强,以更好地处理该技术隐含的光泄漏。 出于性能原因,我们选择不支持透明物体,这将需要处理通过透明物体的光传输。
Real-time ray tracing is the only tool able to achieve the rendering of photorealistic headlights in real-time. The shape of a headlight and its multiple lens and reflector optics result in a complex light interaction that is challenging to simulate. We added the interaction of multiple successive smooth reflective and transmissive rays, which allows the light beam to shift as you see it in the real world. The fine details can be controlled with texture details that will influence the ray direction.
实时光线追踪是唯一能够实时渲染逼真的前灯的工具。 前照灯的形状以及它的多个透镜和反射镜光学器件会导致复杂的光交互,这很难模拟。 我们添加了多个连续的平滑反射和透射光线的相互作用,这使光束可以像您在现实世界中看到的那样移动。 可以用会影响射线方向的纹理细节控制精细细节。
新现实 (A new reality)
invent yourself and then reinvent yourself, don’t swim in the same slough. invent yourself and then reinvent yourself and stay out of the clutches of mediocrity.
发明自己,然后重新发明自己,不要在同一泥沼中游泳。 发明自己,然后重新发明自己,远离庸俗的控制。
– Charles Bukowski
–查尔斯·布科夫斯基
Unity’s real-time ray tracing is a new reality. We aren’t trying to rebuild traditional production pipelines from the ground up. But we are removing some of the pain points that are typically associated with a project like this. Having the power to interactively change shots and get immediate feedback from the creative director and director of photography is invaluable. Thanks to the decision to build this film in Unity, we could potentially migrate this work to other projects with ease and create a diverse yet cohesive campaign across multiple mediums. Real-time ray tracing is affording us the ability to refine the traditional automotive advertising production pipeline to work in a more creative, collaborative and affordable way.
Unity的实时光线追踪是一个新的现实。 我们没有尝试从头开始重建传统的生产管道。 但是,我们正在消除通常与此类项目相关的一些痛点。 能够交互式地更改镜头并立即从创意总监和摄影总监那里获得反馈的能力是无价的。 由于决定在Unity中制作这部电影,我们有可能将这项工作轻松地迁移到其他项目,并跨多种媒介创建一个多样化而又凝聚力的活动。 实时光线追踪使我们能够完善传统的汽车广告制作渠道,以更具创意,协作和负担得起的方式工作。
—
-
You can explore NVIDIA RTX and Unity today with this experimental release. Please note that this is a prototype and the final implementation of DXR will be different from this version.
您可以通过此实验版本立即浏览NVIDIA RTX和Unity。 请注意,这是一个原型,DXR的最终实现将与此版本有所不同。
翻译自: https://blogs.unity3d.com/2019/04/11/reality-vs-illusion/
幻想供电