From a2cc269165433f34635ac6a5652a0bd9a88f87e8 Mon Sep 17 00:00:00 2001 From: yuanjiajia <1139393632@qq.com> Date: Mon, 14 Mar 2022 15:14:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=9B=9B=E4=B8=AABlender=E5=8E=9F?= =?UTF-8?q?=E7=94=9F=E7=9A=84=E7=A8=8B=E5=BA=8F=E7=BA=B9=E7=90=86=E7=B1=BB?= =?UTF-8?q?=E6=96=87=E4=BB=B6=EF=BC=8CClouds=E3=80=81Blend=E7=B1=BB?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=88=86=E5=88=AB=E6=9B=B4=E5=90=8D=E4=B8=BA?= =?UTF-8?q?BlenderClouds=E3=80=81BlenderBlend=E7=B1=BB=E6=96=87=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E5=85=B6=E4=BB=96=E6=9C=89=E9=83=A8=E5=88=86=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E7=BA=B9=E7=90=86=E7=B1=BB=E6=96=87=E4=BB=B6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=BA=86=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{Blend.php => BlenderBlend.php} | 10 +- .../{Clouds.php => BlenderClouds.php} | 8 +- .../procedural/BlenderDistortedNoise.php | 80 ++++++++++++ src/scene/texture/procedural/BlenderMagic.php | 57 +++++++++ .../texture/procedural/BlenderMarble.php | 99 +++++++++++++++ .../texture/procedural/BlenderMusgrave.php | 118 ++++++++++++++++++ src/scene/texture/procedural/Fbm.php | 7 +- src/scene/texture/procedural/Marble.php | 5 + src/scene/texture/procedural/Wrinkled.php | 5 + 9 files changed, 379 insertions(+), 10 deletions(-) rename src/scene/texture/procedural/{Blend.php => BlenderBlend.php} (87%) rename src/scene/texture/procedural/{Clouds.php => BlenderClouds.php} (91%) create mode 100644 src/scene/texture/procedural/BlenderDistortedNoise.php create mode 100644 src/scene/texture/procedural/BlenderMagic.php create mode 100644 src/scene/texture/procedural/BlenderMarble.php create mode 100644 src/scene/texture/procedural/BlenderMusgrave.php diff --git a/src/scene/texture/procedural/Blend.php b/src/scene/texture/procedural/BlenderBlend.php similarity index 87% rename from src/scene/texture/procedural/Blend.php rename to src/scene/texture/procedural/BlenderBlend.php index fcbffba..6442b65 100644 --- a/src/scene/texture/procedural/Blend.php +++ b/src/scene/texture/procedural/BlenderBlend.php @@ -6,22 +6,22 @@ use Blobt\Luxcore\scene\Scene; use Blobt\Luxcore\core\Base; use Blobt\Luxcore\scene\texture\mapping\Mapping; -class Blend extends TextureBase +class BlenderBlend extends TextureBase { /** - * 混合的程序纹理 + * Blender原生的混合的程序纹理 */ const TYPE_BLENDER_BLEND = 'blender_blend'; /** - * 噪波的 柔和 与 锐利 类型 + * 渐变方向 */ const TYPE_HORIZONTAL = 'horizontal'; const TYPE_VERTICAL = 'vertical'; /** - * 噪波 基本效果 类型 + * 渐变效果 原型 */ const TYPE_LINEAR = 'linear'; const TYPE_QUADRATIC = 'quadratic'; @@ -37,7 +37,7 @@ class Blend extends TextureBase public $direction = self::TYPE_HORIZONTAL; /** - * @var string 渐变 基本效果 类型,取值是一个属于 基本效果 的字符串常量 + * @var string 渐变效果 原型,取值是一个属于 基本效果 的字符串常量 */ public $progressiontype = self::TYPE_LINEAR; diff --git a/src/scene/texture/procedural/Clouds.php b/src/scene/texture/procedural/BlenderClouds.php similarity index 91% rename from src/scene/texture/procedural/Clouds.php rename to src/scene/texture/procedural/BlenderClouds.php index 39f338a..207ae49 100644 --- a/src/scene/texture/procedural/Clouds.php +++ b/src/scene/texture/procedural/BlenderClouds.php @@ -6,11 +6,11 @@ use Blobt\Luxcore\scene\Scene; use Blobt\Luxcore\core\Base; use Blobt\Luxcore\scene\texture\mapping\Mapping; -class Clouds extends TextureBase +class BlenderClouds extends TextureBase { /** - * 云絮的程序纹理 + * Blender原生的云絮的程序纹理 */ const TYPE_BLENDER_CLOUDS = 'blender_clouds'; @@ -21,7 +21,7 @@ class Clouds extends TextureBase const TYPE_HARD_NOISE = 'hard_noise'; /** - * 噪波 基本效果 类型 + * 噪波效果 原型 */ const TYPE_BLENDER_ORIGINAL = 'blender_original'; const TYPE_ORIGINAL_PERLIN = 'original_perlin'; @@ -39,7 +39,7 @@ class Clouds extends TextureBase public $noisetype = self::TYPE_SOFT_NOISE; /** - * @var string 噪波 基本效果 类型,取值是一个属于 基本效果 的字符串常量 + * @var string 噪波效果 原型,取值是一个属于 噪波效果原型 的字符串常量 */ public $noisebasis = self::TYPE_BLENDER_ORIGINAL; diff --git a/src/scene/texture/procedural/BlenderDistortedNoise.php b/src/scene/texture/procedural/BlenderDistortedNoise.php new file mode 100644 index 0000000..429fa8c --- /dev/null +++ b/src/scene/texture/procedural/BlenderDistortedNoise.php @@ -0,0 +1,80 @@ +mapping = $mapping; + else $this->mapping = new Mapping(); + $this->type = self::TYPE_BLENDER_DISTORTEDNOISE; + $this->id = Scene::createID(); + Base::__construct($config); + } + +} + +?> diff --git a/src/scene/texture/procedural/BlenderMagic.php b/src/scene/texture/procedural/BlenderMagic.php new file mode 100644 index 0000000..0e69626 --- /dev/null +++ b/src/scene/texture/procedural/BlenderMagic.php @@ -0,0 +1,57 @@ +mapping = $mapping; + else $this->mapping = new Mapping(); + $this->type = self::TYPE_MAGIC; + $this->id = Scene::createID(); + Base::__construct($config); + } + +} + +?> diff --git a/src/scene/texture/procedural/BlenderMarble.php b/src/scene/texture/procedural/BlenderMarble.php new file mode 100644 index 0000000..9e1a076 --- /dev/null +++ b/src/scene/texture/procedural/BlenderMarble.php @@ -0,0 +1,99 @@ +mapping = $mapping; + else $this->mapping = new Mapping(); + $this->type = self::TYPE_BLENDER_MARBLE; + $this->id = Scene::createID(); + Base::__construct($config); + } + +} + +?> diff --git a/src/scene/texture/procedural/BlenderMusgrave.php b/src/scene/texture/procedural/BlenderMusgrave.php new file mode 100644 index 0000000..4507678 --- /dev/null +++ b/src/scene/texture/procedural/BlenderMusgrave.php @@ -0,0 +1,118 @@ +mapping = $mapping; + else $this->mapping = new Mapping(); + $this->type = self::TYPE_BLENDER_MUSGRAVE; + $this->id = Scene::createID(); + Base::__construct($config); + } + +} + +?> diff --git a/src/scene/texture/procedural/Fbm.php b/src/scene/texture/procedural/Fbm.php index 15fe7df..d09fb50 100644 --- a/src/scene/texture/procedural/Fbm.php +++ b/src/scene/texture/procedural/Fbm.php @@ -23,7 +23,12 @@ class Fbm extends TextureBase /** * @var string 粗糙度,控制每个色块边缘向黑色过渡的平滑度,值越小,越平滑,同时 octaves参数对结果的影响力越小,反之亦然,(0-1的小数) */ - public $roughness = 0.5; + public $roughness = 0.5; + + /** + * @var object 铺贴参数,一个Mapping类对象 + */ + public $mapping; /** * @param array $config 接收一个数组,可以初始化当前实例化对象的各种属性 diff --git a/src/scene/texture/procedural/Marble.php b/src/scene/texture/procedural/Marble.php index 25d7d35..3ad936c 100644 --- a/src/scene/texture/procedural/Marble.php +++ b/src/scene/texture/procedural/Marble.php @@ -34,6 +34,11 @@ class Marble extends TextureBase * @var float 扭曲程度,控制花纹块扭曲程度,(0-1的小数) */ public $variation = 0.2; + + /** + * @var object 铺贴参数,一个Mapping类对象 + */ + public $mapping; /** * @param array $config 接收一个数组,可以初始化当前实例化对象的各种属性 diff --git a/src/scene/texture/procedural/Wrinkled.php b/src/scene/texture/procedural/Wrinkled.php index d009c5b..14a96ed 100644 --- a/src/scene/texture/procedural/Wrinkled.php +++ b/src/scene/texture/procedural/Wrinkled.php @@ -24,6 +24,11 @@ class Wrinkled extends TextureBase * @var float 粗糙度,控制每个烟雾团边缘过渡平滑度,值越小,越平滑,同时 octaves参数对结果的影响力越小,反之亦然,(0-1的小数) */ public $roughness = 0.5; + + /** + * @var object 铺贴参数,一个Mapping类对象 + */ + public $mapping; /** * @param array $config 接收一个数组,可以初始化当前实例化对象的各种属性