Browse Source

基本常用的类文件已经红编写完成

master
yuanjiajia 3 years ago
parent
commit
7d0b187547
  1. 3
      examples/print.php
  2. 69
      src/scene/AnalogFilmSimulation.php
  3. 34
      src/scene/BackgroundImg.php
  4. 26
      src/scene/Bloom.php
  5. 21
      src/scene/ColorAberration.php
  6. 27
      src/scene/ColorLUT.php
  7. 36
      src/scene/IrradianceContourLines.php
  8. 41
      src/scene/Mist.php
  9. 21
      src/scene/Synthesis.php
  10. 16
      src/scene/ToneMapAutoLinear.php
  11. 2
      src/scene/ToneMapCamera.php
  12. 2
      src/scene/ToneMapReinhard.php
  13. 21
      src/scene/Vignetting.php
  14. 31
      src/scene/WhiteBalance.php

3
examples/print.php

@ -39,12 +39,11 @@ echo $filesaver;
//设置打印 “胶片” 配置参数
$film = new Film();
$film->outputs[] = new ImageSaverBase(['type' => ImageSaverBase::TYPE_RGBA ]);
$film->outputs[] = new ImageSaverBase(['type' => ImageSaverBase::TYPE_MATERIAL_ID ]);
$film->outputs[] = new ImageSaverNumber(['index' => 2 ]);
$film->imagepipelines['002'] = [new NoiseReducerOIDN(),new Pretreatment(),new ToneMapCamera(),new CammaCorrection()];
$film->imagepipelines['002'] = [new NoiseReducerOIDN(),new Pretreatment(),new ToneMapAutoLinear(),new ToneMapLinear(),new AnalogFilmSimulation(),new IrradianceContourLines(),new CammaCorrection()];
echo $film;
?>

69
src/scene/AnalogFilmSimulation.php

@ -0,0 +1,69 @@
<?php
namespace Blobt\Luxcore\scene;
class AnalogFilmSimulation extends BaseCfg
{
const TYPE_ADVANTIX_100CD = 'Advantix_100CD';
const TYPE_ADVANTIX_200CD = 'Advantix_200CD';
const TYPE_ADVANTIX_400CD = 'Advantix_400CD';
const TYPE_AGFACHROME_CTPECISA_200CD = 'Agfachrome_ctpecisa_200CD';
const TYPE_AGFACHROME_CTPRECISA_100CD = 'Agfachrome_ctprecisa_100CD';
const TYPE_AGFACHROME_RSX2_050CD = 'Agfachrome_rsx2_050CD';
const TYPE_AGFACHROME_RSX2_100CD = 'Agfachrome_rsx2_100CD';
const TYPE_AGFACHROME_RSX2_200CD = 'Agfachrome_rsx2_200CD';
const TYPE_AGFACOLOR_FUTURA_100CD = 'Agfacolor_futura_100CD';
const TYPE_AGFACOLOR_FUTURA_200CD = 'Agfacolor_futura_200CD';
const TYPE_AGFACOLOR_FUTURA_400CD = 'Agfacolor_futura_400CD';
const TYPE_AGFACOLOR_FUTURAII_100CD = 'Agfacolor_futuraII_100CD';
const TYPE_AGFACOLOR_FUTURAII_200CD = 'Agfacolor_futuraII_200CD';
const TYPE_AGFACOLOR_FUTURAII_400CD = 'Agfacolor_futuraII_400CD';
const TYPE_AGFACOLOR_HDC_100_PLUSCD = 'Agfacolor_hdc_100_plusCD';
const TYPE_AGFACOLOR_HDC_200_PLUSCD = 'Agfacolor_hdc_200_plusCD';
const TYPE_AGFACOLOR_HDC_400_PLUSCD = 'Agfacolor_hdc_400_plusCD';
const TYPE_AGFACOLOR_OPTIMAII_100CD = 'Agfacolor_optimaII_100CD';
const TYPE_AGFACOLOR_OPTIMAII_200CD = 'Agfacolor_optimaII_200CD';
const TYPE_AGFACOLOR_ULTRA_050_CD = 'Agfacolor_ultra_050_CD';
const TYPE_AGFACOLOR_VISTA_100CD = 'Agfacolor_vista_100CD';
const TYPE_AGFACOLOR_VISTA_200CD = 'Agfacolor_vista_200CD';
const TYPE_AGFACOLOR_VISTA_400CD = 'Agfacolor_vista_400CD';
const TYPE_AGFACOLOR_VISTA_800CD = 'Agfacolor_vista_800CD';
const TYPE_EKTACHROME_100_PLUSCD = 'Ektachrome_100_plusCD';
const TYPE_EKTACHROME_100CD = 'Ektachrome_100CD';
const TYPE_EKTACHROME_320TCD = 'Ektachrome_320TCD';
const TYPE_EKTACHROME_400XCD = 'Ektachrome_400XCD';
const TYPE_EKTACHROME_64CD = 'Ektachrome_64CD';
const TYPE_EKTACHROME_64TCD = 'Ektachrome_64TCD';
const TYPE_EKTACHROME_E100SCD = 'Ektachrome_E100SCD';
const TYPE_F125CD = 'F125CD';
const TYPE_F250CD = 'F250CD';
const TYPE_F400CD = 'F400CD';
const TYPE_FCICD = 'FCICD';
const TYPE_GOLD_100CD = 'Gold_100CD';
const TYPE_GOLD_200CD = 'Gold_200CD';
const TYPE_KODACHROME_200CD = 'Kodachrome_200CD';
const TYPE_KODACHROME_25CD = 'Kodachrome_25CD';
const TYPE_KODACHROME_64CD = 'Kodachrome_64CD';
const TYPE_MAX_ZOOM_800CD = 'Max_Zoom_800CD';
const TYPE_PORTRA_100TCD = 'Portra_100TCD';
const TYPE_PORTRA_160NCCD = 'Portra_160NCCD';
const TYPE_PORTRA_160VCCD = 'Portra_160VCCD';
const TYPE_PORTRA_400NCCD = 'Portra_400NCCD';
const TYPE_PORTRA_400VCCD = 'Portra_400VCCD';
const TYPE_PORTRA_800CD = 'Portra_800CD';
/**
* @var string 一个名为 CAMERA_RESPONSE_FUNC(模拟电影胶片) 的特效,(固定取值:CAMERA_RESPONSE_FUNC)
*/
public $type = "CAMERA_RESPONSE_FUNC";
/**
* @var string 选择何种模拟效果,(取值:1000-10000的整数)
*/
public $name = self::TYPE_ADVANTIX_100CD;
}
?>

