Browse Source

新四个Blender原生的程序纹理类文件,Clouds、Blend类文件分别更名为BlenderClouds、BlenderBlend类文件,其他有部分程序纹理类文件修改了注释

master
yuanjiajia 3 years ago
parent
commit
a2cc269165
  1. 10
      src/scene/texture/procedural/BlenderBlend.php
  2. 8
      src/scene/texture/procedural/BlenderClouds.php
  3. 80
      src/scene/texture/procedural/BlenderDistortedNoise.php
  4. 57
      src/scene/texture/procedural/BlenderMagic.php
  5. 99
      src/scene/texture/procedural/BlenderMarble.php
  6. 118
      src/scene/texture/procedural/BlenderMusgrave.php
  7. 5
      src/scene/texture/procedural/Fbm.php
  8. 5
      src/scene/texture/procedural/Marble.php
  9. 5
      src/scene/texture/procedural/Wrinkled.php

src/scene/texture/procedural/Blend.php → src/scene/texture/procedural/BlenderBlend.php

src/scene/texture/procedural/Clouds.php → src/scene/texture/procedural/BlenderClouds.php

80
src/scene/texture/procedural/BlenderDistortedNoise.php

@ -0,0 +1,80 @@
<?php
namespace Blobt\Luxcore\scene\texture\procedural;
use Blobt\Luxcore\scene\texture\TextureBase;
use Blobt\Luxcore\scene\Scene;
use Blobt\Luxcore\core\Base;
use Blobt\Luxcore\scene\texture\mapping\Mapping;
class BlenderDistortedNoise extends TextureBase
{
/**
* Blender原生的畸变劋波的程序纹理
*/
const TYPE_BLENDER_DISTORTEDNOISE = 'blender_distortednoise';
/**
* 噪波效果 原型
*/
const TYPE_BLENDER_ORIGINAL = 0;
const TYPE_ORIGINAL_PERLIN = 1;
const TYPE_IMPROVED_PERLIN = 2;
const TYPE_VORONOI_F1 = 3;
const TYPE_VORONOI_F2 = 4;
const TYPE_VORONOI_F3 = 5;
const TYPE_VORONOI_F4 = 6;
const TYPE_VORONOI_CRACKLE = 8;
const TYPE_CELL_NOISE = 9;
/**
* @var string 畸变噪波效果 原型,取值是一个属于 噪波效果原型 的字符串常量
*/
public $noise_distortion = self::TYPE_BLENDER_ORIGINAL;
/**
* @var string 噪波效果 原型,取值是一个属于 噪波效果原型 的字符串常量
*/
public $noisebasis = self::TYPE_BLENDER_ORIGINAL;
/**
* @var float 噪波大小,单位跟随系统,(取值:大于0的小数)
*/
public $noisesize = 0.25;
/**
* @var float 畸变强度,(取值:任意自然数)
*/
public $distortion = 1;
/**
* @var float 亮度,(取值:大于等于0的小数)
*/
public $bright = 1;
/**
* @var float 对比度,(取值:大于等于0的小数)
*/
public $contrast = 1;
/**
* @var object 铺贴参数,一个Mapping类对象
*/
public $mapping;
/**
* @param array $config 接收一个数组,可以初始化当前实例化对象的各种属性
* @param object $mapping 如需自定义铺贴参数,必须传入一个 Mapping类对象,否则使用一个默认的铺贴参数
*/
public function __construct($config = [],Mapping $mapping = null)
{
if( $mapping != null )$this->mapping = $mapping;
else $this->mapping = new Mapping();
$this->type = self::TYPE_BLENDER_DISTORTEDNOISE;
$this->id = Scene::createID();
Base::__construct($config);
}
}
?>

57
src/scene/texture/procedural/BlenderMagic.php

