GPU渲染
GPU(图形处理器) 渲染能够使用你的显卡进行渲染,而不是CPU。这会加快渲染速度,因为如今GPU的设计旨在能够胜任大量运算方面的应用。另一方面,由于显存容量有限,它们在渲染复杂场景时也有一些限制,并且在使用相同的显卡进行显示和渲染时会出现交互性问题。
To enable GPU rendering, go into the Preferences ‣ System ‣ Cycles Render Devices, and select either CUDA, OptiX, HIP, oneAPI, or Metal. Next, you must configure each scene to use GPU rendering in Properties ‣ Render ‣ Device.
渲染技术
Blender支持不同的技术在GPU上渲染,具体取决于特定的GPU制造商和操作系统。
库达 — 英伟达
CUDA 在Windows和Linux上被支持,需要计算能力为3.0及以上的Nvidia显卡。为了确保你的GPU被支持,请看`Nvidia显卡列表 <https://developer.nvidia.com/cuda-gpus#compute>`__ ,其中有计算能力和支持的显卡。
欧普提克斯 — 英伟达
OptiX is supported on Windows and Linux and requires a Nvidia graphics cards with compute capability 5.0 and higher and a driver version of at least 470. To make sure your GPU is supported, see the list of Nvidia graphics cards.
OptiX takes advantage of hardware ray-tracing acceleration in RTX graphics cards, for improved performance.
macOS — AMD
HIP is supported on Windows and Linux and requires a AMD graphics card with the Vega architecture or newer. Both discrete GPUs and APUs are supported.
包括
Radeon VII
Radeon RX Vega系列
Radeon RX 5000系列
Radeon RX 6000系列
Radeon RX 7000 Series
Radeon Pro WX 9100
Radeon Pro W6000系列
最低驱动进程版本:
Windows。Radeon软件21.12.1或Radeon PRO软件21.Q4
Linux: Radeon Software 22.10 or ROCm 5.3
请参考`AMD的网站 <https://www.amd.com/en/graphics>`__,了解更多关于AMD显卡及其架构的信息。
On Windows, experimental hardware ray-tracing support is available with the most recent drivers. This can be enabled in the preferences. However there are currently known issues regarding motion blur, hair rendering and degenerate triangle shapes.
The Clip extension mode in 图像纹理着色器节点 is not supported for HIP.
一个知识产权 — 英特尔
oneAPI is a computation library that is supported on Windows and Linux and requires a Intel® Arc™ graphics card with the Xe HPG architecture. Hardware acceleration for ray-tracing is supported.
包括
- macOS — Intel
最低驱动进程版本:
Windows: Intel Graphics Driver XX.X.101.4644
Linux:
intel-level-zero-gpu
package 1.3.25812, typically available through theintel-compute-runtime
package XX.XX.25812
关于英特尔显卡及其架构的更多信息,请参考` 英特尔的网站 <https://www.intel.com/content/www/us/en/products/details/discrete-gpus.html>`__。
macOS:
Metal is supported on Apple computers with Apple Silicon, AMD and Intel graphics cards. macOS 13.0 or newer is required to support all features and graphics cards.
Using AMD graphics cards with Metal has a number of limitations. Light Trees and Shadow Caustics are not supported, and the Principled Hair BSDF causes poor rendering performance.
局限
Path Guiding is not supported on any GPU.
开放着色语言 is only supported for OptiX, with some limitations listed in the documentation.
常见问题
为什么在渲染过程中Blender没有反应?
On older GPU generations, graphics cards can only either render or draw the user interface. This can make Blender unresponsive while it is rendering. Heavy scenes can also make Blender unresponsive on newer GPUs, when using a lot of memory or executing expensive shaders, however this is generally less of a problem.
The only complete solution for this is to use a dedicated GPU for rendering, and another for display.
为什么场景是通过CPU渲染的,而不是GPU?
可能有多种原因,但最常见的原因是你的显卡上没有足够的内存。通常情况下,GPU只能使用GPU上的内存量(更多信息请参见 多个GPU会增加可用内存吗? )。这通常比CPU可以访问的系统内存量小得多。对于CUDA、OptiX、HIP和Metal设备,如果GPU内存已满,Blender会自动尝试使用系统内存。这对性能有影响,但通常还是会比使用CPU渲染的速度快。
多个GPU可以用于渲染吗?
可以。打开 用户设置 ‣ 系统 ‣ 计算设备面板 ,按需进行设置即可。
多个GPU会增加可用内存吗?
Typically, no, each GPU can only access its own memory.
The exception is NVIDIA GPUs connected with NVLink, where multiple GPUs can share memory at a small performance cost. This is can be enabled with Distributed Memory Across Devices in the preferences.
哪个渲染更快?
取决于所使用的硬件。根据测试场景,不同的技术所需的计算时间也有差异。有关不同设备性能的最新信息,请浏览 Blender Open Data 。
错误信息
In case of problems, be sure to install the official graphics drivers from the GPU manufacturers website, or through the package manager on Linux. The graphics drivers provided by the computer manufacturer can sometimes be outdated or incomplete.
错误:内存不足
这通常意味着GPU没有足够的显存来储存场景。
Note
使用较小的纹理分辨率是减少内存使用量的一种方法。比如,8k、4k、2k 和 1k 图像纹理分别占 256MB、64MB、16MB 和 4MB 的内存。
The NVIDIA OpenGL driver lost connection with the display driver
如果同时使用GPU来显示与渲染,Windows系统在GPU渲染计算时间方面存在局限。如果您的场景非常复杂,那么Cycles引擎就需要占用过多的GPU时间。通过降低性能面板中的平铺尺寸值可以让此问题得到缓解,但真正的解决方案只有使用多个相对独立的显卡分别进行界面显示与渲染。
Another solution can be to increase the time-out, although this will make the user interface less responsive when rendering heavy scenes. Learn More Here.
不支持的 GNU 版本
在Linux上,根据你的GCC版本,你可能会得到这个错误。请参阅 “Nvidia CUDA Installation Guide for Linux <https://docs.nvidia.com/cuda/archive/10.2/cuda-installation-guide-linux/index.html>`__“,了解支持的GCC版本列表。对于这个错误,有两种可能的解决方案。
使用备用编译器
如果安装了与安装的CUDA工具包版本兼容的较旧GCC,则可以使用它而不是默认编译器。这是通过在启动Blender时设置 CYCLES_CUDA_EXTRA_CFLAGS
环境变量来完成的。
从命令行启动Blender,如下所示:
CYCLES_CUDA_EXTRA_CFLAGS="-ccbin gcc-x.x" blender
(Substitute the name or path of the compatible GCC compiler).
删除兼容性检查
如果上述操作不成功,请删除 “/usr/本地/库达/包含/host_config.h”中的以下行:
#error -- unsupported GNU version! gcc x.x and up are not supported!
这将允许Cycles在第一次尝试使用GPU进行渲染时成功编译CUDA渲染内核。成功构建内核后,你可以像往常一样启动Blender,CUDA内核仍将用于渲染。
CUDA错误:内核编译失败
This error may happen if you have a new NVIDIA graphics card that is not yet supported by the Blender version and CUDA toolkit you have installed. In this case Blender may try to dynamically build a kernel for your graphics card and fail.
在这种情况下,您可以:
检查最新的Blender版本(官方或 实验版本) 是否支持您的显卡。
如果您自己构建Blender,请尝试下载并安装更新的CUDA开发人员工具包。
通常用户不需要安装CUDA工具箱,因为Blender带有预编译的内核。