3DCG学习博

我要写关于Blender,Zbrush,Houdini的情报从日本和美国。我不是中国人因此我用汉语的很笨拙。不过我加油学习汉语。

Houdini 常常用Expression函数

函数 说明
ch(parameter path) 得到现在的参数的数值
chf(parameter path, frame) 在现在Frame,得到参数的数值
stamp(Copy SOP path, stamp variable, default value) 得到现在的Stamp变数
point(SOP path, point number, attribute name, index) 得到Point Attribute
prim(SOP path, point number, attribute name, index) 得到Primitive Attribute
clamp(value, min, max) 保持min和max间数值
fit(value, min, max, new min, new max) 旧数值范围改新范围
fit01(value, new min, new max) 大概同fit函数
smooth(value, min, max) 最小值和最大值的输出0和1
noise(x, y, z) 得到noise数值
rand(seed) 得到随机数值
length(x, y, z) 得到向量的长度
distance(x1, y1, z1, x2, y2, z2) 得到两点间的长度
if(expr, value if true, value if else) 判断真假,得到那个结果数值
opinputpath(operator path, input index) 得到输入指数的输入量
bbox(SOP path, dimension type) 得到bounding box的大小。可以输入dimension type里D_XMIN, D_YMIN, D_ZMIN, D_XMAX, D_YMAX, D_ZMAX, D_XSIZE, D_YSIZE, D_ZSIZE
centroid(SOP path, dimension type) 得到物体的中心。可以输入dimension type里D_X, D_Y, D_Z
变数 说明
$PT 点的数
$PR Primitive的数
$CY Used by the Copy SOP to identify the current copy being made. Unless the second Copy input is being used, in which case $PT will be used instead.
$TX, $TY, $TZ Position of a point
$NX, $NY, $NZ Normal of a point/primitive
$CR, $CG, $CB, $CA Color of a point/primitive
$VX, $VY, $VZ Velocity of a point
$BBX, $BBY, $BBZ The normalised (0 to 1) position of the point in the bounding box
$CEX, $CEY, $CEZ Centroid of the geometry
$AGE Number of seconds a particle has been alive
$LIFE Normalised age (0 to 1) of a particle
$XMIN, $XMAX, etc. Extents of the bounding box
$SIZEX, $SIZEY, $SIZEZ Size of the bounding box
$TX2, $TY2, $TZ2 Used to identify the position of a point coming from the second input of a Point SOP. Similarly for other attributes, e.g. Normals, $NX2, etc.