From 8babf39e1087af8747b0a3ede4c55d2d1668f206 Mon Sep 17 00:00:00 2001 From: yuanjiajia <1139393632@qq.com> Date: Fri, 15 Apr 2022 17:30:16 +0800 Subject: [PATCH] =?UTF-8?q?configBatch.php=E3=80=81Batch.php=E3=80=81HaltT?= =?UTF-8?q?hresHold.php=E4=B8=89=E4=B8=AA=E6=96=87=E4=BB=B6=E6=9C=89?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/configBatch.php | 2 +- src/scene/render/Batch.php | 11 +++++++---- src/scene/render/HaltThresHold.php | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/examples/configBatch.php b/examples/configBatch.php index 137c900..f58cbeb 100644 --- a/examples/configBatch.php +++ b/examples/configBatch.php @@ -11,7 +11,7 @@ include dirname(dirname(__FILE__)) . "/vendor/autoload.php"; /** * 设置终止渲染参数 */ -$batch = new render\Batch(); //实例一个Batch类对象,当前默认的采样器类型为 Sobol +$batch = new render\Batch(); //实例一个Batch类对象 $batch->halttime = 600; //设置渲染时间超时600秒(此参数优先级最高,如果渲染时间超时,则立即终止渲染,而不管其他条件是否已经设置或已经满足) diff --git a/src/scene/render/Batch.php b/src/scene/render/Batch.php index 9745618..cf62ba0 100644 --- a/src/scene/render/Batch.php +++ b/src/scene/render/Batch.php @@ -2,7 +2,6 @@ namespace Blobt\Luxcore\scene\render; use Blobt\Luxcore\scene\BaseCfg; -use Blobt\Luxcore\core\Base; class Batch extends BaseCfg { @@ -11,21 +10,25 @@ class Batch extends BaseCfg * @var string 每像素光线跟踪平均采样数 与 每像素光线跟踪自适应采样数,取值:一组大于等于0的分别表示 每像素光线跟踪平均采样数 和 * 每像素光线跟踪自适应采样数 整数值字符串,0表示不启用这个参数,大于0表示启这个参数,其中,必须在 光线跟踪 参数中启 * 用 光线跟踪自适应采样数量 时, 每像素光线跟踪自适应采样数量 参数才可以设置大于零的整数。 + * 1、不启用噪波阈值状态下,如果渲染图像已满足采样条件,则触发终止渲染。 + * 2、启用噪波阈值状态下,如果渲染图像已满足采样条件,且图像噪波低于噪波阈值($stoprenderingEnable参数为 + * false状态时),触发终止渲染。 */ public $haltspp = "500 0"; /** - * @var integer 渲染超时的设置,单位秒,(取值:大于等于0的整数) + * @var integer 渲染超时的设置,单位秒。此参数优先级最高,如果渲染时间超时,则立即终止渲染,而不管其他条件是否已经设置或已经满足(取值:大于等于0的整数) */ public $halttime = 0; /** - * @var float 噪波阈值,(取值:浮点型色值),如果需要使噪波阈值,这里需要设一个参数,默认为0.02 + * @var float 噪波阈值,(取值:浮点型色值),如果需要使噪波阈值,这里需要设一个参数,默认为0.02。 + * 默认情况下,当图像噪波低于这个阈值时,则触发终止渲染,而不管 采样数 是否已设置或是否已满足。 */ public $haltthreshold; /** - * @var object 存储一个 haltThresHold类 对象 + * @var object 存储一个 haltThresHold类 对象,配置在使用噪波阈值作为渲染终止条件时的参数。 */ public $haltthresholdcfg; diff --git a/src/scene/render/HaltThresHold.php b/src/scene/render/HaltThresHold.php index 9d7514e..e721a35 100644 --- a/src/scene/render/HaltThresHold.php +++ b/src/scene/render/HaltThresHold.php @@ -25,6 +25,7 @@ class HaltThresHold extends BaseCfg /** * @var bool 当渲染器状态达到此类参数设置的值,是否停止渲染,(默认取值:true) + * 是否当图像噪波低于阈值时,触发终止渲染,而不管 采样数 是否已设置或是否已满足。 */ public $stoprenderingEnable = true;