yuanjiajia
3 years ago
23 changed files with 360 additions and 85 deletions
-
68examples/print.php
-
1src/scene/light/LigthBase.php
-
7src/scene/materials/Disney.php
-
2src/scene/materials/Glass.php
-
2src/scene/materials/Glossy.php
-
13src/scene/materials/Metal.php
-
2src/scene/materials/Mix.php
-
2src/scene/materials/NullMaterial.php
-
2src/scene/materials/Roughmatte.php
-
0src/scene/materials/emission/Emission.php
-
0src/scene/materials/emission/Visibility.php
-
5src/scene/objects/Objects.php
-
8src/scene/render/Batch.php
-
12src/scene/render/Film.php
-
9src/scene/render/Path.php
-
2src/scene/render/Sampler.php
-
7src/scene/render/cache/LightStrategy.php
-
9src/scene/render/cache/PhotonGI.php
-
79src/scene/texture/map/Clouds.php
-
14src/scene/texture/map/ImageMap.php
-
105src/scene/texture/mapping/Mapping.php
-
52src/scene/texture/mapping/Triplanar.php
-
38src/scene/texture/transform/NormalMap.php
@ -0,0 +1,79 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace Blobt\Luxcore\scene\texture\map; |
||||
|
use Blobt\Luxcore\scene\texture\TextureBase; |
||||
|
use Blobt\Luxcore\scene\Scene; |
||||
|
use Blobt\Luxcore\core\Base; |
||||
|
use Blobt\Luxcore\scene\texture\mapping\Mapping; |
||||
|
|
||||
|
class Clouds extends TextureBase |
||||
|
{ |
||||
|
|
||||
|
/** |
||||
|
* 程序贴图的类型 |
||||
|
*/ |
||||
|
const TYPE_BLENDER_CLOUDS = 'blender_clouds'; |
||||
|
|
||||
|
/** |
||||
|
* 噪波的 柔和 与 锐利 类型 |
||||
|
*/ |
||||
|
const TYPE_SOFT_NOISE = 'soft_noise'; |
||||
|
const TYPE_HARD_NOISE = 'hard_noise'; |
||||
|
|
||||
|
/** |
||||
|
* 噪波 基本效果 类型 |
||||
|
*/ |
||||
|
const TYPE_BLENDER_ORIGINAL = 'blender_original'; |
||||
|
const TYPE_ORIGINAL_PERLIN = 'original_perlin'; |
||||
|
const TYPE_IMPROVED_PERLIN = 'oimproved_perlin'; |
||||
|
const TYPE_VORONOI_F1 = 'voronoi_f1'; |
||||
|
const TYPE_VORONOI_F2 = 'voronoi_f2'; |
||||
|
const TYPE_VORONOI_F3 = 'voronoi_f3'; |
||||
|
const TYPE_VORONOI_F4 = 'voronoi_f4'; |
||||
|
const TYPE_VORONOI_CRACKLE = 'voronoi_crackle'; |
||||
|
const TYPE_CELL_NOISE = 'cell_noise'; |
||||
|
|
||||
|
/** |
||||
|
* @var string 噪波的 柔和 与 锐利 类型,(取值:soft_noise或hard_noise) |
||||
|
*/ |
||||
|
public $noisetype = self::TYPE_SOFT_NOISE; |
||||
|
|
||||
|
/** |
||||
|
* @var string 噪波 基本效果 类型,取值是一个属于 基本效果 的字符串常量 |
||||
|
*/ |
||||
|
public $noisebasis = self::TYPE_BLENDER_ORIGINAL; |
||||
|
|
||||
|
/** |
||||
|
* @var float 噪波大小,单位跟随系统,(取值:大于0的小数) |
||||
|
*/ |
||||
|
public $noisesize = 0.25; |
||||
|
|
||||
|
/** |
||||
|
* @var integer 噪波深度,(取值:0-10的整数) |
||||
|
*/ |
||||
|
public $noisedepth = 2; |
||||
|
|
||||
|
/** |
||||
|
* @var float 亮度,(取值:大于等于0的小数) |
||||
|
*/ |
||||
|
public $bright = 1; |
||||
|
|
||||
|
/** |
||||
|
* @var float 对比度,(取值:大于等于0的小数) |
||||
|
*/ |
||||
|
public $contrast = 1; |
||||
|
|
||||
|
/** |
||||
|
* @param $mapping 必须传入一个 Mapping类对象 |
||||
|
*/ |
||||
|
public function __construct(Mapping $mapping,$config = []) |
||||
|
{ |
||||
|
$this->id = Scene::createID(); |
||||
|
$this->mapping = $mapping; |
||||
|
$this->type = self::TYPE_BLENDER_CLOUDS; |
||||
|
Base::__construct($config); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
?>
|
@ -0,0 +1,52 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace Blobt\Luxcore\scene\texture\mapping; |
||||
|
use Blobt\Luxcore\scene\texture\TextureBase; |
||||
|
use Blobt\Luxcore\scene\Scene; |
||||
|
use Blobt\Luxcore\core\Base; |
||||
|
|
||||
|
class Triplanar extends TextureBase |
||||
|
{ |
||||
|
|
||||
|
const TYPE_TRIPLANAR = 'triplanar'; |
||||
|
|
||||
|
/** |
||||
|
* @var string 一个textures(贴图数组)中的某个键名 |
||||
|
*/ |
||||
|
public $texture1; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @var string 一个textures(贴图数组)中的某个键名 |
||||
|
*/ |
||||
|
public $texture2; |
||||
|
|
||||
|
/** |
||||
|
* @var string 一个textures(贴图数组)中的某个键名 |
||||
|
*/ |
||||
|
public $texture3; |
||||
|
|
||||
|
/** |
||||
|
* @var bool 是否为凹凸贴图模式 |
||||
|
*/ |
||||
|
public $uvlessbumpmapEnable = 1; |
||||
|
|
||||
|
/** |
||||
|
* @var object 铺贴参数,一个Mapping类对象 |
||||
|
*/ |
||||
|
public $mapping; |
||||
|
|
||||
|
/** |
||||
|
* @param $mapping 必须传入一个 Mapping类对象 |
||||
|
*/ |
||||
|
public function __construct(Mapping $mapping,$config = []) |
||||
|
{ |
||||
|
$this->id = Scene::createID(); |
||||
|
$this->mapping = $mapping; |
||||
|
$this->type = self::TYPE_TRIPLANAR; |
||||
|
Base::__construct($config); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
?>
|
@ -0,0 +1,38 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace Blobt\Luxcore\scene\texture\transform; |
||||
|
use Blobt\Luxcore\scene\texture\TextureBase; |
||||
|
use Blobt\Luxcore\scene\Scene; |
||||
|
use Blobt\Luxcore\core\Base; |
||||
|
use Blobt\Luxcore\scene\texture\mapping\Mapping; |
||||
|
|
||||
|
class ImageMap extends TextureBase |
||||
|
{ |
||||
|
|
||||
|
const TYPE_NORMALMAP = 'normalmap'; |
||||
|
|
||||
|
/** |
||||
|
* @var string 一个textures(贴图数组)中的某个键名 |
||||
|
*/ |
||||
|
public $texture; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @var integer TODO: 具体作用尚未明确,(固定取值:1) |
||||
|
*/ |
||||
|
public $scale = 1; |
||||
|
|
||||
|
/** |
||||
|
* @param $mapping 必须传入一个 Mapping类对象 |
||||
|
*/ |
||||
|
public function __construct(Mapping $mapping,$config = []) |
||||
|
{ |
||||
|
$this->id = Scene::createID(); |
||||
|
$this->mapping = $mapping; |
||||
|
$this->type = self::TYPE_NORMALMAP; |
||||
|
Base::__construct($config); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
?>
|
Write
Preview
Loading…
Cancel
Save
Reference in new issue