Hello everyone,
I've got a little problem that I'm hoping some of you will be able to help me with. I'm trying to set up a trail of dominoes that will align itself to whatever curve I draw initially. The curve is laid out so that a resample controls the spacing of the points as well as the total number. Normals were then added to the points so that the dominoes could have a direction to face in.
The dominoes consist of 4 sops…
grid_dom_# - simply builds the domino
xform_Y_dom_# - controls domino Y position
xform_pos_dom_# - aligns the domino to the respective point and normal
xform_rot_dom_# - rotates the domino around the point with a clamp function that is controled by a hidden circle that moves linearly
One thing I think I should dive deeper into is the fuction that aligns the dominoes on the normals.
in the Rotate Y channel of the xform_pos_dom_0 sop:
acos(dot(normalize(vector3(point(“../point_showme”, opdigits(“.”), “N”, 0), point(“../point_showme”, opdigits(“.”), “N”, 1), point(“../point_showme”, opdigits(“.”), “N”, 2))), (vector3(0,0,1))))
(and no I didn't write that myself all of that credit goes to a fellow student)
point_showme is just the final sop of the curve that displays the points and normals.
The problem I'm having, is that when I play the animation, the dominoes only rotate about the x-axis, which makes sense, because that's the channel I have the clamp function in on the xform_rot_dom_# sop. And that's great, as long as I'm doing a straight line out the z-axis
but, I'd like to set this up so that it will look pretty on any curve.
Here's the clamp rotation function in case it would help:
clamp(chf(“../crot/ty”, $F - opdigits(“.”) * (“../resample1/length”) * 30)), 0, 80)
crot is the circle sop that controls the domino movement.
So, any thoughts on how I could set the dominoes to rotate perpendicular to their normals would be greatly appreciated.
Thank you in advance,
Jared Hromika