VTK使用NVIDIA RTX添加gpu加速射线跟踪

时间:2024-03-31 07:26:04

原文url:https://blog.kitware.com/paraview-and-vtk-add-gpu-accelerated-ray-tracing-with-nvidia-rtx/

ParaView and VTK add GPU-accelerated ray tracing with NVIDIA RTX

One of the many cool new features to look forward to in the upcoming ParaView 5.7 and VTK 9.0 releases is the seamless support for hardware-accelerated ray tracing using OptiX, a component of the NVIDIA RTX platform.

即将发布的ParaView 5.7和VTK 9.0版本中有许多很酷的新特性,其中之一就是使用OptiX (NVIDIA RTX平台的一个组件)无缝支持硬件加速射线跟踪。

ParaView accelerated by the latest-generation GPUs, especially with the RT Cores devoted to ray tracing found on NVIDIA’s Turing GPUs, brings a wide range of benefits to scientific visualization. Far beyond making pretty pictures for publication and outreach, the resulting photo-realism can in some cases be used for direct comparisons between simulation output and observations.

最新一代gpu加速了ParaView,特别是在NVIDIA的Turing gpu上发现的用于射线追踪的RT核心,为科学可视化带来了广泛的好处。除了制作可供发表和推广的漂亮图片,生成的照片真实感在某些情况下还可用于直接比较模拟输出和观察结果。

In others, the visual cues obtained by the physically based rendering process, including shadows, ambient occlusion, or even depth-of-field effects, can help to better understand the spatial relationship of the objects in the scene. This visual fidelity comes with a significant computational cost, but modern GPUs make it possible to perform this process in real time.

在另一些场景中,通过基于物理的渲染过程获得的视觉线索,包括阴影、环境遮挡、甚至景深效果,可以帮助更好地理解场景中对象的空间关系。这种视觉逼真度带来了巨大的计算成本,但现代gpu使实时执行这一过程成为可能。

To explore these features, simply download the upcoming ParaView 5.7.0 release candidate 2 (or later) from paraview.org and launch it. Make sure you set the “–enable-streaming” command line flag to allow the visuals to improve over time while maintaining a high degree of interactivity.

要探索这些特性,只需从paraview.org下载即将发布的ParaView 5.7.0候选版本2(或更新版本)并启动它。确保您设置了“-enable-streaming”命令行标志,以允许视觉效果随着时间的推移而改善,同时保持高度的交互性。
VTK使用NVIDIA RTX添加gpu加速射线跟踪
Then set up your visualization pipeline as you typically do in ParaView. In the properties menu, select the “Enable Ray Tracing” check box (typically at the very bottom) as well as the “OptiX Path Tracer” backend. If the default value for progressive passes is a bit too low, make sure you set it to some value above 4.

然后像在ParaView中一样设置可视化管道。在属性菜单中,选择“启用射线跟踪”复选框(通常在最下面)以及“OptiX路径跟踪器”后端。如果渐进传递的默认值太低,请确保将其设置为大于4的值。
VTK使用NVIDIA RTX添加gpu加速射线跟踪
From here on you’re ready to explore the RTX backend, provided you’re on a Pascal generation or newer GPU. Make sure you use the Light Inspector to set the proper light sources, including area lights for soft shadows. Experiment with materials from the provided list of pre-set materials, or define them with your own materials library. With the Material Definition Language (MDL) [https://developer.nvidia.com/mdl-sdk] being an integral part of RTX, you can now choose from an almost infinite collection of materials. And with the Adjust Camera panel, you can set the camera properties, including focal point and depth of field.

从这里开始,您已经准备好探索RTX后端,前提是您使用的是Pascal一代或更新的GPU。确保使用灯光检查器设置合适的光源,包括柔和阴影的区域灯光。使用预先设置的材料列表中的材料进行试验,或者使用您自己的材料库定义它们。由于材料定义语言(Material Definition Language, MDL) [https://developer.nvidia.com/mdl-sdk]是RTX不可分割的一部分,您现在可以从几乎无限的材料集合中进行选择。通过调整相机面板,你可以设置相机属性,包括焦点和景深。
VTK使用NVIDIA RTX添加gpu加速射线跟踪
The iconic OpenFoam Motorbike, rendered with the OptiX path tracer in ParaView. Realistic materials, shadows and depth of field help to guide the viewer to the interesting part of the visualization — the turbulence around the front wheel — while providing context to convey spatial relationships.

标志性的OpenFoam摩托车,呈现与OptiX路径跟踪在ParaView。真实的材料,阴影和景深有助于引导观众到可视化的有趣部分——前轮周围的湍流——同时提供环境来传达空间关系。

To get more details, check out the recording of the ParaView/OptiX webinar [https://info.nvidia.com/ray-tracing-for-scientific-visualization-reg-page.html?ncid=em-ded-n1-84042]. Also, note that the renderer is integrated at the VTK level, and all these features are available within VTK as well. And, like all the other VTK or ParaView features, RTX rendering is exposed via the C++ API, as well as via Python.

要了解更多细节,请查看ParaView/OptiX webinar的记录[https://info.nvidia.com/ray-tracing-for-scientific-visualization-reg-page.html?ncid=em-ded-n1-84042]。另外,请注意渲染器是在VTK级别集成的,而且所有这些特性在VTK中也可用。而且,与所有其他VTK或ParaView特性一样,RTX呈现是通过c++ API和Python公开的。

The above focuses on just one of the new features in the latest release of ParaView and VTK. For all the other new and improved features of ParaView 5.7, including the improved plugin for the IndeX volume renderer [https://www.nvidia.com/en-us/data-center/index-paraview-plugin/], check out the release notes.

以上重点介绍了ParaView和VTK最新版本中的一个新特性。对于所有其他新的和改进的ParaView 5.7特性,包括索引卷渲染器的改进插件[https://www.nvidia.com/en-us/data/index-paraview-plugin/],请查看发布说明。