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

创建和导出代理

Export Parameters

出口参数

 

Using Proxies

使用代理

Proxy Object Parameters

代理对象参数

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 开关(后跟代理的文件名)列出这些内容。

1

赶快留个言打破零评论!~

返回顶部

显示

忘记密码?

显示

显示

获取验证码

Close