Redshift Optimizations优化

[复制链接]
愿为素心人 发表于 2022-7-24 14:33 | 显示全部楼层 |阅读模式
欢迎学习这篇关于CINEMA4D的文章,以下是本文内容。
Redshift的Optimizations优化选项搜罗一些控制,允许用户从整体角度调整渲染质量和渲染性能。用户很可能底子不需要修改此中的一些控制。但假设要进步渲染性能或者消除一些渲染瑕疵可能要针对性的理解一些重要的参数。

Redshift Optimizations优化-1.jpg

Maximum Trace Depth最大追踪深度


Redshift Optimizations优化-2.jpg
The trace depth limits control how deep reflections and refractions can go. There exist separate settings for reflection and refraction. The “combined” setting specifies the upper limit for both reflections and refractions. Let’s say, for example, that reflection, refraction and combined are all set to a value of 10. If a ray has already been reflected 8 times, then it can only be reflected or refracted 2 more times because the combined trace depth is 10.
这些设置控制着反射和折射有“多深”。有单独的控制设置来控制反射和折射。Combined混合控制指定了反射和折射共同的次数上限。例如,我们把所有这三个控制的值都设为10。这样,假如一条光线已经被反射了8次,那么它就只能再被反射或者折射2次。

Warning警告

Raising the trace depth limits can increase rendering times!
进步最大追踪深度会增加渲染的时间.

Most scenes can get away with fairly low reflection and refraction trace depth limits. This is especially true for reflections. How often can you see a reflection of another reflection of another reflection… and so on?
大大都场景会使用相当低的反射和折射次数。但假如场景中有许多玻璃,你就可能会想要进步折射次数,不然你就会看到光线折射完毕得太早,并在折射了几次后产生错误的光学效果。

Refractions, on the other hand, can be more challenging. Scenes that contain glass might require the refraction trace depth limit to be raised to avoid incorrect results behind a few layers of glass, as shown below:
Refraction trace depth limit set to 3. Even though it might look correct, several refractions are skipped.

Redshift Optimizations优化-3.jpg

Refraction trace depth limit raised to 16. Both the refractions and shadows are now correct.

Redshift Optimizations优化-4.jpg

Similarly, an “opposing mirrors” scene like the one shown below will require the reflection trace depth limit raised.
Reflection trace depth limit set to 3. The mirror-in-mirror reflections of the sphere are cut too early.

Redshift Optimizations优化-5.jpg

Reflection trace depth limit raised to 16. The sphere is reflected several more times.

Redshift Optimizations优化-6.jpg

Cut-off Thresholds剪切阈值

Warning警告
For advanced users only! Incorrect settings can generate noisy images or long rendering times!
仅为高级用户!不正确的设置会产生噪波或者渲染时间变长。

Redshift Optimizations优化-7.jpg
在光线颠末反射、折射和阴影处后,它们就会被染上颜色,亮度也变得更低了。好比,从相机发出的一条光线可能会撞上一面反射非常弱的镜子。那个镜子不管发射什么光线城市使光线变暗。而当光线变暗时,它对最终图像的影响变得很小,所以渲染器就不再反弹它们。

Cut-off Threshold(剪切阈值)参数设置允许用户指定成像“黑度”的最小值,并允许渲染器提早完毕光线追踪。

这些参数的默认设置可能会适应大大都场景,但在一些极端条件下,一个非常暗的镜片可能会反射出非常亮堂的几何体。假如这时渲染器提早Cut-off(忽略)反射的光线,杂点就会呈现。

假如你疑心场景中已经发生这种条件,能够试着将这些参数的数值降为0.001。假如想要完全禁用优化,将这些参数设为0.0即可。

下面的场景测试反映了场景中有非常亮堂的物体,但Cut-off不到低。在场景中的中央,有一个玻璃反射和折射球体。在它四周是4个非常亮堂的、自觉光的不球体。我们将反射、折射Trace Depth均设为16,这样自觉光球体发出的光线在玻璃体内部的反射和折射就能“反复”许屡次。

请注意,这个场景用到了许多自觉光球体以说明潜在问题。假如你的场景中没有使用如此多的发光球体,那么你就不需要像这里一样降低数值。不然会大大增加渲染时间!

The scene setup场景构成

