使用 Azure 進行轉譯Rendering using Azure

轉譯是取用 3D 模型並將其轉換成 2D 影像的程序。Rendering is the process of taking 3D models and converting them into 2D images. 3D 場景檔案可在 Autodesk 3ds Max、Autodesk Maya 和 Blender 等應用程式中撰寫。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.
  • 低優先順序 VM 可降低成本:Low-priority VMs reduce costs:
    • 優先順序 VM 可用遠低於一般隨選 VM 的價格取得,適用於某些作業類型。Low-priority VMs are available for a large discount compared to regular on-demand VMs and are suitable for some job types.
    • 低優先順序 VM 可由 Azure Batch 配置,因為 Batch 讓 VM 可藉由彈性使用因應各種不同的需求。Low-priority VMs can be allocated by Azure Batch, with Batch providing flexibility on how they are used to cater for a broad set of requirements. Batch 集區可同時包含專用和低優先順序 VM,並且可隨時變更 VM 類型的混用方式。Batch pools can consist of both dedicated and low-priority VMs, with it being possible to change the mix of VM types at any time.

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,而得以使用低優先順序 VM 以及動態自動調整原定價格的 VM,並為常用的轉譯應用程式提供按使用付費的授權。Azure Batch pools can allocate large numbers of VMs, allow low-priority VMs to be used and dynamically auto-scaled with full-priced 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. 它可用來建立和管理要安裝並執行應用程式的大量 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 Marketplace 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. 外掛程式主要會以目前 3D 模型的相關內容資訊叫用 Batch Explorer 應用程式。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 Marketplace VM 映像包含的轉譯應用程式和版本清單。Determine the list of rendering applications and versions included on the Azure Marketplace VM images in this article.