int Pt_Num; @N = @N; Pt_Num = addpoint(0, @P); setpointattrib(geoself(), "N", Pt_Num, @N, "set"); removeprim(0, @primnum, 1);
CG Cinematography
This awesome book by Chris Brejon is a great resource for Lighting and Cinematography techniques and fundamentals. https://chrisbrejon.com/cg-cinematography/
Python: Split Into Groups
This little script for Houdini is one I’ve had knocking about and thought might be useful to throw out onto t’interweb. Select the node at which you want to split out the groups and it will create a bunch of blasts and OUT nodes to separate out per group. import hou selectedNodes = hou.selectedNodes() for … Read More
Awards: JD.com – “Joy & Heron”
“Joy & Heron” has picked up a few awards in recent weeks. A Gold Ciclope for Long Form Animation A Silver LIA for Production & Post-Production: CGI Animation Golds at The One Show Awards for Online Video, Branded Entertainment, and Animation.
VEX: split string and convert to integer
//Split @anotherAttribute based on ‘_’ string myString[] = split(s@anotherAttribute, “_”); //Use last element as attribute value s@tempString = myString[-1]; //convert string to integer i@myIntegerFromString = atoi(s@tempString);
VEX: Bend Wrangle
Taken from https://tosinakinwoye.com/2017/01/23/houdini-vex-snippets/ //Input is a line //Resample SOP on line for more points //Activate curveu attrib in resample SOP //Remap curveu to shape of bend @curveu=chramp(“ramp”,@curveu); float bamt = chf(“bend_amt”); //bend amount vector benddir = chv(“bend_dir”); //bend direction @P+= benddir * bamt * @curveu;
VEX: Get voxel size into attribute
# put in an attribute wrangle float voxel_size = volumevoxeldiameter(0, 0) / sqrt(3); f@voxsize = voxel_size;
Houdini Python: Find/Replace Parameter Expression
A little script to find/replace strings in selected nodes’, parameter expressions: import hou sel = hou.selectedNodes() dialog = hou.ui.readMultiInput('Find/Replace In Expression', input_labels=['Find: ', 'Replace: ',], buttons=("Find/Replace", "Cancel"), severity=hou.severityType.ImportantMessage, title='Find/Replace', close_choice=1) find = dialog[1][0] replace = dialog[1][1] if dialog[0] == 0: for n in sel: for parms in n.parms(): try: newString = str(parms.eval()).replace(find, replace) parms.set(newString) except: … Read More
Maya: Link Frame
Connect imported vdb sequences to Maya’s frame. Stick this expression in the frame channel ObjName.frame = frame
VEX: SOP Rotation
f@speed = fit01(rand(@ptnum), ch('minSpeed'), ch('maxSpeed')); float angle = (ch('angle')+@ptnum)*@speed; vector axis = sample_direction_uniform(rand(@ptnum*ch('seed'))); @orient = quaternion(angle, axis);