Redshift Optimizations优化-8.jpg
All cutoffs are disabled. This is the reference (best quality) image.此时禁用了所有Cut-off Thresholds参数。这是参考(没问题的状态)图片。

Redshift Optimizations优化-9.jpg
Cutoffs set to 0.1. This is an aggressive setting. Notice that several reflections/refractions are now rendering noisy.
此时Cut-off Thresholds设为0.1。这是一个非常激进的设置。注意:这时许多反射和折射被剪切了,噪点已经呈现了

Redshift Optimizations优化-10.jpg
Cutoffs set to 0.01. A big improvement over the last image, but there’s still some noise in the deeper reflections.
Cut-off Thresholds设为0.01。此图片效果相比上一张改善了许多,但假如你与第一张相比,就会注意到照旧有反射和折射被剪切了。

Redshift Optimizations优化-11.jpg
Cutoffs set to 0.001. This is the default value. In this case, it produces a near-identical result to the reference image.
此时将Cut-off Thresholds设为0.001。这是默认值。与参考图片相比,照旧有一些反射被剪切了,但从视觉上来说,更能被承受。

Redshift Optimizations优化-12.jpg

Russian-Roulette俄罗斯轮盘


Redshift Optimizations优化-13.jpg
Certain shaders need to shoot multiple different kinds of rays. For example, a glass shader needs to shoot a ray for reflection and another one for refraction. The architectural shader can shoot two reflection rays (with different gloss values) and one refraction ray. The car paint shader shoots two reflection rays (with different gloss values). When the rays of such shaders ‘see’ other shaders of the same kind, the number of rays that have to be shot can grow exponentially with increasing trace depths. The initial two rays of a glass shader might become 4 rays on the next trace depth, then 8, then 16, 32, 64, and so on.
有时需要一些Shader来发出多种类型采样射线。例如,玻璃shader发出采样反射的射线,还需要另一条采样折射的射线。Architectural Shader(建筑着色器)能发出两种采样反射的射线(取决于不同的光泽值)和一种采样折射的射线。Car Paint(车漆着色器)可发出两种采样反射射线(取决于不同的光泽值)。当一类Shader发出的采样射线“看见”同类Shader时,采样射线的数量就会指数上升,Trace Depth也会进步。即最后步的由一个玻璃Shader发出的光线会在下一个Trace Depth酿成4条光线,然后是8条,再然后是16条、32条、64条等等。

Russian-Roulette allows the renderer to shoot only one kind of ray once the importance of the ray is low. For example, a glass seen through a very faint mirror can often get away with sometimes shooting a reflection ray and some other times shooting a refraction ray. Choosing which kind of ray to shoot (reflection or refraction) is driven by shader parameters. If a glass, for example, is very transparent and only has a very faint amount of reflection, the renderer will mostly choose refractive rays versus reflective ones.
假如某种采样射线的权重比较低,通过设置Russian-Roulette允许渲染器只发射一种采样射线。例如从一块反射很弱的镜头中看一块玻璃,玻璃经常会消失。因为渲染器有时发射反射采样射线,有时发射折射采样射线。选择究竟?结果发射那种采样(反射还是折射)是着色器参数决定的。假如这块玻璃非常通明,并只要很弱的反射,那么渲染重视要会选择折射采样射线来代替反射。

The “Importance Threshold” decides when the renderer will start performing this optimization. Very low numbers mean “start doing it for very dim rays” while higher numbers mean “do it for slightly brighter rays”. So the higher the number, the earlier the optimization will happen. Starting it too early, though, can introduce grain artifacts. If you see grain in your glass and you are suspecting the Russian-Roulette, you can try lowering this number to 0.001. To disable this optimization completely, set it to 0.0.
Importance Threshold就是用来设定渲染器在何种条件下初步优化。非常小的值暗示在“光影很微弱时初步优化”,而比挺大的值意味着在“光影相对较强时初步优化”。因而数值越大,优化就越早初步。然而,假如初步得过早,可能会导致颗粒感。假如发现渲染出来的玻璃颗粒化严重,而又疑心是Russian Roulette导致,能够测验考试将数值降低到0.001。要完全关掉优化,设置为0.0。