@ -0,0 +1,57 @@
<?php
namespace Blobt\Luxcore\scene\texture\procedural;
use Blobt\Luxcore\scene\texture\TextureBase;
use Blobt\Luxcore\scene\Scene;
use Blobt\Luxcore\core\Base;
use Blobt\Luxcore\scene\texture\mapping\Mapping;
class BlenderMagic extends TextureBase
{
/**
* Blender原生的幻彩效果的程序纹理
*/
const TYPE_MAGIC = 'magic';
/**
* @var float 湍流,(取值:大于0的小数)
*/
public $turbulence = 5;
/**
* @var integer 噪波深度,(取值:0-10的整数)
*/
public $noisedepth = 2;
/**
* @var float 亮度,(取值:大于等于0的小数)
*/
public $bright = 1;
/**
* @var float 对比度,(取值:大于等于0的小数)
*/
public $contrast = 1;
/**
* @var object 铺贴参数,一个Mapping类对象
*/
public $mapping;
/**
* @param array $config 接收一个数组,可以初始化当前实例化对象的各种属性
* @param object $mapping 如需自定义铺贴参数,必须传入一个 Mapping类对象,否则使用一个默认的铺贴参数
*/
public function __construct($config = [],Mapping $mapping = null)
{
if( $mapping != null )$this->mapping = $mapping;
else $this->mapping = new Mapping();
$this->type = self::TYPE_MAGIC;
$this->id = Scene::createID();
Base::__construct($config);
}
}
?>

99
src/scene/texture/procedural/BlenderMarble.php

@ -0,0 +1,99 @@
<?php
namespace Blobt\Luxcore\scene\texture\procedural;
use Blobt\Luxcore\scene\texture\TextureBase;
use Blobt\Luxcore\scene\Scene;
use Blobt\Luxcore\core\Base;
use Blobt\Luxcore\scene\texture\mapping\Mapping;
class BlenderMarble extends TextureBase
{
/**
* Blender原生的大理石的程序纹理
*/
const TYPE_BLENDER_MARBLE = 'blender_marble';
/**
* 噪波的 柔和 锐利 类型
*/
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';
/**
* 波形效果 原型
*/
const TYPE_SIN = 'sin'; //正玄波
const TYPE_SAW = 'saw'; //锯齿波
const TYPE_TRI = 'tri'; //三角波
/**
* @var string 噪波的 柔和 锐利 类型,(取值:soft_noise或hard_noise)
*/
public $noisetype = self::TYPE_SOFT_NOISE;
/**
* @var string 波形效果 原型,取值是一个属于 波形效果原型 的字符串常量
*/
public $noisebasis2 = self::TYPE_SIN;
/**
* @var string 噪波效果 原型,取值是一个属于 噪波效果原型 的字符串常量
*/
public $noisebasis = self::TYPE_BLENDER_ORIGINAL;
/**
* @var float 噪波大小,单位跟随系统,(取值:大于0的小数)
*/
public $noisesize = 0.25;
/**
* @var float 湍流,(取值:大于0的小数)
*/
public $turbulence = 5;
/**
* @var float 亮度,(取值:大于等于0的小数)
*/
public $bright = 1;
/**
* @var float 对比度,(取值:大于等于0的小数)
*/
public $contrast = 1;
/**
* @var object 铺贴参数,一个Mapping类对象
*/
public $mapping;
/**
* @param array $config 接收一个数组,可以初始化当前实例化对象的各种属性
* @param object $mapping 如需自定义铺贴参数,必须传入一个 Mapping类对象,否则使用一个默认的铺贴参数
*/
public function __construct($config = [],Mapping $mapping = null)
{
if( $mapping != null )$this->mapping = $mapping;
else $this->mapping = new Mapping();
$this->type = self::TYPE_BLENDER_MARBLE;
$this->id = Scene::createID();
Base::__construct($config);
}
}
?>

118
src/scene/texture/procedural/BlenderMusgrave.php

