|
@ -7,6 +7,94 @@ use Blobt\Luxcore\scene\BaseCfg; |
|
|
class TextureBase extends BaseCfg |
|
|
class TextureBase extends BaseCfg |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 程序纹理类型 |
|
|
|
|
|
*/ |
|
|
|
|
|
const TYPE_IMAGEMAP = 'imagemap'; //应用外部图像文件的程序纹里
|
|
|
|
|
|
const TYPE_BRICK = 'brick'; //瓷砖的程序纹理
|
|
|
|
|
|
const TYPE_FBM = 'fbm'; //分数布朗运动的程序纹理,可以生成类似白色云团、及类似白色云团纹理的大理石纹效果
|
|
|
|
|
|
const TYPE_CHECKERBOARD2D = 'checkerboard2d'; //2D棋盘格的程序纹理
|
|
|
|
|
|
const TYPE_CHECKERBOARD3D = 'checkerboard3d'; //3D棋盘格的程序纹理
|
|
|
|
|
|
const TYPE_MARBLE = 'marble'; //大理石模拟的程序纹理,以分数布朗运动生成类似大理石条形纹理
|
|
|
|
|
|
const TYPE_WRINKLED = 'wrinkled'; //分数布朗运动的程序纹理,可以生成类似烟雾、及类似石材纹理效果
|
|
|
|
|
|
const TYPE_FRESNELCOLOR = 'fresnelcolor'; //金属材质的菲列尔反射参数,只适合金属度流程的金属材质
|
|
|
|
|
|
const TYPE_FRESNELCONST = 'fresnelconst'; //金属材质的菲列尔反射参数,只适合金属度流程的金属材质
|
|
|
|
|
|
const TYPE_OBJECTID = 'objectid'; //按模型不同ID随机以Raw着色的程序纹理
|
|
|
|
|
|
const TYPE_OBJECTIDCOLOR = 'objectidcolor'; //按模型不同ID随机以色值着色的程序纹理
|
|
|
|
|
|
const TYPE_OBJECTIDNORMALIZED = 'objectidnormalized'; //按模型不同ID随机规格化着色的程序纹理
|
|
|
|
|
|
const TYPE_POSITION = 'position'; //位置着色的程序纹理
|
|
|
|
|
|
const TYPE_RANDOM = 'random'; //随机明度的程序纹理
|
|
|
|
|
|
const TYPE_SHADINGNORMAL = 'shadingnormal'; //法线着色的程序纹理
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Blender原生程序纹理类型 |
|
|
|
|
|
*/ |
|
|
|
|
|
const TYPE_BLENDER_BLEND = 'blender_blend'; //搅拌
|
|
|
|
|
|
const TYPE_BLENDER_CLOUDS = 'blender_clouds'; //云絮
|
|
|
|
|
|
const TYPE_BLENDER_DISTORTEDNOISE = 'blender_distortednoise'; //畸变劋波
|
|
|
|
|
|
const TYPE_MAGIC = 'magic'; //幻彩效果
|
|
|
|
|
|
const TYPE_BLENDER_MUSGRAVE = 'blender_musgrave'; //马氏分形
|
|
|
|
|
|
const TYPE_BLENDER_NOISE = 'blender_noise'; //澡波
|
|
|
|
|
|
const TYPE_BLENDER_STUCCI = 'blender_stucci'; //斯氏分形
|
|
|
|
|
|
const TYPE_BLENDER_WOOD = 'blender_wood'; //木纹
|
|
|
|
|
|
const TYPE_BLENDER_MARBLE = 'blender_marble'; //大理石
|
|
|
|
|
|
const TYPE_BLENDER_VORONOI = 'blender_voronoi'; //沃罗诺伊图
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 合成类型 |
|
|
|
|
|
*/ |
|
|
|
|
|
const TYPE_ABSOLUTE = 'absolute'; //绝对值
|
|
|
|
|
|
const TYPE_ADD = 'add'; //相加
|
|
|
|
|
|
const TYPE_CLAMP = 'clamp'; //嵌制
|
|
|
|
|
|
const TYPE_DIVIDE = 'divide'; //相除
|
|
|
|
|
|
const TYPE_DOTPRODUCT = 'dotproduct'; //累积
|
|
|
|
|
|
const TYPE_GREATERTHAN = 'greaterthan'; //大于
|
|
|
|
|
|
const TYPE_LESSTHAN = 'lessthan'; //小于
|
|
|
|
|
|
const TYPE_MAKEFLOAT3 = 'makefloat3'; //通道合并(三个输入颜色别分抽出一个通道,然后合并)
|
|
|
|
|
|
const TYPE_MIX = 'mix'; //混合
|
|
|
|
|
|
const TYPE_MODULO = 'modulo'; //取模
|
|
|
|
|
|
const TYPE_POWER = 'power'; //能量乘方
|
|
|
|
|
|
const TYPE_REMAP = 'remap'; //重映射(将一张输入的纹理重新映射)
|
|
|
|
|
|
const TYPE_ROUNDING = 'rounding'; //四舍五入
|
|
|
|
|
|
const TYPE_SCALE = 'scale'; //正片叠底
|
|
|
|
|
|
const TYPE_SPLITFLOAT3 = 'splitfloat3'; //通道分离(单通道输出)
|
|
|
|
|
|
const TYPE_SUBTRACT = 'subtract'; //相减,反转
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 发光纹理类型 |
|
|
|
|
|
*/ |
|
|
|
|
|
const TYPE_BLACKBODY = 'blackbody'; //灯泡
|
|
|
|
|
|
const TYPE_IRREGULARDATA = 'irregulardata'; //预设自然的灯泡型谱
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 贴图调色类型 |
|
|
|
|
|
*/ |
|
|
|
|
|
const TYPE_BRIGHTCONTRAST = 'brightcontrast'; //亮度、对比度
|
|
|
|
|
|
const TYPE_HSV = 'hsv'; //色相、饱各度、亮度
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 贴图变形(偏移、扭曲) |
|
|
|
|
|
*/ |
|
|
|
|
|
const TYPE_DISTORT = 'distort'; //贴图变形(偏移、扭曲)
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 凹凸类型 |
|
|
|
|
|
*/ |
|
|
|
|
|
const TYPE_NORMALMAP = 'normalmap'; //法线法线纹理,可将一个输入的纹理转化成法线纹理
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 值 |
|
|
|
|
|
*/ |
|
|
|
|
|
const TYPE_CONSTFLOAT1 = 'constfloat1'; //将一个浮点型数值作为纹理输出
|
|
|
|
|
|
const TYPE_CONSTFLOAT3 = 'constfloat3'; //将一个浮点型的RGB色值作为纹理输出
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 三面(三轴向)纹理映射 |
|
|
|
|
|
*/ |
|
|
|
|
|
const TYPE_TRIPLANAR = 'triplanar'; //三面(三轴向)纹理映射
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @var string 贴图类型 |
|
|
* @var string 贴图类型 |
|
|
*/ |
|
|
*/ |
|
@ -22,6 +110,8 @@ class TextureBase extends BaseCfg |
|
|
*/ |
|
|
*/ |
|
|
public $registerId; |
|
|
public $registerId; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @param object $value 接收的是一个 由自身set函数 所接收到的值,本函数可以被这些类set函数调用, |
|
|
* @param object $value 接收的是一个 由自身set函数 所接收到的值,本函数可以被这些类set函数调用, |
|
|
* 并判断set函数接收到值是否合法,合法则返回$value,否则抛出一个异常 |
|
|
* 并判断set函数接收到值是否合法,合法则返回$value,否则抛出一个异常 |
|
|