34
src/scene/BackgroundImg.php

@ -0,0 +1,34 @@
<?php
namespace Blobt\Luxcore\scene;
class BackgroundImg extends BaseCfg
{
const TYPE_BYTE = 'byte';
const TYPE_FLOAT = 'float';
/**
* @var string 一种模拟照相机曝光参数的颜色映射,(固定取值:BACKGROUND_IMG)
*/
public $type = "BACKGROUND_IMG";
/**
* @var string 背景图像的文件路径
*/
public $file;
/**
* @var float 使用一个gamma值预先对背景图进行反乘
*/
public $gamma = 2.2;
/**
* @var string TODO:具体作用尚未明确,(默认取值:“byte”)
*/
public $storage = self::TYPE_BYTE;
}
?>

26
src/scene/Bloom.php

@ -0,0 +1,26 @@
<?php
namespace Blobt\Luxcore\scene;
class Bloom extends BaseCfg
{
/**
* @var string 一种名为 BLOOM(炫光) 的特效,(固定取值:BLOOM)
*/
public $type = "BLOOM";
/**
* @var float 炫光半径百分比,(取值:0-1的小数)
*/
public $radius = 0.07;
/**
* @var float 炫光强度,(取值:0-1的小数)
*/
public $weight = 0.25;
}
?>

21
src/scene/ColorAberration.php

@ -0,0 +1,21 @@
<?php
namespace Blobt\Luxcore\scene;
class ColorAberration extends BaseCfg
{
/**
* @var string 一种名为 COLOR_ABERRATION(色差) 的特效,(固定取值:COLOR_ABERRATION)
*/
public $type = "COLOR_ABERRATION";
/**
* @var float 强度,(取值:0-0.1的小数)
*/
public $amount = 0.005;
}
?>

27
src/scene/ColorLUT.php

@ -0,0 +1,27 @@
<?php
namespace Blobt\Luxcore\scene;
class ColorLUT extends BaseCfg
{
/**
* @var string 对图象使用 LUT文件校正 的特效,(固定取值:COLOR_LUT)
*/
public $type = "COLOR_LUT";
/**
* @var string LUT文件的路径
*/
public $file;
/**
* @var float 强度,(取值:0-1的小数)
*/
public $strength = 1;
}
?>

36
src/scene/IrradianceContourLines.php

@ -0,0 +1,36 @@
<?php
namespace Blobt\Luxcore\scene;
class IrradianceContourLines extends BaseCfg
{
/**
* @var string CONTOUR_LINES(辐照度等值线)的特效,(固定取值:CONTOUR_LINES)
*/
public $type = "CONTOUR_LINES";
/**
* @var string TODO: 具体作用尚未明确,(取值:0-1000的小数)
*/
public $range = 100;
/**
* @var float TODO: 具体作用尚未明确,(取值:小于1000的小数)
*/
public $scale = 179;
/**
* TODO: 具体作用尚未明确,(取值:2-50的整数)
*/
public $steps = 8;
/**
* TODO: 具体作用尚未明确,(取值:-1-20的整数)
*/
public $zerogridsize = 8;
}
?>

41
src/scene/Mist.php

@ -0,0 +1,41 @@
<?php
namespace Blobt\Luxcore\scene;
class Mist extends BaseCfg
{
/**
* @var string 一种名为 MIST(薄雾) 的特效,(固定取值:BLOOM)
*/
public $type = "MIST";
/**
* @var string 薄雾色值
*/
public $color = '0.3 0.4 0.55';
/**
* @var float 薄雾强度,(取值:0-1的小数)
*/
public $amount = 0.3;
/**
* @var integer 薄雾开始距离,(取值:大于等于0的整数)
*/
public $startdistance = 100;
/**
* @var integer 薄雾结速距离,(取值:大于等于0的整数)
*/
public $enddistance = 1000;
/**
* @var bool 是否排除背景,(默认取值:true)
*/
public $excludebackground = true;
}
?>

21
src/scene/Synthesis.php

@ -0,0 +1,21 @@
<?php
namespace Blobt\Luxcore\scene;
class Synthesis extends BaseCfg
{
/**
* 预乘阿尔法
*/
const TYPE_PREMULTIPLY_ALPHA = 'PREMULTIPLY_ALPHA';
/**
* @var string TODO:合成类型,默认PREMULTIPLY_ALPHA,除此之外尚未查到其他可选的图像合成类型。
*/
public $type = self::TYPE_PREMULTIPLY_ALPHA;
}
?>

16
src/scene/ToneMapAutoLinear.php

@ -0,0 +1,16 @@
<?php
namespace Blobt\Luxcore\scene;
class ToneMapAutoLinear extends BaseCfg
{
/**
* @var string 颜色映射类型为 自动线性倍增,(固定取值:TONEMAP_AUTOLINEAR)
*/
public $type = "TONEMAP_AUTOLINEAR";
}
?>

2
src/scene/ToneMapCamera.php

@ -7,7 +7,7 @@ class ToneMapCamera extends BaseCfg
{
/**
* @var string 一种模拟照相机曝光参数的颜色映射类型,(固定取值:TONEMAP_LINEAR)
* @var string 一种模拟照相机曝光参数的颜色映射,(固定取值:TONEMAP_LINEAR)
*/
public $type = "TONEMAP_LUXLINEAR";

2
src/scene/ToneMapReinhard.php

@ -7,7 +7,7 @@ class ToneMapReinhard extends BaseCfg
{
/**
* @var string 一种名为 ToneMapReinhard(莱茵哈德) 的颜色映射类型,(固定取值:TONEMAP_REINHARD02)
* @var string 一种名为 ToneMapReinhard(莱茵哈德) 的颜色映射,(固定取值:TONEMAP_REINHARD02)
*/
public $type = "TONEMAP_LUXLINEAR";

21
src/scene/Vignetting.php

@ -0,0 +1,21 @@
<?php
namespace Blobt\Luxcore\scene;
class Vignetting extends BaseCfg
{
/**
* @var string 一种名为 VIGNETTING(图像四周暗角) 的特效,(固定取值:VIGNETTING)
*/
public $type = "VIGNETTING";
/**
* @var float 强度,(取值:0-1的小数)
*/
public $scale = 0.4;
}
?>

31
src/scene/WhiteBalance.php

@ -0,0 +1,31 @@
<?php
namespace Blobt\Luxcore\scene;
class WhiteBalance extends BaseCfg
{
/**
* @var string WHITE_BALANCE(白平衡) 调整器,(固定取值:WHITE_BALANCE)
*/
public $type = "WHITE_BALANCE";
/**
* @var string 温度,(取值:1000-10000的整数)
*/
public $temperature = 6500;
/**
* @var bool 是否反向,(默认取值:true)
*/
public $reverse = true;
/**
* @var string TODO:具体作用尚未明确,(固定取值:1)
*/
public $normalize = 1;
}
?>
Loading…
Cancel
Save