Browse Source

“file”、“effect”两个目录移动到“scene”目录下,新增了“PhotonGI”、“Indirect”、“Caustic”三个关于全局光缓存的类文件,修改了“path”、“film”、“print”三个类文件,其他有部分文件有修改注释

master
yuanjiajia 3 years ago
parent
commit
f8c30a02ae
  1. 2
      examples/print.php
  2. 3
      src/scene/BaseCfg.php
  3. 46
      src/scene/Caustic.php
  4. 2
      src/scene/Film.php
  5. 41
      src/scene/Indirect.php
  6. 8
      src/scene/Path.php
  7. 51
      src/scene/PhotonGI.php
  8. 2
      src/scene/effect/AnalogFilmSimulation.php
  9. 4
      src/scene/effect/BackgroundImg.php
  10. 2
      src/scene/effect/Bloom.php
  11. 2
      src/scene/effect/CammaCorrection.php
  12. 2
      src/scene/effect/ColorAberration.php
  13. 2
      src/scene/effect/ColorLUT.php
  14. 6
      src/scene/effect/IrradianceContourLines.php
  15. 41
      src/scene/effect/LightInformation.php
  16. 4
      src/scene/effect/Mist.php
  17. 2
      src/scene/effect/NoiseReducerBCD.php
  18. 2
      src/scene/effect/NoiseReducerOIDN.php
  19. 2
      src/scene/effect/Pretreatment.php
  20. 2
      src/scene/effect/Synthesis.php
  21. 2
      src/scene/effect/ToneMapAutoLinear.php
  22. 2
      src/scene/effect/ToneMapCamera.php
  23. 2
      src/scene/effect/ToneMapLinear.php
  24. 2
      src/scene/effect/ToneMapReinhard.php
  25. 2
      src/scene/effect/Vignetting.php
  26. 2
      src/scene/effect/WhiteBalance.php
  27. 44
      src/scene/file/ImageSaverBase.php
  28. 2
      src/scene/file/ImageSaverNumber.php

2
examples/print.php

@ -4,8 +4,6 @@
namespace Blobt\Luxcore\scene;
include dirname(dirname(__FILE__)) . "/vendor/autoload.php";
use Blobt\Luxcore\file;
use Blobt\Luxcore\effect;
//设置打印 渲染引擎 的配置参数

3
src/scene/BaseCfg.php

