Skip to content

Instantly share code, notes, and snippets.

@greenvfx
Created April 30, 2018 08:20
Show Gist options
  • Save greenvfx/4bfdf122cbdb27a6b86f30d70d2e00f7 to your computer and use it in GitHub Desktop.
Save greenvfx/4bfdf122cbdb27a6b86f30d70d2e00f7 to your computer and use it in GitHub Desktop.
rotation in expression
set cut_paste_input [stack 0]
version 10.0 v5
BackdropNode {
inputs 0
name BackdropNode10
tile_color 0xff00ff
label "correct math"
note_font_size 42
selected true
xpos -40
ypos -86
bdwidth 373
bdheight 151
}
push $cut_paste_input
Transform {
translate {1005 436}
rotate 90
name Transform11
selected true
xpos -347
ypos -10
}
Transform {
inputs 0
rotate 70
center {1024 401.5}
name Transform12
selected true
xpos 463
ypos -178
}
Expression {
inputs 0
temp_name0 aspect
temp_expr0 width/height
expr0 x/height
expr1 y/height
name Expression3
selected true
xpos 180
ypos -226
}
Grade {
add {{-parent.Transform11.translate.x/format.w} {-parent.Transform11.translate.y/format.h} 0 0}
black_clamp false
name Grade_uv_centerReset1
selected true
xpos 180
ypos -120
}
ColorMatrix {
matrix {
{{cos(radians(Transform12.rotate))} {-sin(radians(Transform12.rotate))} {curve}}
{{sin(radians(Transform12.rotate))} {cos(radians(Transform12.rotate))} {curve}}
{{curve} {curve} {1}}
}
name ColorMatrix2
selected true
xpos 180
ypos -10
}
Grade {
add {{-parent.Transform11.translate.x/format.w} {-parent.Transform11.translate.y/format.h} 0 0}
reverse true
black_clamp false
name Grade_uv_centerReset_invert1
selected true
xpos 180
ypos 110
}
Noise {
inputs 0
center {1024 436}
name Noise1
selected true
xpos 287
ypos 207
}
set N60ec5800 [stack 0]
STMap {
inputs 2
uv rgb
name STMap2
selected true
xpos 180
ypos 248
}
Reformat {
inputs 0
format "2048 2048 0 0 2048 2048 1 square_2K"
name Reformat1
selected true
xpos 10
ypos -280
}
Expression {
temp_name0 aspect
temp_expr0 width/height
expr0 x/width
expr1 y/height
name Expression1
selected true
xpos 10
ypos -202
}
Grade {
add {{-parent.Transform11.translate.x/format.w} {-parent.Transform11.translate.y/format.h} 0 0}
black_clamp false
name Grade_uv_centerReset
selected true
xpos 10
ypos -130
}
Expression {
temp_name0 rad
temp_expr0 radians(Transform12.rotate)
expr0 r*cos(rad)-g*sin(rad)
expr1 g*cos(rad)+r*sin(rad)
channel2 {-rgba.red -rgba.green -rgba.blue}
name Expression2
label rotation
selected true
xpos 10
ypos -16
}
Grade {
add {{-parent.Transform11.translate.x/format.w} {-parent.Transform11.translate.y/format.h} 0 0}
reverse true
black_clamp false
name Grade_uv_centerReset_invert
selected true
xpos 10
ypos 99
}
push $N60ec5800
STMap {
inputs 2
uv rgb
name STMap1
selected true
xpos 10
ypos 248
}
Viewer {
inputs 2
frame_range 1-100
input_number 1
name Viewer1
selected true
xpos 10
ypos 286
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment