|
@ -0,0 +1,58 @@ |
|
|
|
|
|
<?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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$path->photonGI = new render\cache\PhotonGI(); //实例一个PhotonGI类对象,开启全局光缓存功能
|
|
|
|
|
|
|
|
|
|
|
|
$path->photonGI->persistentFile = "../temp.pgi"; //将全局光缓存保个子为 temp.pgi
|
|
|
|
|
|
|
|
|
|
|
|
echo $path; //输出光线跟综参数
|
|
|
|
|
|
|
|
|
|
|
|
?>
|