You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
2.3 KiB
58 lines
2.3 KiB
<?php
|
|
|
|
|
|
|
|
namespace Blobt\Luxcore\scene;
|
|
|
|
|
|
include dirname(dirname(__FILE__)) . "/vendor/autoload.php";
|
|
|
|
|
|
/**
|
|
* @var object 配置光线跟综参数
|
|
* 当渲染器开启了全局光缘存并处于调试模式下,光线跟踪自适应彩样数量及最大亮度嵌制参数不能设置与输出。
|
|
*/
|
|
$path = new render\Path(); //实例一个Path类对象
|
|
|
|
|
|
|
|
|
|
$path->pathDepth = new render\PathDepth(); //实例一个 PathDepth(光线跟踪深度)类对象,使光线跟踪参数可以设置
|
|
|
|
$path->pathDepth->total = 12; //设置 漫反射、光泽反射、高光反射 的最大跟踪不能超过12,如果漫反射、光泽反射、高光反射当中有高于这个值的设置,
|
|
//那么其实际最大跟踪深度则限制为这个数值
|
|
|
|
$path->pathDepth->diffuse = 8; //设置 漫反射跟踪深度为 8
|
|
|
|
$path->pathDepth->glossy = 8; //设置 光泽反射跟踪深度为 8
|
|
|
|
$path->pathDepth->glossy = 15; //设置 高光反射跟踪深度为 15,但受 total的限制,其实际跟踪深度为 12
|
|
|
|
|
|
|
|
|
|
$path->hybridBackforWard = new render\HybridBackforWard(); //实例一个 HybridBackforWard类对象,使 光线跟踪自适应彩样数量 参数可以设置
|
|
|
|
$path->hybridBackforWard->enable = BaseCfg::OPEN; //开启 光线跟踪自适应彩样数量
|
|
|
|
$path->hybridBackforWard->partition = 0.2; //设置 不跟踪光线 为百分之20
|
|
|
|
$path->hybridBackforWard->glossinessthreshold = 0.02; //设置区分图像的 平坦区域和非平坦区域 的阀值为0.02
|
|
|
|
|
|
|
|
|
|
$path->forceblackbackgroundEnable = BaseCfg::OPEN; //开启 限制 每个像素 最大亮度嵌制参数
|
|
|
|
$path->clampingVarianceMaxvalue = 1200; //设置 最大亮度嵌制参数 为1200(这是一个DHR类型灰度色值)
|
|
|
|
|
|
|
|
|
|
$path->photonGI = new render\cache\PhotonGI(); //实例一个PhotonGI类对象,开启全局光缓存功能
|
|
|
|
$path->photonGI->persistentFile = "../temp.pgi"; //将全局光缓存保个子为 temp.pgi
|
|
|
|
echo $path; //输出光线跟综参数
|
|
|
|
?>
|