yuanjiajia
3 years ago
6 changed files with 243 additions and 3 deletions
-
15examples/print.php
-
35src/scene/Scene.php
-
61src/scene/materials/Emission.php
-
73src/scene/materials/MaterialsBase.php
-
26src/scene/materials/Visibility.php
-
36src/scene/objects/Objects.php
@ -0,0 +1,35 @@ |
|||
<?php |
|||
|
|||
namespace Blobt\Luxcore\scene; |
|||
|
|||
class Scene extends BaseCfg |
|||
{ |
|||
|
|||
/** |
|||
* @var array 模型数组 |
|||
*/ |
|||
public $objects; |
|||
|
|||
/** |
|||
* @var array 材质数组 |
|||
*/ |
|||
public $materials; |
|||
|
|||
/** |
|||
* @var array 贴图数组 |
|||
*/ |
|||
public $textures; |
|||
|
|||
/** |
|||
* @var array 灯光数组 |
|||
*/ |
|||
public $light; |
|||
|
|||
/** |
|||
* @var array 相机数组 |
|||
*/ |
|||
public $camera; |
|||
|
|||
} |
|||
|
|||
?>
|
@ -0,0 +1,61 @@ |
|||
<?php |
|||
|
|||
namespace Blobt\Luxcore\scene\materials; |
|||
use Blobt\Luxcore\scene\BaseCfg; |
|||
|
|||
class Emission extends BaseCfg |
|||
{ |
|||
|
|||
/** |
|||
* @var string TODO:一个小数形式的色值,具体作用沿未明明,(固定取值:1 1 1) |
|||
*/ |
|||
public $gain = "1 1 1"; |
|||
|
|||
/** |
|||
* @var integer TODO:具体作用沿未明明,(固定取值:0) |
|||
*/ |
|||
public $power = 0; |
|||
|
|||
/** |
|||
* @var integer TODO:具体作用沿未明明,(固定取值:1) |
|||
*/ |
|||
public $normalizebycolor = 1; |
|||
|
|||
/** |
|||
* @var integer TODO:具体作用沿未明明,(固定取值:0) |
|||
*/ |
|||
public $efficency = 0; |
|||
|
|||
/** |
|||
* @var integer TODO:具体作用沿未明明,(固定取值:90) |
|||
*/ |
|||
public $theta = 90; |
|||
|
|||
/** |
|||
* @var integer TODO:一个ID值,具体作用沿未明明,(固定取值:0) |
|||
*/ |
|||
public $id = 0; |
|||
|
|||
/** |
|||
* @var integer TODO:具体作用沿未明明,(固定取值:1) |
|||
*/ |
|||
public $importance = 1; |
|||
|
|||
/** |
|||
* @var integer TODO:具体作用沿未明明,(固定取值:-1) |
|||
*/ |
|||
public $temperature = -1; |
|||
|
|||
/** |
|||
* @var integer TODO:具体作用沿未明明,(固定取值:0) |
|||
*/ |
|||
public $temperatureNormalize = 0; |
|||
|
|||
/** |
|||
* @var string TODO:具体作用沿未明明,(固定取值:AUTO) |
|||
*/ |
|||
public $directlightsamplingType = "AUTO"; |
|||
|
|||
} |
|||
|
|||
?>
|
@ -0,0 +1,73 @@ |
|||
<?php |
|||
|
|||
namespace Blobt\Luxcore\scene\materials; |
|||
|
|||
use Blobt\Luxcore\core\Base; |
|||
use Blobt\Luxcore\scene\BaseCfg; |
|||
|
|||
class MaterialsBase extends BaseCfg |
|||
{ |
|||
|
|||
/** |
|||
* @var string 材质类型 |
|||
*/ |
|||
public $type = "matte"; |
|||
|
|||
/** |
|||
* @var string 此参数控制材质与光线作用时,产生阴影的透明度,或控制阴影的颜色(取值,小数形式的色值) |
|||
*/ |
|||
public $transparencyShadow = "0 0 0"; |
|||
|
|||
/** |
|||
* @var integer 当前材质的ID号(取值:大于0的整数) |
|||
*/ |
|||
public $id = 1000000; |
|||
|
|||
/** |
|||
* @var float TODO:具体作用尚未明确,(固定取值:0.001) |
|||
*/ |
|||
public $bumpsamplingdistance = 0.001; |
|||
|
|||
/** |
|||
* @var bool 是否开启阴捕捉(取值:ture 或 false) |
|||
*/ |
|||
public $shadowcatcherEnable = false; |
|||
|
|||
/** |
|||
* @var bool 是否仅捕捉内部灯光的阴影,需要上一个参数打开,本参数才可以设置(取值:ture 或 false) |
|||
*/ |
|||
public $shadowcatcherOnlyinfinitelights = false; |
|||
|
|||
/** |
|||
* @var bool 设置当前材质是否保存和使用全局光缓存,当需要打开时,需要渲染器开启全局光缓存功能(取值:ture 或 false) |
|||
*/ |
|||
public $photongiEnable = true; |
|||
|
|||
/** |
|||
* @var bool 设置当前材质的模型是否对摄像机背景透明,当需要打开时,需要摄像机开启 Transparent Film 功通(取值:ture 或 false) |
|||
*/ |
|||
public $holdoutEnable = false; |
|||
|
|||
/** |
|||
* @var object 一个 Emission类 的实例, |
|||
*/ |
|||
public $emission; |
|||
|
|||
/** |
|||
* @var object 一个 Visibility类 的实例 |
|||
*/ |
|||
public $visibility; |
|||
|
|||
/** |
|||
* 实例 Emission类、Visibility类的两个对象 |
|||
*/ |
|||
public function __construct($config = []) |
|||
{ |
|||
$this->emission = new Emission(); |
|||
$this->visibility = new Visibility(); |
|||
Base::__construct($config); |
|||
} |
|||
|
|||
} |
|||
|
|||
?>
|
@ -0,0 +1,26 @@ |
|||
<?php |
|||
|
|||
namespace Blobt\Luxcore\scene\materials; |
|||
use Blobt\Luxcore\scene\BaseCfg; |
|||
|
|||
class Visibility extends BaseCfg |
|||
{ |
|||
|
|||
/** |
|||
* @var bool 是否开启漫反射可见(取值:true 或 false) |
|||
*/ |
|||
public $indirectDiffuseEnable = true; |
|||
|
|||
/** |
|||
* @var bool 是否开启光泽度可见(取值:ture 或 false) |
|||
*/ |
|||
public $indirectGlossyEnable = true; |
|||
|
|||
/** |
|||
* @var bool 是否开启高光可见(取值:ture 或 false) |
|||
*/ |
|||
public $indirectSpecularEnable = true; |
|||
|
|||
} |
|||
|
|||
?>
|
@ -0,0 +1,36 @@ |
|||
<?php |
|||
|
|||
namespace Blobt\Luxcore\scene\objects; |
|||
use Blobt\Luxcore\scene\BaseCfg; |
|||
|
|||
class Objects extends BaseCfg |
|||
{ |
|||
|
|||
/** |
|||
* @var string 对应的材质数组键名 |
|||
*/ |
|||
public $material = 'chinese'; |
|||
|
|||
/** |
|||
* @var string 对应的ply网格文件名称 |
|||
*/ |
|||
public $ply = 'usa'; |
|||
|
|||
/** |
|||
* @var bool 是否对摄相机可见 |
|||
*/ |
|||
public $camerainvisible = 1; |
|||
|
|||
/** |
|||
* @var integer 模型的ID(取值:大于0的整数) |
|||
*/ |
|||
public $id = 5569; |
|||
|
|||
/** |
|||
* @var string 一个山16个数据组成模型的变换参数,包抱位置坐标,旋转参数,缩放参数 |
|||
*/ |
|||
public $appliedtransformation = '1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1'; |
|||
|
|||
} |
|||
|
|||
?>
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue