View last point on curves
This file contains 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
if (vertexprimindex(0, @vtxnum) == primvertexcount(0, @primnum) - 1) i@group_root = 1; | |
if (vertexprimindex(0, @vtxnum) < 1) i@group_root = 1; |
View mirror chramp
This file contains 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
// Get mirrored value from @curveu | |
float u = (abs(@curveu * - 2 + 1) * -1 + 1) / 2; | |
// Feed that value in a ramp that defines half of the resulting curve | |
f@pscale = chramp("point_scale", u); |
View scale packed prim
This file contains 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
float scale = chf('scale'); | |
matrix3 trn = primintrinsic(0, "transform", @primnum); | |
matrix scalem = maketransform(0, 0, {0,0,0}, {0,0,0}, scale, @P); | |
trn *= matrix3(scalem); | |
setprimintrinsic(0, "transform", @primnum, trn); |
View aim normals along surface in a direction
This file contains 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
vector dir = chv('dir'); | |
float angle = dot(@N, dir); | |
float fitangle = fit(angle, -1, 1, 0, 1); | |
float blend = chramp('blend', fitangle); | |
@Cd = blend; | |
vector tmp = cross(@N, dir); | |
vector cross = cross(@N, tmp); | |
View geo to uv space
This file contains 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
@rest = v@P; | |
int vtx = pointvertex(0, @ptnum); | |
vector uv = vertex(0, 'uv', vtx); | |
v@P = lerp(@P, uv, chf('blend')); |
View geo displacement by map
This file contains 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
vector cd = point(1, 'Cd', @ptnum); | |
v@P += normalize(v@N) * fit01(cd.r, -0.5, 0.5) * chf('scale'); |
View Hscript Details import
This file contains 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
detail(0,"rotx",1) |
View pointveltovolume
This file contains 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
int pt = nearpoint(1,@P); | |
v@vel = point(1,'v',pt); |
View get attribute from second input
This file contains 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
@Cd = v@opinput1_Cd; |
View pushalongvector
This file contains 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
v@P += chf('scale') * v@N; |
NewerOlder