Command-line Rendering and GPU Selection 命令行渲染和 GPU 选择
When rendering from the command-line of your 3d app with Redshift, you can specify the GPU devices to use for the rendering job. When specifying the GPU devices from the command-line, the Redshift preferences.xml file is not updated, so running your 3d app in interactive mode will still use the GPU devices that you specified in the System tab of the Redshift render options.
当使用红移从3d 应用程序的命令行进行渲染时,您可以指定渲染作业所使用的 GPU 设备。当从命令行指定 GPU 设备时,Redshift preferences.xml 文件不会更新,因此在交互模式下运行3d 应用程序仍将使用您在 Redshift 渲染选项的 System 选项卡中指定的 GPU 设备。
Several render managers including Deadline and Royal Render natively support GPU selection when rendering with Redshift. Selecting only a subset of available GPUs for a job is useful for example to render multiple frames simultaneously on a single machine for optimal scaling.
一些渲染管理器,包括 Deadline 和 Royal Render 在使用红移渲染时本身支持 GPU 选择。只选择一个作业的可用 gpu 的子集是有用的,例如在一台机器上同时渲染多个帧以实现最佳扩展。
Prerequisites
先决条件
To render from the command-line you can use the CommandLine tool located in you Cinema 4D application installation folder. Alternatively the Cinema 4D application itself can also be used.
要从命令行渲染,可以使用位于 Cinema 4D 应用程序安装文件夹中的 CommandLine 工具。或者电影院4 d 应用程序本身也可以使用。
Syntax
语法
Commandline.exe -redshift-gpu <device_id> -render c:\path\to\scene.c4d |
Where <device_id> is the GPU device id you wish to render with.
其中 < device _ id > 是你想要渲染的 GPU 设备 id。
Example
例子
To render a scene located at c:\path\to\scene.c4d using only GPU device 1:
使用 GPU 设备1渲染位于 c: path To scene.c4d 的场景:
Commandline.exe -redshift-gpu 1 -render c:\path\to\scene.c4d |
To render the same scene rendered using both GPU device 0 and 1:
使用 GPU 设备0和1渲染相同的场景:
Commandline.exe -redshift-gpu 0 -redshift-gpu 1 -render c:\path\to\scene.c4d |
The CommandLine tool supports multiple parameters for customizing rendering (frame ranges, image output options etc.) For more details please consult the "Cinema 4D and the Command Line" section of the Cinema 4D documentation.
CommandLine 工具支持自定义渲染的多个参数(框架范围,图像输出选项等)。欲了解更多详细信息,请参阅 Cinema 4D 文档的“ Cinema 4D and The Command Line”部分。
How do I determine my GPU device ids?
如何确定我的 GPU 设备 id?
There are a number of ways to determine the device ids associated with each of your GPUs.
有许多方法可以确定与每个 gpu 关联的设备 id。
One option is to open prefences.xml from C:\ProgramData\Redshift in a text editor and inspect the value of "AllCudaDevices". For example:
一种选择是在文本编辑器中打开 c: ProgramData Redshift 中的 prevences.xml 并检查“ AllCudaDevices”的值:
<preference name="AllComputeDevices" type="string" value="0:Quadro K5000,1:Quadro 6000," /> |
In this case the Quadro K5000 is device 0, while the Quadro 6000 is device 1.
在这种情况下,Quadro K5000是设备0,而 Quadro 6000是设备1。
赶快留个言打破零评论!~