Last active
October 4, 2019 14:07
-
-
Save kpprt/6998441df374e74436c1b148635af58d to your computer and use it in GitHub Desktop.
Blend between two Axis' in Nuke. Caution: The resulting Axis might be skewed while blending even when the sources are not! If there are time offsets on the input Axis' they need to be filled in manually since they are not taken into account automatically.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set cut_paste_input [stack 0] | |
version 10.5 v1 | |
push $cut_paste_input | |
Group { | |
name CK_AxisBlend1 | |
tile_color 0x9c0000ff | |
addUserKnob {20 CK_AxisBlend} | |
addUserKnob {3 time_offset0 l "time offset 0"} | |
addUserKnob {6 hold0 l hold -STARTLINE} | |
addUserKnob {26 space l "" -STARTLINE T " | "} | |
addUserKnob {3 time_offset1 l "time offset 1" -STARTLINE} | |
addUserKnob {6 hold1 l hold -STARTLINE} | |
addUserKnob {7 blend} | |
} | |
Input { | |
inputs 0 | |
name Input0 | |
xpos 730 | |
ypos 62 | |
} | |
Axis2 { | |
name Axis1 | |
xpos 740 | |
ypos 138 | |
} | |
Input { | |
inputs 0 | |
name Input1 | |
xpos 950 | |
ypos 62 | |
number 1 | |
} | |
Axis2 { | |
name Axis2 | |
xpos 960 | |
ypos 138 | |
} | |
Axis2 { | |
inputs 0 | |
useMatrix true | |
matrix { | |
{{"lerp(Axis1.world_matrix(hold0 ? time_offset0 : t-time_offset0), Axis2.world_matrix(hold1 ? time_offset1 : t-time_offset1), blend)"} {"lerp(Axis1.world_matrix(hold0 ? time_offset0 : t-time_offset0), Axis2.world_matrix(hold1 ? time_offset1 : t-time_offset1), blend)"} {"lerp(Axis1.world_matrix(hold0 ? time_offset0 : t-time_offset0), Axis2.world_matrix(hold1 ? time_offset1 : t-time_offset1), blend)"} {"lerp(Axis1.world_matrix(hold0 ? time_offset0 : t-time_offset0), Axis2.world_matrix(hold1 ? time_offset1 : t-time_offset1), blend)"}} | |
{{"lerp(Axis1.world_matrix(hold0 ? time_offset0 : t-time_offset0), Axis2.world_matrix(hold1 ? time_offset1 : t-time_offset1), blend)"} {"lerp(Axis1.world_matrix(hold0 ? time_offset0 : t-time_offset0), Axis2.world_matrix(hold1 ? time_offset1 : t-time_offset1), blend)"} {"lerp(Axis1.world_matrix(hold0 ? time_offset0 : t-time_offset0), Axis2.world_matrix(hold1 ? time_offset1 : t-time_offset1), blend)"} {"lerp(Axis1.world_matrix(hold0 ? time_offset0 : t-time_offset0), Axis2.world_matrix(hold1 ? time_offset1 : t-time_offset1), blend)"}} | |
{{"lerp(Axis1.world_matrix(hold0 ? time_offset0 : t-time_offset0), Axis2.world_matrix(hold1 ? time_offset1 : t-time_offset1), blend)"} {"lerp(Axis1.world_matrix(hold0 ? time_offset0 : t-time_offset0), Axis2.world_matrix(hold1 ? time_offset1 : t-time_offset1), blend)"} {"lerp(Axis1.world_matrix(hold0 ? time_offset0 : t-time_offset0), Axis2.world_matrix(hold1 ? time_offset1 : t-time_offset1), blend)"} {"lerp(Axis1.world_matrix(hold0 ? time_offset0 : t-time_offset0), Axis2.world_matrix(hold1 ? time_offset1 : t-time_offset1), blend)"}} | |
{{"lerp(Axis1.world_matrix(hold0 ? time_offset0 : t-time_offset0), Axis2.world_matrix(hold1 ? time_offset1 : t-time_offset1), blend)"} {"lerp(Axis1.world_matrix(hold0 ? time_offset0 : t-time_offset0), Axis2.world_matrix(hold1 ? time_offset1 : t-time_offset1), blend)"} {"lerp(Axis1.world_matrix(hold0 ? time_offset0 : t-time_offset0), Axis2.world_matrix(hold1 ? time_offset1 : t-time_offset1), blend)"} {"lerp(Axis1.world_matrix(hold0 ? time_offset0 : t-time_offset0), Axis2.world_matrix(hold1 ? time_offset1 : t-time_offset1), blend)"}} | |
} | |
name Axis3 | |
xpos 850 | |
ypos 138 | |
} | |
Output { | |
name Output | |
xpos 840 | |
ypos 254 | |
} | |
end_group |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment