Intro to Proxies 代理介绍
Introduction
引言
Redshift Proxies allow you to place previously exported Redshift Proxy Files (.rs) files in your scenes without actually loading the geometry until it is actually needed at render time. You can think of a Redshift Proxy as an actual Redshift scene all on its own, they can even contain other Redshift Proxies.
红移代理允许您放置以前导出的红移代理文件(。Rs)文件在你的场景中,没有实际加载几何图形,直到实际上需要在渲染时间。你可以把红移代理想象成一个真实的红移场景,它们甚至可以包含其他红移代理。
Using Redshift Proxies in your scene is a 2 step process. First you export a Redshift Proxy File, then you import and place a Redshift Proxy in your scene and associate it with the exported file.
在你的场景中使用红移代理是一个两步的过程。首先导出一个红移代理文件,然后导入并在场景中放置一个红移代理,并将其与导出的文件关联。
Using proxies has several advantages over in-scene objects, namely:
使用代理比场景内对象有几个优点,即:
- Proxies are loaded by Redshift on demand and will therefore only use resources when they are needed (when a ray intersects the proxy's bounding box). 代理按需加载红移,因此只在需要时才使用资源(当一条光线与代理的边界框相交时)
- Proxies have almost no time cost during scene translation. Extracting large amounts of geometry can be slow and using proxies means you pay that cost only once, when you first export the Redshift Proxy File. 在场景转换过程中,代理服务器几乎没有时间消耗。提取大量的几何图形可能会很慢,使用代理意味着您只需要支付一次成本,当您第一次导出红移代理文件
- Proxies are stored in an optimized format on disk so that the renderer can immediately use the data after loading from disk without additional processing or memory overhead. 代理以优化后的格式存储在磁盘上,这样渲染器可以在从磁盘加载后立即使用数据,而不需要额外的处理或内存开销
- Support for object types including animated and deforming meshes, hair, strands, instances, volume containers, lights and any materials/shaders applied to these objects. 支持对象类型,包括动画和变形网格,头发,股,实例,体积容器,灯光和任何材质/着色器应用到这些对象
The main disadvantages of using proxies:
使用代理的主要缺点是:
- Making edits to the proxy can be more time consuming than if the original data is part of the scene (as it requires making changes in another file and re-exporting the Redshift Proxy File) 对代理进行编辑比将原始数据作为场景的一部分更耗时(因为这需要在另一个文件中进行更改并重新导出红移代理文件)
- After export Redshift Proxy geometry cannot be deformed or otherwise modified aside from adjusting tessellation settings. For example, you cannot animate components inside a proxy after export, but you 导出后红移代理几何不能变形或以其他方式修改除了调整镶嵌设置。例如,导出后不能在代理内对组件进行动画处理,但是can 可以 animate the position, rotation and scale of the proxy as a whole rigid object. 动画的位置,旋转和比例的代理作为一个整体刚性对象
- Animated proxies can be heavyweight because they are per-frame caches. 动态代理可以是重量级的,因为它们是按帧缓存
Redshift Proxies provide the option to use either the materials embedded in the Redshift Proxy File, or to replace those materials with materials from the scene where the proxy is placed.
红移代理可以选择使用嵌入在红移代理文件中的材料,或者用放置代理的场景中的材料替换这些材料。
Redshift Proxy Files are DCC-independent, so for example you can export a Redshift Proxy File from Maya and import it as a proxy in Houdini, or vice-versa.
红移代理文件是独立于 dcc 的,所以你可以从 Maya 导出一个红移代理文件,然后在 Houdini 作为代理导入,反之亦然。
There are currently some important limitations in sharing Redshift Proxy Files between DCCs:
目前在地区数据中心之间共享红移代理文件有一些重要的限制:
- The embedded shaders in a Redshift Proxy File from one DCC may not be available in another DCC. 来自一个 DCC 的红移代理文件中的嵌入着色器在另一个 DCC 中可能不可用For example a Redshift Proxy File containing a Softimage Lambert material will not render correctly when placed as a proxy in Maya. 例如,包含 softimaglambert 材质的红移代理文件在 Maya 中作为代理放置时将无法正确渲染
- Certain light types native to a particular DCC may cause errors when rendered in another DCC. 在另一个 DCC 中呈现某些原生于特定 DCC 的光类型时可能会导致错误
To avoid this issue, we recommend always using one of the From Scene material modes when sharing Redshift Proxy Files between DCCs until we resolve this limitation.
为了避免这个问题,我们建议在 DCCs 之间共享红移代理文件时始终使用从场景材质模式之一,直到我们解决了这个限制。
Important Considerations
重要考虑事项
When working with Redshift Proxies, it is helpful to keep the following things in mind:
在使用红移代理时,记住以下几点是很有帮助的:
- You cannot retrieve the original Maya, 3ds Max or Softimage mesh from a Redshift Proxy File, so it is advisable to keep the original source data that was used to export the Redshift Proxy. 您无法从红移代理文件中检索原始的 Maya、3ds Max 或 Softimage 网格,因此最好保留用于导出红移代理的原始源数据
- When placing multiple copies of a Redshift Proxy in a scene, it is much more efficient for memory and performance to create a single Redshift Proxy and then create multiple instances of this proxy and place them as desired. 当在一个场景中放置多个红移代理的副本时,创建一个单独的红移代理,然后创建这个代理的多个实例并按照需要放置它们,这样在内存和性能方面会更有效
The data exported with your Redshift Proxy is determined by your Render Settings at the time of export, by default Redshift will try to discard as much unnecessary data as possible to achieve the most efficient file size.
使用红移代理导出的数据是由导出时的渲染设置决定的,默认情况下红移会尽可能多地丢弃不必要的数据以达到最有效的文件大小。
UVs, Vertex Color, & Other Per-Vertex Attributes
Uv,顶点颜色,和其他每顶点属性
When exporting a set of objects as a Redshift Proxy File, only the vertex attributes used by the currently assigned shaders are included in the exported data. This is an important optimization to prevent file bloat. When a proxy file will be used as-is, without overriding materials, this is not an issue. However, when using proxy material overrides, this can cause unexpected behavior if the overriding material requires vertex data that was stripped at export time because it was unused. So if you need certain attributes for your proxies at any point down the line, make sure that a shader attached to your proxy object is making use of those attributes. For example, if you have a sphere with a spherical texture projection and an untextured simple material assigned, the texture projection will be stripped at proxy file export time because it is not used by the currently assigned material. If this proxy is then placed in another scene and the material is overridden by a material that does use UVs, it will render incorrectly due to the missing UVs.
当将一组对象导出为红移代理文件时,导出的数据中只包含当前分配着色器使用的顶点属性。这是一个防止文件膨胀的重要优化。如果代理文件将按原样使用,而不重写材料,则不存在这个问题。但是,当使用代理材质重写时,如果重写材质需要在导出时剥离的顶点数据,因为它未使用,这可能会导致意外行为。因此,如果您需要代理的某些属性,请确保附加到代理对象的着色器正在利用这些属性。例如,如果你有一个球面纹理投影和一个无纹理的简单材质分配,纹理投影将剥离在代理文件导出时间,因为它不是由当前分配的材质使用。如果这个代理被放置在另一个场景中,并且材质被使用 uv 的材质覆盖,那么由于缺少 uv,它将会呈现错误。
Motion Blur
动态模糊
In order for Redshift Proxies to render with Motion Blur you must make sure that motion blur is enabled in your Render Settings at the time of export.
为了使红移代理使用运动模糊渲染,你必须确保在导出时在渲染设置中启用运动模糊。
Motion blur can be disabled on proxies after export but individual motion blur settings like frame duration cannot be changed after the fact, you must re-export your proxy if you wish to change its motion blur settings.
运动模糊可以关闭代理后导出,但个人的运动模糊设置,如帧持续时间不能改变后的事实,你必须重新导出你的代理,如果你希望改变它的运动模糊设置。
Instancing & Tessellation
实例 & 镶嵌
If you are planning on instancing your Redshift Proxies please keep in mind that you can only use fixed tessellation.
如果你打算实例化你的红移代理请记住,你只能使用固定镶嵌。
Adaptive tessellation cannot be used when instancing in Redshift.
自适应镶嵌不能使用时,红移副本。
Creating & Exporting Proxies
创建和导出代理
To export the entire scene, or a portion thereof, as a Redshift Proxy File, from the File menu choose File > Export > Redshift Proxy (*.rs) as pictured below:
要导出整个场景,或其中的一部分,作为红移代理文件,从文件菜单选择文件 > 导出 > 红移代理(*)。Rs)如下图所示:
Exporting a Redshift Proxy
导出红移代理
Export Parameters
出口参数
Redshift Proxy Export options
红移代理导出选项
Options
选择
Export
出口
This controls which objects are exported.
这控制导出哪些对象。
- All Objects: 所有物品: Export all objects in the scene as a Redshift Proxy. 将场景中的所有对象导出为红移代理
- Selected Objects: 选定对象: Export only the selected objects as a Redshift Proxy. 只将选定的对象导出为红移代理
Lights
灯光
When enabled, Redshift will include lights in the proxy export. When disabled lights will not be exported with the proxy.
如果启用,红移将在代理导出中包含指示灯。当禁用指示灯时,不会使用代理导出。
Polygon Connectivity
多边形连通性
Enabling this option is only necessary if you need to apply tessellation & displacement to the proxy after you’ve placed it in a scene and the original mesh does not have tessellation or displacement applied. Enabling this option increases the size of the proxy file, so it should only be used if necessary.
启用这个选项是唯一必要的,如果你需要应用镶嵌和替换代理后,你已经把它放在一个场景,原来的网格没有镶嵌或替换适用。启用此选项会增加代理文件的大小,因此只有在必要时才应该使用它。
Polygon Connectivity Data will be exported automatically for any objects that already make use of tessellation & displacement.
多边形连通性数据将自动导出的任何对象,已经使用镶嵌和位移。
Compress Data
压缩数据
This option enables file compression to reduce file size for exported Redshift Proxies. In some cases, the compression can reduce the file size by 50% or more.
此选项允许文件压缩以减少导出的红移代理的文件大小。在某些情况下,压缩可以减少50% 或更多的文件大小。
In general compression will lead to slower export and load times.
一般来说,压缩会导致导出和加载时间变慢。
However, if a bottleneck in your pipeline is slow data transfer performance like a slow storage drive or network then enabling file compression could lead to a performance improvement due to the smaller file sizes. If you have a fast network and fast storage drive like an SSD then performance might be slower due to the processing time needed to decompress the proxy files. These are the sorts of things to consider when determining whether to enable or disable compression.
但是,如果管道中的瓶颈是缓慢的数据传输性能,比如缓慢的存储驱动器或网络,那么启用文件压缩可能会导致性能改进,因为文件大小更小。如果您有一个像 SSD 那样的快速网络和快速存储驱动器,那么由于解压代理文件所需的处理时间,性能可能会变慢。在决定是否启用或禁用压缩时,需要考虑这些问题。
Proxy Origin
代理原产地
This controls the root transform of all objects included in the proxy.
这控制了代理中包含的所有对象的根转换。
- World Origin: 世界来源:Root objects will retain their original global transform as if you exported the entire scene as is. This proxy will end-up living at the origin but the contents of the proxy exist in the world where they were at time of export. 根对象将保留其原始的全局转换,就像您原样导出整个场景一样。这个代理将最终生活在原点,但代理的内容存在于出口时所在的世界
- Objects Bounds: 物体边界:The midpoint of the bounds of all included objects is calculated and everything is offset relative to this position. This proxy can be logically moved and every contained object will be moved around it 计算所有包含对象的边界的中点,并且所有对象都相对于此位置偏移。这个代理可以在逻辑上移动,并且每个包含的对象都将围绕它移动 relative to the midpoint of all contained objects. 相对于所有包含对象的中点
Add Proxy to Scene
添加代理到场景
When enabled the exported proxy will be immediately added to the scene.
当启用时,导出的代理将立即添加到场景中。
Name Prefix
名称前缀
This option lets you specify a prefix that is added to the names of the Redshift materials contained in your Redshift Proxy export. This is helpful for replacing Redshift materials in your proxies covered here.
此选项允许您指定一个前缀,该前缀添加到红移代理导出中包含的红移材料的名称中。这对于替换代理中的红移材料很有帮助。
Remove Exported Objects
删除导出的对象
When enabled this option will automatically delete the objects currently being exported as a Redshift Proxy.
如果启用此选项,将自动删除当前导出为红移代理的对象。
AOVs
活性氧自由基
Include Default Beauty AOV
包括默认的美容效果
When enabled this setting will attempt to match the settings currently set in your primary render settings Save section and pass that along to the exported proxy.
当启用此设置时,将尝试匹配当前在主呈现设置保存部分中设置的设置,并将其传递给导出的代理。
This is only useful if you plan on rendering a proxy via Redshift CmdLine rendering where your file save settings would otherwise not be setup.
这只有在您计划通过 Redshift cmdlet 渲染来呈现代理时才有用,否则您的文件保存设置将不会设置。
Animation
动画
When enabled specifies whether to export a sequence of Redshift Proxy Files for the frame sequence specified by Start frame, End frame and Frame step. When disabled Redshift will export a single Redshift Proxy File for the current frame.
如果启用,则指定是否为由开始帧、结束帧和帧步骤指定的帧序列导出红移代理文件序列。当禁用红移时,将为当前帧导出一个红移代理文件。
When exporting a sequence of Redshift Proxy Files, the frame number (padded to 4 decimal digits) will be inserted between the file name and extension. For example, if you export frames 1 through 10 using the file name redshiftArchive.rs, the files will be exported as redshiftArchive.0001.rs through redshiftArchive.0010.rs.
当导出一个红移代理文件序列时,将在文件名和扩展名之间插入帧数(被填充到4个十进制数字)。例如,如果您使用文件名 redshiftArchive.rs 文件导出帧1到10,那么这些文件将被导出为 redshiptarchive. 0001。通过 redshiptarchive. 0010。Rs.
Range
范围
This option specifies whether to export a Redshift Proxy for the current frame or a sequence of Redshift Proxies.
此选项指定是导出当前帧的红移代理还是导出一系列红移代理。
- Current Frame: 当前框架:This option exports a Redshift Proxy for the current frame. 此选项导出当前帧的红移代理
- Frame Range: 帧范围:This option lets you set a custom frame range sequence specified by the 属性指定的自定义帧范围序列Start frame 开始框架, End frame, 结束框架,and 及Frame Step 帧步骤 options. 选择
Using Proxies
使用代理
To place a Redshift Proxy in your Cinema 4D scene you must create a Redshift Proxy object.
要在你的影院4 d 场景中放置一个红移代理,你必须创建一个红移代理对象。
You can do this easily by going to the main toolbar menu Redshift > Objects > Redshift Proxy as pictured below:
你可以通过点击主工具栏菜单红移 > 对象 > 红移代理,如下图所示:
Creating a Redshift Proxy object
创建红移代理对象
Proxy Object Parameters
代理对象参数
Redshift Proxy Object
红移代理对象
File Path
文件路径
This field specifies the Redshift Proxy File that will be rendered in place of the proxy object. You can navigate to and select the proxy file by using the folder icon to the right of this field.
此字段指定将在代理对象的位置呈现的红移代理文件。您可以使用该字段右侧的文件夹图标导航到并选择代理文件。
Display
展示
Show Bounding Box
显示边界框
Toggles the display of the bounding box around the proxy object.
在代理对象周围切换边界框的显示。
Preview
预览
These options determine how the proxy will be displayed in the viewport.
这些选项决定了代理将如何在 viewport 中显示。
- Off: 关闭:Completely hides the proxy from the viewport but the proxy will still render. 完全隐藏代理的视图端口,但代理仍将呈现
- Bounding Box: 包围盒: Displays a simple axis-aligned bounding box encompassing all the objects in the associated file. 显示一个简单的轴对齐的边界框,包含关联文件中的所有对象
- Mesh: 网眼: Uses the geometry data directly from the file. 直接从文件中使用几何数据
|
|
|
Off 关掉 | Bounding Box 包围盒 | Preview Mesh 预览网格 |
Preview Percentage
预览百分比
This option controls the percentage of the geometry data to display in the viewport when Display Mode is set to Preview Mesh.
此选项控制当“显示模式”设置为“预览网格”时在视区中显示的几何数据的百分比。
When Display Mode is set to Preview Mesh, the full resolution geometry contained in the Redshift Proxy File is used by default. For proxy files containing a lot of geometry, this can negatively impact the viewport rendering performance. For very geometrically dense proxies, we recommend leaving Display Mode to Bounding Box, using a Linked Mesh, or setting Display Percentage to a low value when using Preview Mesh.
当显示模式设置为预览网格时,默认情况下使用红移代理文件中包含的完整分辨率几何图形。对于包含大量几何图形的代理文件,这会对 viewport 渲染性能产生负面影响。对于几何密度非常高的代理,我们建议使用链接网格将显示模式设置为边界框,或者在使用预览网格时将显示百分比设置为低值。
|
|
|
Display Percentage: 100 显示百分比: 100 Display Mode: Mesh 显示模式: 网格 |
50 | 10 |
Materials
材料
Materials From
材料来自
These options control how materials are handled for this proxy and allows from materials within the proxy file to be overridden with materials defined in the current scene.
这些选项控制如何处理此代理的材料,并允许代理文件中的材料被当前场景中定义的材料覆盖。
- Proxy File: 代理文件: uses the materials and shaders that were assigned to objects when the proxy file was exported as-is. 当代理文件按原样导出时,使用分配给对象的材质和着色器
- Object: 目标: overrides all material assignments in the proxy file with the scene material assigned to the placeholder mesh. 覆盖代理文件中的所有材质分配,场景材质分配给占位符网格
- Scene (Match by name and prefix): 场景(名称和前缀匹配) : allows individual materials in the proxy file to be overridden with scene materials by looking for matching names. See the section 允许代理文件中的个别材料被场景材料覆盖,通过寻找匹配的名称。请看这一部分Overriding Proxies 覆盖代理 for additional details. ,了解更多详情
Prefix
前缀
This field specifies the prefix to look for when using the "Scene (Match by name and prefix)" material replacement mode.
此字段指定在使用“场景(按名称和前缀匹配)”材质替换模式时要查找的前缀。
Overrides
超越
These checkboxes control whether the corresponding attributes of the objects inside the proxy file should be overridden by the same attributes of the proxy placeholder object. For example, if you want to assign an Object ID of 5 to the contents of a proxy file, you would set the Object ID of the placeholder object to 5 and enable the Object ID override.
这些复选框控制代理文件中对象的相应属性是否应该被代理占位符对象的相同属性覆盖。例如,如果希望将 Object ID 为5的值分配给代理文件的内容,那么可以将占位符对象的 Object ID 设置为5,并启用 Object ID 覆盖。
- Object ID 对象 ID
- Visibility & Matte 能见度 & Matte
- Tessellation & Displacement 镶嵌和置换
- Trace Sets
- User Data 用户资料
External Proxy References / How To Transfer Proxies
外部代理引用/如何传输代理
Given that Redshift proxies can contain anything in a Redshift scene, this means that they can externally reference image files (such as EXR, PNG, etc), volume grids (like OpenVDB) and even other proxy files!
由于红移代理可以包含红移场景中的任何内容,这意味着它们可以从外部引用图像文件(如 EXR、 PNG 等)、卷网格(如 OpenVDB)甚至其他代理文件!
These external file references are stored in Redshift proxies both as absolute paths and as relative paths. Let's look at that with an example.
这些外部文件引用以绝对路径和相对路径的形式存储在红移代理中。让我们用一个例子来看看。
Let's say that a proxy file proxy.rs
is exported in folder C:\MyProxies
and it contains a shader that references texture mytexture.png
which is under C:\MyProxies\Textures
假设一个代理文件 proxy.rs 被导出到文件夹 c: MyProxies 中,并且它包含一个引用纹理 mytexture.png 的着色器,该着色器在 c: MyProxies Textures 下
The folder structre would look like this
文件夹结构如下所示
| - [MyProxies] | --- proxy.rs | --- [Textures] | ---- mytexture.png |
Within the proxy.rs file, the reference to mytexture.png will be saved both as:
在 proxy.rs 文件中,对 mytexture.png 的引用将同时保存为:
- An absolute path filename, i.e 一个绝对路径文件名,即
C:\MyProxies\Textures\mytexture.png
- A relative path, i.e 一个相对路径,即
.\Textures\mytexture.png
Redshift contains file paths both as absolute and relative in order to facilitate the "transporting" of proxy files and their external references.
红移包含绝对和相对的文件路径,以方便“传输”代理文件及其外部引用。
To explain with an example: let's say that the above proxy and texture (and their folder structure) were to be copy/pasted on folder C:\MyOtherProxies
and the original C:\MyProxies
folder was deleted.
举个例子来解释: 假设上面的代理和纹理(及其文件夹结构)被复制/粘贴到文件夹 c: myoproxies 上,原来的 c: MyProxies 文件夹被删除。
The absolute path would no longer work because there's no C:\MyProxies\Textures\mytexture.png
file anymore! (we deleted the folder!)
绝对路径将不再工作,因为没有 c: MyProxies 纹理 mytexture.png 文件了! (我们删除了文件夹!)
But the relative path would still work! Because, relative to C:\MyOtherProxies\proxy.rs
there would still be a .\Textures\mytexture.png
path.
因为,相对于 c: MyOtherProxies proxy.rs,仍然会有一个. Textures mytexture.png 路径。
Now let's consider a proxy file that references a texture folder on a completely different drive! For example:
现在让我们考虑一个代理文件,它在一个完全不同的驱动器上引用了一个纹理文件夹:
[C:] | - [MyProxies] | --- proxy.rs [D:] | - [Textures] | ---- mytexture.png |
Unfortunately, in such a case it's no longer possible to construct a relative path because path C:\MyProxies\proxy.rs
and path D:\Textures\mytexture.png
have no common "root"
不幸的是,在这种情况下,不再可能构造一个相对路径,因为路径 c: MyProxies proxy.rs 和路径 d: Textures mytexture.png 没有公共的“ root”
So, using this folder layout, if the textures were to be moved to a new drive (say, E:\
), then the proxy would no longer be able to find them.
因此,使用这种文件夹布局,如果将纹理移动到新的驱动器(比如 e:) ,那么代理将不再能够找到它们。
In such cases, we recommend using Redshift's path override environment variables
在这种情况下,我们建议使用 Redshift 的路径覆盖环境变量
If your texture folder used to be D:\Textures
and now it's E:\Textures
, you can use the REDSHIFT_PATHOVERRIDE_FILE
or REDSHIFT_PATHOVERRIDE_STRING
to tell Redshift to turn D:\Textures
into E:\Textures
.
如果你的纹理文件夹过去是 d: 纹理,现在是 e: 纹理,你可以使用 REDSHIFT/pathoverride/file 或者 REDSHIFT/pathoverride/string 来告诉红移把 d: 纹理变成 e: 纹理。
The online documentation page explains how to do that with an example.
在线文档页面通过一个例子解释了如何做到这一点。
If you don't know what external references a proxy might contain, you can use redshiftCmdLine's -printdependencies
switch (followed by the proxy's filename) to list these.
如果不知道代理可能包含哪些外部引用,可以使用 redshiftCmdLine 的-printdependencies 开关(后跟代理的文件名)列出这些内容。
赶快留个言打破零评论!~