The “Falloff” parameter ‘eases’ into the Russian-Roulette optimization. This means that once a ray’s intensity crosses the “Importance Threshold” value the renderer won’t go abruptly into Russian Roulette but will do it gradually. This improves potential noise-banding artifacts. How gradually the renderer will ease into Russian-Roulette optimization is controlled by the “Falloff” parameter. Setting this parameter to 0.0 will enable the optimization abruptly, while 1.0 does it very smoothly. It’s very rare that users will need to adjust this parameter, so its advised you leave it at 0.5.
Falloff衰减用说减弱Russian-Roulette优化。这就意味着当采样射线取到亮度超过Importance threshold指定的值,渲染器不会马长进入Russian Roulette优化,而是逐步引入。这能降低Noise-Banding噪点带缺陷的呈现。用Falloff能够控制渲染器进入Russian-Roulette优化的快慢程度。将参数设为0.会使得优化突然启动。而参数1,暗示迟缓地引入。只要很少量的用户会调整这个参数,所以让它连结0.5即可。

To demonstrate the Russian-roulette parameters, we’ll use the same scene we used for the cut-offs.
为说明Russian-Roulette优化参数效果,我们将使用Cut-Off Thresholds的例子。
请注意下面的场景使用了数量宏大的自觉光球体以说明潜在的问题。假如你的场景中没有这么多强自觉光球体,那么你无须像下面这样降低参数值。不合理地降低设定会极大的增加渲染的时间。


Russian-Roulette is disabled. This is what the frame is supposed to look like.
下图中的Russian_roulette被禁用了。下面是希望渲染的效果。


Importance Threshold set to 0.1. The renderer has to choose between reflection and refraction way too early which produces excessive noise!
此时Importance Threshold值设为0.1。渲染器不得不更早在反射和折射之间做出选择,这就产生了过量的噪点。

Redshift Optimizations优化-15.jpg
Importance Threshold set to 0.01. While there is less noise compared to before, it’s still visible.
此时的Importance Threshold设为了0.01,这是默认值。很明显,与之前相比,噪点少了一些。

Redshift Optimizations优化-16.jpg
Importance Threshold set to 0.001 (the default). Russian-roulette now happens very rarely, which eliminates all noise.
此时的Importance Threshold被设为0.001。这一值极低,此时Russian-Rouletle优化几乎不发生-----这会消除所有噪点。



Texture Sampling贴图采样


Redshift Optimizations优化-18.jpg
Redshift supports high quality texture mapping via ‘Anisotropic’ filtering. Redshift also supports fast but lower quality texture mapping techniques such as ‘Bilinear’ (blurry) and ‘Point’ (blocky)。
Redshift撑持质量非常高的纹理贴图过滤,这在Maya中默认启用了。当Softimage中将纹理节点设为使用Anisotropic(各向异性)时也能够启用。Redshift也撑持快速纹理贴图过滤技术,好比Binlinera(很模糊的方式)和Point(不均匀方式)。


Most scenes only need high-quality texture mapping for parts of the image that are directly visible to the camera, i.e. the “primary rays”. Secondary rays (reflections, refractions, GI, lights) and shadow rays are often less visually important so they can get away with using lower-quality texture sampling techniques. For this reason, by default, Redshift enables ‘Anisotropic’ for primary rays and ‘Bilinear’ for secondary and shadow rays.
大大都场景只需要在相机间接可见区域使用高品质材质贴图,例如“Primary Rays”。Secondary Rays(反射、折射和GI),以及阴影采样射线在视觉上通常不太重要,所以使用质量低一些的纹理采样技术即可。因而Redshift默认为主采样射线启用“Feline”,而为次采样射线和阴影启用“Bilinear”(双线性)。

Tip建议
If you’re rendering a scene that uses very clear mirrors or glass and seem to be seeing blurry textures through those mirrors, you might want to increase the quality of the secondary rays to ‘Anisotropic’. Mind you, though, that this can increase rendering times!
假如你想渲染放置了非常干净的鬼影镜子(Mirrorsor Glass)的场景,想在镜子中看到模糊的纹理,那能够将次采样射线的质量进步到“Anisotropic”(各向异性)。记住这会增加很多渲染时间。

