S:/PROJECTS/BLABLABLA13893/3D/Plates/D001_C006_20201113_R1/D001_C006_20201113_R1.`clamp($F,1001,1325)`.jpg
`clamp($F,1001,1325)`
that's the important bit. the ` ` makes houdini evaluate
S:/PROJECTS/BLABLABLA13893/3D/Plates/D001_C006_20201113_R1/D001_C006_20201113_R1.`clamp($F,1001,1325)`.jpg
`clamp($F,1001,1325)`
that's the important bit. the ` ` makes houdini evaluate
V=chinput(0,C, I+chinput(1,C,I));"V" stands for value.
// create an axis and an up vector.
// The axis will represent the Z direction of the final matrix
vector axis = chv("axis");
vector up = chv("up");
// normalise these two vectors
axis = normalize(axis);
up = normalize(up);
// build a vector for each axis, then build a matrix out of it.
// I may be normalizing a bit much here, but it cant hurt.
vector zaxis = axis;
vector xaxis = normalize(cross(up, axis));
vector yaxis = normalize(cross(axis, xaxis));
matrix3 default = set(xaxis, yaxis, zaxis);
// create the orient quaternion as a point attribute
p@orient = quaternion(default);
vector axis = normalize(chv("rotate_axis"));Be sure to press the create slider/input button!
float angle = radians(chf("rotate_angle"));
// create the matrix representing the rotation, and rotate the points
matrix3 m = ident();
rotate(m, angle, axis);
@P *= m;
vector rotate_point = chv("rotate_point"); //this is the origin of the rotation
vector axis = normalize(chv("rotate_axis")); //the axis
float angle = radians(chf("rotate_angle")); //the angle of rotation...
// move the points before the rotation
@P -= rotate_point;
// build the matrix that does the rotation and apply it to the points
matrix3 m = ident();
rotate(m, angle, axis);
@P *= m;
// move the points back to their original position
@P += rotate_point;