使用 Azure 进行渲染Rendering using Azure

渲染是创建 3D 模型并将其转换为 2D 图像的过程。Rendering is the process of taking 3D models and converting them into 2D images. 在 Autodesk 3ds Max、Autodesk Maya 和 Blender 等应用程序中创作 3D 场景文件。3D scene files are authored in applications such as Autodesk 3ds Max, Autodesk Maya, and Blender. Autodesk Maya、Autodesk Arnold、Chaos Group V-Ray 和 Blender Cycles 等渲染应用程序可生成 2D 图像。Rendering applications such as Autodesk Maya, Autodesk Arnold, Chaos Group V-Ray, and Blender Cycles produce 2D images. 有时,可以从场景文件创建单一的图像。Sometimes single images are created from the scene files. 但是,常见的操作是建模并渲染多个图像,然后将其组合成动画。However, it's common to model and render multiple images, and then combine them in an animation.

传媒娱乐行业往往使用渲染工作负荷来生成特效 (VFX)。The rendering workload is heavily used for special effects (VFX) in the Media and Entertainment industry. 广告、零售、石油和天然气及制造等其他众多行业也会使用渲染。Rendering is also used in many other industries such as advertising, retail, oil and gas, and manufacturing.

渲染过程属于计算密集型工作;要生成的帧/图像数可能很多,而渲染每个图像可能需要大量的时间。The process of rendering is computationally intensive; there can be many frames/images to produce and each image can take many hours to render. 因此,渲染是一个完美的批处理工作负荷,可以利用 Azure 和 Azure Batch 来并行运行多个渲染器。Rendering is therefore a perfect batch processing workload that can leverage Azure and Azure Batch to run many renders in parallel.

为何使用 Azure 进行渲染?Why use Azure for rendering?

出于多种原因,渲染是非常适合 Azure 与 Azure Batch 的工作负荷:For many reasons, rendering is a workload perfectly suited for Azure and Azure Batch:

  • 可将渲染作业拆分为多个片段,然后使用多个 VM 并行运行这些片段:Rendering jobs can be split into many pieces that can be run in parallel using multiple VMs:
    • 动画由许多帧组成,每个帧可以并行渲染。Animations consist of many frames and each frame can be rendered in parallel. 可用于处理每个帧的 VM 越多,生成所有帧和动画的速度就越快。The more VMs available to process each frame, the faster all the frames and the animation can be produced.
    • 某些渲染软件允许将单个帧分解为多个片段,例如平铺图像或切片。Some rendering software allows single frames to be broken up into multiple pieces, such as tiles or slices. 每个片段可以单独渲染,并在完成所有片段后合并成最终的图像。Each piece can be rendered separately, then combined into the final image when all pieces have finished. 可用的 VM 越多,渲染帧的速度就越快。The more VMs that are available, the faster a frame can be rendered.
  • 渲染项目可能需要庞大的规模:Rendering projects can require huge scale:
    • 单个帧可能很复杂,即使在高端硬件上,也需要花费多个小时才能完成渲染;而动画可能由几十万个帧组成。Individual frames can be complex and require many hours to render, even on high-end hardware; animations can consist of hundreds of thousands of frames. 优质动画需要占用大量的计算资源,才能在合理的时间内完成渲染。A huge amount of compute is required to render high-quality animations in a reasonable amount of time. 在某些情况下,并行渲染数千个帧需要使用 100,000 多个核心。In some cases, over 100,000 cores have been used to render thousands of frames in parallel.
  • 渲染项目基于项目,需要不同数量的计算资源:Rendering projects are project-based and require varying amounts of compute:
    • 根据需要分配计算和存储容量,根据项目期间的负载扩展或缩减容量,并在完成项目后删除容量。Allocate compute and storage capacity when required, scale it up or down according to load during a project, and remove it when a project is finished.
    • 为分配的容量付费,没有负载时(例如,在项目切换时)不需要付费。Pay for capacity when allocated, but don't pay for it when there is no load, such as between projects.
    • 为意外变化导致的需求喷发做好准备;如果以后项目发生意外的变化,并且需要在短时间内处理好这些变化,则可以进行扩展。Cater for bursts due to unexpected changes; scale higher if there are unexpected changes late in a project and those changes need to be processed on a tight schedule.
  • 根据应用程序、工作负荷和时间范围,从各种硬件中进行选择:Choose from a wide selection of hardware according to application, workload, and timeframe:
    • Azure 中提供了可以使用 Batch 进行分配和管理的各种硬件。There's a wide selection of hardware available in Azure that can be allocated and managed with Batch.
    • 根据具体的项目,要求可能体现在最佳性价比或者最佳总体性能方面。Depending on the project, the requirement may be for the best price/performance or the best overall performance. 不同的场景和/或渲染应用程序具有不同的内存要求。Different scenes and/or rendering applications will have different memory requirements. 某些渲染应用程序可以利用 GPU 来获得最佳性能或某些功能。Some rendering application can leverage GPUs for the best performance or certain features.

