Skip to content

Instantly share code, notes, and snippets.

View Orientation Quaternion along curve
//create variables
vector tangentv = v@tangentv;
vector tangentu = v@tangentu;
tangentv = cross(tangentu, @N);
float seed = ch('seed') + @primseed;
@up = tangentu;
View Pscale along curve
//define scales
float seed = ch('seed') + @primseed;
@Rand_Pscale = fit01(rand(i@ptnum+seed+225), -ch('Rand_Scale'), ch('Rand_Scale')) * chramp("Ramp_Scale", @curveu);
@Uniform_Pscale = chf('Scale') * chramp('Ramp_Scale', @curveu);
//apply pscale
View MinPos
@P = minpos (1, @P);
@joshuazt
joshuazt / Attribute Driven Blendshape
Last active Feb 19, 2021
Attribute Driven Blendshape
View Attribute Driven Blendshape
v@P=lerp(v@P, point(1,'P',@ptnum), f@mask*ch('blend'));
View Pscale on Mesh
//define scales
float seed = ch('seed') + @primseed;
@Rand_Pscale = fit01(rand(i@ptnum+seed+225), -ch('Rand_Scale'), ch('Rand_Scale'));
@Uniform_Pscale = chf('Scale');
//apply pscale
View pointveltovolume
int pt = nearpoint(1,@P);
v@vel = point(1,'v',pt);