@ -53,7 +53,8 @@ class BaseCfg extends Base
$value = $item->getValue($this);
if (is_string($value))
{
if( count(explode(" ", $value)) != 3 || in_array(false,array_map('is_numeric',explode(" ", $value))) )
if( count(explode(" ", $value)) != 3
|| in_array(false,array_map('is_numeric',explode(" ", $value))) )
{
$ret .= "{$className}.{$name} = \"{$value}\"\n";
}

46
src/scene/Caustic.php

@ -0,0 +1,46 @@
<?php
namespace Blobt\Luxcore\scene;
use Blobt\Luxcore\core\Base;
class Caustic extends BaseCfg
{
/**
* @var bool 是否打开本类的参数控制(默认:false)
*/
public $enabled = false;
/**
* @var integer TODO:最大尺寸(百万),具体作用尚未明确(默认取值:100000)
*/
public $maxsize = 100000;
/**
* @var float 查找半径大小,单位跟系统,取值为0表是自动给出查找半径,大于0的值表示查找半径大小,(取值:大于0的小数)
*/
public $lookupRadius = 0.075;
/**
* @var float 弧度,(取值:0-90的小数)
*/
public $lookupNormalangle = 90;
/**
* @var integer TODO:样本步骤,具体作用尚未明确,当取值为0时,将关闭本身及其下面两个参数控制(取值:大于等于0的整数)
*/
public $updatespp = 8;
/**
* @var float TODO:半径缩减百分比,具体作用尚未明确,(取值:0.7-0.99的小数)
*/
public $updatesppRadiusreduction = 0.96;
/**
* @var float TODO:最小半径,具体作用尚未明确,(取值:大于0的小数)
*/
public $updatesppMinradius = 0.003;
}
?>

2
src/scene/Film.php

@ -2,8 +2,6 @@
namespace Blobt\Luxcore\scene;
use Blobt\Luxcore\core\Base;
use Blobt\Luxcore\file;
use Blobt\Luxcore\effect;
class Film extends BaseCfg
{

41
src/scene/Indirect.php

@ -0,0 +1,41 @@
<?php
namespace Blobt\Luxcore\scene;
use Blobt\Luxcore\core\Base;
class Indirect extends BaseCfg
{
/**
* @var bool 是否打开本类的参数控制(默认:false)
*/
public $enabled = false;
/**
* @var integer TODO:最大尺寸(百万),具体作用尚未明确(固定取值:0)
*/
public $maxsize = 0;
/**
* @var float 查找半径大小,单位跟系统,取值为0表是自动给出查找半径,大于0的值表示查找半径大小,(取值:大于0的小数)
*/
public $lookupRadius = 0.15;
/**
* @var float 终止阈值(取值:0-1的小数)
*/
public $haltthreshold = 0.05;
/**
* @var float 采用蛮力计算的距离范围,单位跟随系统(取值:大于0的小数)
*/
public $usagethresholdscale = 10;
/**
* @var float 弧度,(取值:0-90的小数)
*/
public $lookupNormalangle = 90;
}
?>

8
src/scene/Path.php

@ -16,6 +16,11 @@ class Path extends BaseCfg
*/
public $hybridBackforWard;
/**
* @var object 存储一个 GhotonGI类 对象
*/
public $photonGI;
@ -30,6 +35,9 @@ class Path extends BaseCfg
public $clampingVarianceMaxvalue = 1000;
/**
* 实例 PathDepth类、HybridBackforWard类的两个对象
*/

51
src/scene/PhotonGI.php

@ -0,0 +1,51 @@
<?php
namespace Blobt\Luxcore\scene;
use Blobt\Luxcore\core\Base;
class PhotonGI extends BaseCfg
{
/**
* @var float 最大光子计数,(取值:大于等于1百万)
*/
public $photonMaxcount = 4.7e+07;
/**
* @var integer 光子深度,(取值:3-64的整数)
*/
public $photonMaxdepth = 8;
/**
* @var float 光泽度阈值,(取值:0-1的小数)
*/
public $glossinessusagethreshold = 0.05;
/**
* @var string 储存光子缓存文件的路径及文件名,如果字符串为空,则表示不储存光子缓存文件
*/
public $persistentFile = '';
/**
* @var object 存储一个 Indirect类 对象
*/
public $indirect;
/**
* @var object 存储一个 Caustic类 对象
*/
public $caustic;
/**
* 实例 PathDepth类、HybridBackforWard类的两个对象
*/
public function __construct($config = [])
{
$this->indirect = new Indirect($config);
$this->caustic = new Caustic($config);
Base::__construct($config);
}
}
?>

src/effect/AnalogFilmSimulation.php → src/scene/effect/AnalogFilmSimulation.php

src/effect/BackgroundImg.php → src/scene/effect/BackgroundImg.php

src/effect/Bloom.php → src/scene/effect/Bloom.php

src/effect/CammaCorrection.php → src/scene/effect/CammaCorrection.php

src/effect/ColorAberration.php → src/scene/effect/ColorAberration.php

src/effect/ColorLUT.php → src/scene/effect/ColorLUT.php

src/effect/IrradianceContourLines.php → src/scene/effect/IrradianceContourLines.php

41
src/scene/effect/LightInformation.php

@ -0,0 +1,41 @@
<?php
namespace Blobt\Luxcore\scene\file;
use Blobt\Luxcore\scene\BaseCfg;
class LightInformation extends BaseCfg
{
/**
* 与Light Information(灯光信息)类型图像中的每个类型对应,
*/
const TYPE_EMISSION = 'EMISSION';
const TYPE_DIRECT_DIFFUSE = 'DIRECT_DIFFUSE';
const TYPE_DIRECT_DIFFUSE_REFLECT = 'DIRECT_DIFFUSE_REFLECT';
const TYPE_DIRECT_DIFFUSE_TRANSMIT = 'DIRECT_DIFFUSE_TRANSMIT';
const TYPE_DIRECT_GLOSSY = 'DIRECT_GLOSSY';
const TYPE_DIRECT_GLOSSY_REFLECT = 'DIRECT_GLOSSY_REFLECT';
const TYPE_DIRECT_GLOSSY_TRANSMIT = 'DIRECT_GLOSSY_TRANSMIT';
const TYPE_INDIRECT_DIFFUSE = 'INDIRECT_DIFFUSE';
const TYPE_INDIRECT_DIFFUSE_REFLECT = 'INDIRECT_DIFFUSE_REFLECT';
const TYPE_INDIRECT_DIFFUSE_TRANSMIT = 'INDIRECT_DIFFUSE_TRANSMIT';
const TYPE_INDIRECT_GLOSSY = 'INDIRECT_GLOSSY';
const TYPE_INDIRECT_GLOSSY_REFLECT = 'INDIRECT_GLOSSY_REFLECT';
const TYPE_INDIRECT_GLOSSY_TRANSMIT = 'INDIRECT_GLOSSY_TRANSMIT';
const TYPE_INDIRECT_SPECULAR = 'INDIRECT_SPECULAR';
const TYPE_INDIRECT_SPECULAR_REFLECT = 'INDIRECT_SPECULAR_REFLECT';
const TYPE_INDIRECT_SPECULAR_TRANSMIT = 'INDIRECT_SPECULAR_TRANSMIT';
const TYPE_CAUSTIC = 'CAUSTIC';
/**
* @var string 此类参数的开关打开
*/
public $type = 'OUTPUT_SWITCHER';
/**
* @var string 与Light Information(灯光信息)类型图像中的每个类型对应,
*/
public $channel;
}
?>

src/effect/Mist.php → src/scene/effect/Mist.php

src/effect/NoiseReducerBCD.php → src/scene/effect/NoiseReducerBCD.php

src/effect/NoiseReducerOIDN.php → src/scene/effect/NoiseReducerOIDN.php

src/effect/Pretreatment.php → src/scene/effect/Pretreatment.php

src/effect/Synthesis.php → src/scene/effect/Synthesis.php

src/effect/ToneMapAutoLinear.php → src/scene/effect/ToneMapAutoLinear.php

src/effect/ToneMapCamera.php → src/scene/effect/ToneMapCamera.php

src/effect/ToneMapLinear.php → src/scene/effect/ToneMapLinear.php

src/effect/ToneMapReinhard.php → src/scene/effect/ToneMapReinhard.php

src/effect/Vignetting.php → src/scene/effect/Vignetting.php

src/effect/WhiteBalance.php → src/scene/effect/WhiteBalance.php

src/file/ImageSaverBase.php → src/scene/file/ImageSaverBase.php

src/file/ImageSaverNumber.php → src/scene/file/ImageSaverNumber.php

Loading…
Cancel
Save