MIP-maps are pre-filtered (blurred) versions of the textures and are automatically computed by Redshift behind the scenes. MIP-maps are useful in making textures appear less noisy when viewed from far away. Each texture has several MIP-maps associated with it. For example, a 1024x1024 texture will have a 512x512, 256x256, 128x128, 64x64, 32x32, 16x16, 8x8, 4x4, 2x2 and 1x1 MIP maps. Each time the renderer needs to pick a samples for texture mapping, it selects two consecutive MIP-maps (for example 256x256 and 128x128) depending on how far away the textured object is from the camera and then filters in-between them. The best filtering for this job is called “tri-linear interpolation”. The “MIP Filtering Trace Depth Threshold” forces the renderer to disable “tri-linear” filtering between MIP-map levels after a specified trace depth, which will help performance but at the potential cost of introducing banding artifacts. Generally, banding artifacts will not be visible beyond certain trace depths, so it is recommended that you use the default settings and allow the renderer to use switch to “bi-linear” filtering after the first trace depth.
Mip-Mans是一种预先过滤(模糊)版本的纹理贴图,是由Redshift在后台主动计算的,当从很远的处所看时,使用Mip-Maps,能使纹理的噪点更少。每个纹理都有几个Mip-Mpas。例如,一个1024x1024的纹理有512x512, 256x256, 128x128, 64x64, 32x32, 16x16, 8x8, 4x4, 2x2和1x1 MIP maps。每当渲染器需要为纹理贴图选择样本时,它就会选用两个持续的Mip贴图(好比256x256 和 128x128)。然后在这两种纹理之间进行过滤。选择多大的分辨率取决下纹理里相机的间隔。完成这一过滤工做最好的方式称为“tri-linear interpolation”(三线性插值)。“Mip Filtering Trace Depth Threshold”,(MIP过滤跟踪深度阈值)强迫渲染器在颠末指定数量的Trace Depth之后,禁用两种MIP-Maps级别之间的“Tri-Linear”过滤。这将进步渲染性能,但可能会引入条带状伪影。一般来说,超过一定Trace Depth之后条带状伪影就不成见了,所以建议你使用默认的设置,并允许渲染器在第一个Trace Depth之后切换成“Bi-Linear”过滤方式。

The “Copy Pre-Converted Textures to Cache Folder” option is used in junction with textures that have been pre-converted using the ‘TextureProcessor’ tool. By default this option is enabled, the assumption being that the local texture cache folder has better IO performance than the source texture folder, which is common for example when source textures are stored on slower network drives or when the local texture cache folder is on an SSD drive while the source texture folder is on a mechanical drive. By copying the pre-converted textures to the local machine cache folder, the out-of-core texture file streaming during rendering can be significantly faster, which can have a significant impact on rendering performance. This option should be disabled when the IO performance of the texture cache folder is equal to or lower than that of the source texture folder.
Copy Pre-Converted Textures to Cache Folder选项用于与Texture Processor东西预先转换过的贴图纹理同一使用。这个选项默认是开启的,能进步速度和前提是这里设定用于存储纹理的磁盘访问速度要比原始贴图途径访问速度快。假如原始贴图被放在一个比较慢的网络效劳器上,或者被放在普通的机械硬盘上,而当地磁盘是SSD硬盘的话,那么就该开启这个功能。通过复制转换格式前的原如贴图文件到当地缓存途径上,这些非核心纹理文件在渲染时间的访问数据流会快很多,这能在很大程度长进步渲染速度。假如指定途径的访问速度其实不比原文件途径访问速度快的话,应该禁用这个选项。

Global Overrides全局覆盖


Redshift Optimizations优化-19.jpg
The “Enable Reflections” and “Enable Refractions” options globally enable/disable reflections and refractions respectively.
Enable Reflections(启用反射)和Enable Refractions(启用折射)用于在全局上分别启用/禁用反射和折射。

The “Enable Subsurface Scattering” option bypasses all subsurface scattering preprocessing and renders the SSS shaders as diffuse.
Enable Subsurface Scattering(启用次外表散射)用于屏蔽次外表散射进程,也就是用漫反射代替SSS材质。

Similarly, “Enable Tessellation And Displacement” enables/disables all tessellation and displacement.
The “Enable Emission” option globally enables/disables emission on materials.
类似的Enable Tessellation、Displacement(启用细分和置换)用于启用/禁用细分和置换。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

菜鸟C4D推荐上一条 /9 下一条

菜鸟C4D与你一起从零开始!
菜鸟C4D微信公众号

( 浙ICP备13033195号-2 )Copyright 2013-2022;菜鸟C4DPowered by Discuz! 技术支持:菜鸟C4D