@ -0,0 +1,118 @@
<?php
namespace Blobt\Luxcore\scene\texture\procedural;
use Blobt\Luxcore\scene\texture\TextureBase;
use Blobt\Luxcore\scene\Scene;
use Blobt\Luxcore\core\Base;
use Blobt\Luxcore\scene\texture\mapping\Mapping;
class BlenderMusgrave extends TextureBase
{
/**
* Blender原生的马氏分形的程序纹理
*/
const TYPE_BLENDER_MUSGRAVE = 'blender_musgrave';
/**
* 噪波效果 原型
*/
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';
/**
* 分形效果 原型
*/
const TYPE_MULTIFRACTAL = 0; //多重分形
const TYPE_RIDGE_MULTIFRACTAL = 1; //脊状多重分形
const TYPE_BLEND_MULTIFRACTAL = 2; //混合式多重分形
const TYPE_BLEND_TERRAIN = 4; //地形
/**
* @var string 分形效果 原型,取值是一个属于 分形效果原型 的字符串常量
*/
public $musgravetype = self::TYPE_MULTIFRACTAL;
/**
* @var string 噪波效果 原型,取值是一个属于 噪波效果原型 的字符串常量
*/
public $noisebasis = self::TYPE_BLENDER_ORIGINAL;
/**
* @var float 噪波大小,单位跟随系统,(取值:大于0的小数)
*/
public $noisesize = 0.25;
/**
* @var float 规格尺寸,(取值:大于0的小数)
*/
public $dimension = 1;
/**
* @var float 间隙度,(取值:任意自然数)
*/
public $lacunarity = 2;
/**
* @var float 倍频,(取值:大于等于0的小数)
*/
public $octaves = 2;
/**
* @var float 亮度,(取值:大于等于0的小数)
*/
public $bright = 1;
/**
* @var float 对比度,(取值:大于等于0的小数)
*/
public $contrast = 1;
/**
* @var float 强度,(取值:任意自然数)
*/
public $intensity = 1;
/**
* @var float 增益,(取值:大于等于0的小数),分形类形是 脊状多重分形、混合式多重分形之一时,可以设置此参数,否则为 多重分形、异向地形 之一时只能取固定值 1
*/
public $gain = 1;
/**
* @var float 偏移,(取值:任意自然数),分形类形是 脊状多重分形、混合式多重分形、异向地形之一时,可以设置此参数,否则为 多重分形 时只能取固定值 1
*/
public $offset = 1;
/**
* @var object 铺贴参数,一个Mapping类对象
*/
public $mapping;
/**
* @param array $config 接收一个数组,可以初始化当前实例化对象的各种属性
* @param object $mapping 如需自定义铺贴参数,必须传入一个 Mapping类对象,否则使用一个默认的铺贴参数
*/
public function __construct($config = [],Mapping $mapping = null)
{
if( $mapping != null )$this->mapping = $mapping;
else $this->mapping = new Mapping();
$this->type = self::TYPE_BLENDER_MUSGRAVE;
$this->id = Scene::createID();
Base::__construct($config);
}
}
?>

5
src/scene/texture/procedural/Fbm.php

@ -25,6 +25,11 @@ class Fbm extends TextureBase
*/
public $roughness = 0.5;
/**
* @var object 铺贴参数,一个Mapping类对象
*/
public $mapping;
/**
* @param array $config 接收一个数组,可以初始化当前实例化对象的各种属性
* @param object $mapping 如需自定义铺贴参数,必须传入一个 Mapping类对象,否则使用一个默认的铺贴参数

5
src/scene/texture/procedural/Marble.php

@ -35,6 +35,11 @@ class Marble extends TextureBase
*/
public $variation = 0.2;
/**
* @var object 铺贴参数,一个Mapping类对象
*/
public $mapping;
/**
* @param array $config 接收一个数组,可以初始化当前实例化对象的各种属性
* @param object $mapping 如需自定义铺贴参数,必须传入一个 Mapping类对象,否则使用一个默认的铺贴参数

5
src/scene/texture/procedural/Wrinkled.php

@ -25,6 +25,11 @@ class Wrinkled extends TextureBase
*/
public $roughness = 0.5;
/**
* @var object 铺贴参数,一个Mapping类对象
*/
public $mapping;
/**
* @param array $config 接收一个数组,可以初始化当前实例化对象的各种属性
* @param object $mapping 如需自定义铺贴参数,必须传入一个 Mapping类对象,否则使用一个默认的铺贴参数

Loading…
Cancel
Save