Azure 上的渲染选项Options for rendering on Azure

可为渲染工作负荷使用多种 Azure 功能。There are a range of Azure capabilities that can be used for rendering workloads. 要使用哪些功能取决于任何现有环境和要求。Which capabilities to use depends on any existing environment and requirements.

使用渲染管理应用程序的现有本地渲染环境Existing on-premises rendering environment using a render management application

最常见的案例是,通过 PipelineFX Qube、Royal Render 或 Thinkbox Deadline 等渲染管理应用程序管理某个现有的本地渲染场。The most common case is for there to be an existing on-premises render farm being managed by a render management application such as PipelineFX Qube, Royal Render, or Thinkbox Deadline. 要求是使用 Azure VM 扩展本地渲染场的容量。The requirement is to extend the on-premises render farm capacity using Azure VMs.

渲染管理软件原生支持 Azure,或者,我们可以提供用于添加 Azure 支持的插件。The render management software either has Azure support built-in or we make available plug-ins that add Azure support. 有关支持的渲染管理器和功能的详细信息,请参阅有关使用渲染管理器的文章。For more information on the supported render managers and functionality enabled, see the article on using render managers.

自定义渲染工作流Custom rendering workflow

VM 的要求是扩展现有的渲染场。The requirement is for VMs to extend an existing render farm. Azure Batch 池可以分配大量的 VM,并为常用的渲染应用程序提供即用即付许可。Azure Batch pools can allocate large numbers of VMs, and provide pay-for-use licensing for popular rendering applications.

没有现有的渲染场No existing render farm

客户端工作站可能正在执行渲染,但渲染工作负荷不断增大,并长时间独占了工作站容量。Client workstations may be performing rendering, but the rendering workload is increasing and it is taking too long to solely use workstation capacity. 可以使用 Azure Batch 按需分配渲染场计算资源,并计划 Azure 渲染场的渲染作业。Azure Batch can be used to both allocate render farm compute on-demand as well as schedule the render jobs to the Azure render farm.

Azure Batch 的渲染功能Azure Batch rendering capabilities

Azure Batch 允许在 Azure 中并行运行工作负荷。Azure Batch allows parallel workloads to be run in Azure. Azure Batch 可用于创建和管理要在其上安装与运行应用程序的大量 VM。It enables the creation and management of large numbers of VMs on which applications are installed and run. 它还提供全面的作业计划功能来运行这些应用程序的实例、将任务分配提供给 VM、执行排队和应用程序监视,等等。It also provides comprehensive job scheduling capabilities to run instances of those applications, providing the assignment of tasks to VMs, queuing, application monitoring, and so on.

Azure Batch 可用于许多工作负荷,但以下功能专门用于简化和加速渲染工作负荷的运行。Azure Batch is used for many workloads, but the following capabilities are available to specifically make it easier and quicker to run rendering workloads.

  • 预装了图形和渲染应用程序的 VM 映像:VM images with pre-installed graphics and rendering applications:
    • Azure 市场中的某些 VM 映像包含流行的图形和渲染应用程序,使用它们无需自行安装这些应用程序,或者创建装有这些应用程序的自定义映像。Azure Marketplace VM images are available that contain popular graphics and rendering applications, avoiding the need to install the applications yourself or create your own custom images with the applications installed.
  • 渲染应用程序的即用即付许可:Pay-per-use licensing for rendering applications:
    • 可以选择按分钟支付应用程序的费用,此外,可以支付计算 VM 的费用(这可以避免购买许可证),有时还可以配置应用程序的许可证服务器。You can choose to pay for the applications by the minute, in addition to paying for the compute VMs, which avoids having to buy licenses and potentially configure a license server for the applications. 付费使用也意味着,当许可证的数量不固定时,可以应对不同和意外的负载。Paying for use also means that it is possible to cater for varying and unexpected load as there is not a fixed number of licenses.
    • 此外,可以结合自己的许可证使用预装的应用程序,而不是使用即用即付许可。It is also possible to use the pre-installed applications with your own licenses and not use the pay-per-use licensing. 为此,通常需要安装本地或基于 Azure 的许可证服务器,并使用 Azure 虚拟网络将呈现池连接到许可证服务器。To do this, typically you install an on-premises or Azure-based license server and use an Azure virtual network to connect the rendering pool to the license server.
  • 用于客户端设计和建模应用程序的插件:Plug-ins for client design and modeling applications:
    • 最终用户可以通过插件直接从客户端应用程序(例如 Autodesk Maya)使用 Azure Batch,以便创建池、提交作业,以及利用更多的计算容量来以更快的速度执行渲染。Plug-ins allow end-users to utilize Azure Batch directly from client application, such as Autodesk Maya, enabling them to create pools, submit jobs and make use of more compute capacity to perform faster renders.
  • 渲染管理器集成:Render manager integration:
    • Azure Batch 将集成到渲染管理应用程序,或者,我们会提供插件来实现 Azure Batch 集成。Azure Batch is integrated into render management applications or plug-ins are available to provide the Azure Batch integration.

可通过多种方法使用 Azure Batch,所有这些方法同样适用于 Azure Batch 渲染。There are several ways to use Azure Batch, all of which also apply to Azure Batch rendering.

  • API:APIs:

    • 使用 REST.NETPythonJava 或其他支持的 API 编写代码。Write code using the REST, .NET, Python, Java, or other supported APIs. 开发人员可将 Azure Batch 功能集成到其现有应用程序或工作流(不管是在云中还是本地)中。Developers can integrate Azure Batch capabilities into their existing applications or workflow, whether cloud or based on-premises. 例如,Autodesk Maya 插件利用 Batch Python API 来调用 Batch、创建和管理池、提交作业和任务,以及监视状态。For example, the Autodesk Maya plug-in utilizes the Batch Python API to invoke Batch, creating and managing pools, submitting jobs and tasks, and monitoring status.
  • 命令行工具:Command-line tools:

    • 可以使用 Azure 命令行Azure PowerShell 来编写 Batch 脚本。The Azure command line or Azure PowerShell can be used to script Batch use.
    • 具体而言,Batch CLI 模板支持可以简化创建池和提交作业的操作。In particular, the Batch CLI template support makes it much easier to create pools and submit jobs.
  • UI:UIs:

    • Batch Explorer 是一个跨平台客户端工具,可在其中管理和监视 Batch 帐户。此外,与 Azure 门户 UI 相比,它提供的功能更丰富。Batch Explorer is a cross-platform client tool that also allows Batch accounts to be managed and monitored, but provides some richer capabilities compared to the Azure portal UI. 我们为每个支持的应用程序提供了一组定制的池和作业模板,用于轻松创建池和提交作业。A set of pool and job templates are provided that are tailored for each supported application and can be used to easily create pools and to submit jobs.
    • 可以使用 Azure 门户来管理和监视 Azure Batch。The Azure portal can be used to manage and monitor Azure Batch.
  • 客户端应用程序插件:Client application plug-in's:

    • 借助提供的插件,可以直接从客户端设计和建模应用程序内部使用 Batch 渲染。Plug-ins are available that allow Batch rendering to be used from directly within the client design and modeling applications. 插件主要调用 Batch Explorer 应用程序,并提供有关当前 3D 模型的上下文信息。The plug-ins mainly invoke the Batch Explorer application with contextual information about the current 3D model.
    • 可使用以下插件:The following plug-ins are available:

Azure Batch 渲染入门Getting started with Azure Batch rendering

请参阅以下简介教程来体验 Azure Batch 渲染:See the following introductory tutorials to try Azure Batch rendering:

后续步骤Next steps

此文中查看 Azure 市场 VM 映像包含的渲染应用程序和版本列表。Determine the list of rendering applications and versions included on the Azure Marketplace VM images in this article.