Skip to content

Instantly share code, notes, and snippets.

@wrightwriter
Last active January 11, 2022 15:54
Show Gist options
  • Save wrightwriter/1a056e63d91febda24125d82a36eb1e0 to your computer and use it in GitHub Desktop.
Save wrightwriter/1a056e63d91febda24125d82a36eb1e0 to your computer and use it in GitHub Desktop.
houdini halp
// -------------- VEX --------------
chramp()
f@Frame f@Time
i@name = value
i[]@name = array()
v@P v@Cd i@ptnum i@vtxnum i@primnum
i@numpt i@numvtx i@numprim i@numelem
@N @scale
// volume
v@P f@density v@center v@dPdx, v@dPdy, v@dPdz i@ix, i@iy, i@iz i@resx, i@resy, i@resz
volumeindex(int nodeInput, int primnum, vector voxel)
volumegradient(int nodeInput, string volumename, vector pos)
volume[,cubic]sample(int nodeInput, string volumename, vector pos)
volumeres()
// inputs
point('opinput:0', 'P', i@ptnum)
// references attribs
point('op:/obj/geo1/OUT', 'P', i@ptnum)
point('op:../../OUT', 'P', i@ptnum)
https://mrkunz.com/blog/08_22_2018_VEX_Wrangle_Cheat_Sheet.html
// --------------
// https://www.sidefx.com/docs/houdini/vex/functions/index.html
// general
array().append().len().removevalue().resize(), find()
clamp(), lerp(), nrandom(from,to), rand(seed), concat()
distance()
anoise(), curlnoise(), flownoise(), noise(), noised()
// attribs
add[,point,prim,vertex]attrib()
attrib()
getattrib()
findattribval()
// prims
prim = addprim(0, ["polyline", "poly"]); setprimgroup(0,"trails", prim, 1, "set");
pt = addpoint(0, @ptnum)
[add,remove]vertex(0,prim,pt) // remove
setpointattrib(0,"P",pt,position)
setpointgroup(0, "trails", pt, [0,1], "set");
// intersect
intersect[,_all]()
surfacedist()/xyzdist()
nearpoint[,s]()
npoints()
// --------------
detail("../scatter", "P")
uvsample(0,"P","uv",uv)
// -------------- NODES --------------
// General
> Scatter, Copy To Points, Spray Paint
> Blast
// Geom
> PolyReduce, PolyExtrude, ConnectAdjacentPoints, FindShortestPath
> Smooth, Point Relax, Point Split/Fuse
> Remesh, Triangulate, Fracture, Divide(dual), Facet(Merge by D), ShrinkWrap
> Measure,
// Path
> PolyWire/Sweep, Resample, PolyPath(polytopath),
// VDB
> VDBToSpheres
// Tex
> AttribFromMap(Image/UV)
// Bruh
? Bend, Point Jitter, Ray
? Winding Number
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment