Skip to content

Instantly share code, notes, and snippets.

@lcrs
Last active September 13, 2019 07:57
Show Gist options
  • Save lcrs/7100e46f7385b10ab790ef18dbcbee99 to your computer and use it in GitHub Desktop.
Save lcrs/7100e46f7385b10ab790ef18dbcbee99 to your computer and use it in GitHub Desktop.
point-based vector displacement with UV offset
uv on points, massive smooth of P with attribblur, normal, polyframe
then into this with the original on second input:
v@diff.x = dot(@opinput1_P - @P, v@N);
v@diff.y = dot(@opinput1_P - @P, v@tangentu);
v@diff.z = dot(@opinput1_P - @P, v@tangentv);
remesh the smoothed one then output of above into second input of:
vector ouv = @uv;
matrix3 m = ident();
rotate(m, chf('uvrot'), {0,0,1});
ouv -= 0.5;
ouv *= m;
ouv += 0.5;
ouv += set(chf('uvox'), chf('uvoy'), 0.0);
ouv = ouv % 1.0;
vector diff = uvsample(1, 'diff', 'uv', ouv);
@P += diff.x * v@N;
@P += diff.y * v@tangentu;
@P += diff.z * v@tangentv;
o and redshift render view LUTs https://we.tl/t-gNrEIMqPgy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment