GPU渲染

    To enable GPU rendering, go into the Preferences ‣ System ‣ Cycles Render Devices, and select either CUDA, OptiX, HIP, or Metal. Next, you must configure each scene to use GPU rendering in Properties ‣ Render ‣ Device.

    Blender supports different technologies to render on the GPU depending on the particular GPU manufacturer and operating system.

    Note

    With all GPU rendering technologies, 开放着色语言 is not supported.

    CUDA is supported on Windows and Linux and requires a Nvidia graphics cards with compute capability 3.0 and higher. To make sure your GPU is supported, see the with the compute capabilities and supported graphics cards.

    OptiX — NVIDIA

    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 OptiX works best on RTX graphics cards with hardware ray tracing support (e.g. Turing and above).

    HIP — AMD

    HIP is supported on Windows and requires a discrete AMD graphics card with the RDNA architecture or newer and AMD Radeon Software 21.12.1 or AMD Radeon PRO Software 21.Q4 GPU drivers and newer.

    Support GPUs include:

    • AMD Radeon RX 5000 Series

    • AMD Radeon RX 6000 Series

    • AMD Radeon Pro W6000 Series

    Please refer to for more information about AMD graphics cards and their architectures.

    Note

    Metal — Apple (macOS)

    Metal is supported on Apple computers with Apple Silicon or AMD graphics cards. macOS 12.2 is required to use Metal with Apple Silicon while macOS 12.3 is required to use Metal with AMD graphics cards.

    显卡正在渲染时,它不能重新绘制用户界面,这会导致Blender无法响应。我们试图通过尽可能频繁地回馈GPU控制来避免这个问题,但是无法保证完全流畅的交互,特别是在复杂的场景中。这是显卡没有真正解决方案的限制,尽管我们可能在未来有所改进。

    如果可能的话,最好配备多个GPU,其中的一个用于显示界面,另一个用于渲染。

    为什么场景是通过CPU渲染的,而不是GPU?

    There may be multiple causes, but the most common one is that there is not enough memory on your graphics card. Typically, the GPU can only use the amount of memory that is on the GPU (see Would multiple GPUs increase available memory? for more information). This is usually much smaller than the amount of system memory the CPU can access. With CUDA, OptiX, HIP and Metal devices, if the GPU memory is full Blender will automatically try to use system memory. This has a performance impact, but will usually still result in a faster render than using CPU rendering.

    多个GPU可以用于渲染吗?

    可以。打开 用户设置 ‣ 系统 ‣ 计算设备面板 ,按需进行设置即可。

    多个GPU能够增加显存容量吗?

    通常来说,不行。每个GPU只能访问自己的显存,但是有些GPU可以与其它GPU共享显存。这可以通过遵循 中的步骤启用共享。

    取决于所使用的硬件。根据测试场景,不同的技术所需的计算时间也有差异。有关不同设备性能的最新信息,请浏览 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.

    Unsupported GNU version

    On Linux, depending on your GCC version you might get this error. See the Nvidia CUDA Installation Guide for Linux for a list of supported GCC versions. There are two possible solutions to this error:

    使用备用编译器

    如果安装了与安装的CUDA工具包版本兼容的较旧GCC,则可以使用它而不是默认编译器。这是通过在启动Blender时设置 环境变量来完成的。

    从命令行启动Blender,如下所示:

    (替换兼容GCC编译器的名称或路径)。

    If the above is unsuccessful, delete the following line in :

    这将允许Cycles在第一次尝试使用GPU进行渲染时成功编译CUDA渲染内核。成功构建内核后,你可以像往常一样启动Blender,CUDA内核仍将用于渲染。

    CUDA错误:内核编译失败

    如果您有新的Nvidia显卡尚未支持您安装的Blender版本和CUDA工具包,则可能会出现此错误。在这种情况下,Blender可能会尝试为您的显卡动态构建内核并失败。

    在这种情况下,您可以:

    1. 检查最新的Blender版本(官方或 实验版本) 是否支持您的显卡。

    2. 如果您自己构建Blender,请尝试下载并安装更新的CUDA开发人员工具包。

    通常用户不需要安装CUDA工具箱,因为Blender带有预编译的内核。

    Error: Out of memory

    这通常意味着GPU没有足够的显存来储存场景。

    Note

    使用较小的纹理分辨率是减少内存使用量的一种方法。比如,8k、4k、2k 和 1k 图像纹理分别占 256MB、64MB、16MB 和 4MB 的内存。

    如果同时使用GPU来显示与渲染,Windows系统在GPU渲染计算时间方面存在局限。如果您的场景非常复杂,那么Cycles引擎就需要占用过多的GPU时间。通过降低性能面板中的平铺尺寸值可以让此问题得到缓解,但真正的解决方案只有使用多个相对独立的显卡分别进行界面显示与渲染。

    另外一种解决方案是增大失去相应的等待时间;这会使在渲染计算力非常大的场景的时候,让用户界面的反应慢很多。 更多请参考

    CUDA 错误: 在 cuCtxSynchronize() 中的未知错误

    一个未知的错误可能有很多原因,但有一种可能性是它超时。请参阅上述答案以获取解决方案。