ReferenceMaterial nodesUtility
Rotate About Axis
How far v moves when it's turned about an axis through the pivot: add it to v for the turned point.
ƒRotate About Axis
Position100
Axis001
Rotation (Turns)0.25
Pivot000
Inputs
| Pin | Type | Starts at | Notes |
|---|---|---|---|
Positionv | vec3 | (1, 0, 0) | – |
Axisaxis | vec3 | (0, 0, 1) | – |
Rotation (Turns)turns | float | 0.25 | – |
Pivotpivot | vec3 | (0, 0, 0) | – |
Outputs
| Pin | Type |
|---|---|
out | vec3 |
The code it becomes
What Studio writes for the graph below: a few lines of the material's shader, worked out for every pixel.
void mainImage(out vec4 fragColor, in vec2 fragCoord){ vec3 n2_out = ((vec3(0.0, 0.0, 0.0) + vec3(0.0, 0.0, 1.0) * dot(vec3(0.0, 0.0, 1.0), vec3(1.0, 0.0, 0.0) - vec3(0.0, 0.0, 0.0))) + (vec3(1.0, 0.0, 0.0) - (vec3(0.0, 0.0, 0.0) + vec3(0.0, 0.0, 1.0) * dot(vec3(0.0, 0.0, 1.0), vec3(1.0, 0.0, 0.0) - vec3(0.0, 0.0, 0.0)))) * cos((0.25 * 6.28318531)) + cross(vec3(0.0, 0.0, 1.0), (vec3(1.0, 0.0, 0.0) - (vec3(0.0, 0.0, 0.0) + vec3(0.0, 0.0, 1.0) * dot(vec3(0.0, 0.0, 1.0), vec3(1.0, 0.0, 0.0) - vec3(0.0, 0.0, 0.0))))) * sin((0.25 * 6.28318531)) - vec3(1.0, 0.0, 0.0)); fragColor = vec4(n2_out, 1.0);}In a graph
ƒRotate About Axis
Position100
Axis001
Rotation (Turns)0.25
Pivot000
◎Material OutputEnds here
Colour
Alpha1
Texture coordinates into the node, and the node into the material, as Studio draws them.
Related
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.