Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

40 total results found

Transforms and Junk

Houdini FX VEX

1. transforms to attribute matrix: p@orient = quaternion(3@transform); v@scale = cracktransform(0,0,2,set(0.0.0). 3@transform); 2. rotate packed fracture based on point + distance: vector p1= set(@P.x, @P.y, @P.z); vector crack1 = point(1, "P", 0); v...

Get frame range from alembic

Houdini FX Python

import _alembic_hom_extensions as ahe; import hou; anode = hou.pwd(); cam = anode.parm("camera").eval(); fpath = hou.node(cam).parm("fileName"); ver = fpath.eval().split("_")[-1].split("/")[0]; print(ver); name = hou.node(cam).children() ; print(name[0]); anod...

Example On Node Buttons

Houdini FX Python

  This is how a button on a non-adminned node needs to be laid out: import hou ; do something ;  This grabs frame range from supplied alembic camera, updates names, etc:   import _alembic_hom_extensions as ahe; import hou; anode = hou.pwd(); cam = anode.p...

Hardware encoding

Linux & CLI Commands FFMPEG Commands

Intel example command: ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -vaapi_device /dev/dri/renderD128 -i "${invid}" -codec:v h264_vaapi ${invid%.}_testHW.mp4

PDF to one image

Linux & CLI Commands Images and PDFs

convert in.pdf +append out%d.png sudo apt install imagemagick If convert is broken, update policy: # Open the file sudo nano /etc/ImageMagick-6/policy.xml # find and edit the line <policy domain="coder" rights="none" pattern="PDF" /> # to : <polic...

Send to Tops

Houdini FX Python

import hou nodes = hou.selectedNodes() topnet = hou.node("/obj/topnet1") if not topnet: topnet = hou.node("/obj").createNode("topnet") topnet.setName("topnet1") for x in nodes: name = x.name()+"_"+str(x.parent()) fstart = x.parm("f1")...

Set Frame Range without Script

Houdini FX Python

  import hou; anode = hou.pwd(); start = anode.parm("framemin").eval(); end = anode.parm("framemax").eval(); hou.playbar.setFrameRange(start, end); hou.playbar.setPlaybackRange(start, end)

ROP

Houdini FX Python

PostRender open MPLAY: import os; img_path = "`chs("picture")`".replace("$F", "\*"); os.system("mplay %s" % img_path)

Install Ubuntu in distrobox

Linux & CLI Commands DistroBox

Install Docker first: # Add Docker's official GPG key: sudo apt-get update sudo apt-get install ca-certificates curl gnupg sudo install -m 0755 -d /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/k...

Pull version from hipname

Houdini FX Python

Can be used in a parameter. Returns a integer. import hou, re version = re.findall('_v\d+', hou.hipFile.basename())[0] version = int(re.findall('\d+', version)[0]) return version

Fun Shelf Scripts

Houdini FX Python

Version up sops that have a "version" parm - I use this to version up a lot of exports in tops or rops: import hou nodes = hou.selectedNodes() for x in nodes: ver = x.parm("version").eval() + 1 x.parm("version").set(ver) Send a ROP fetch to TOPs name...

Orientation

Houdini FX VEX

Get transform and orientation from camera: string camera = "/obj/alembicarchive1/Camera2/CameraShape2"; // path to your camera @P = ptransform(camera, "space:current", {0,0,0}); @N = ntransform(camera, "space:current", {0,0,-1});  

Get Frame Size of Image File

Houdini FX Python

node= hou.pwd(); bg=node.parm("image").eval(); res=hou.imageResolution(bg); node.parm("framesizex").set(res[0]); node.parm("framesizey").set(res[1]);

Create Agent from built in mocap rig - Simple

Houdini FX Python

This will take a test mocap rig 3 built in to houdini, create an agent, add agent clips from the built in library (must be in your scene already), and lay everything out.  import hou obj = hou.node("/obj") agentname = hou.ui.readInput("Agent Name", title="N...

Send selected nodes to new object (fancy way to create object merges)

Houdini FX Python

import hou nodes = hou.selectedNodes() destnode = hou.node(hou.ui.selectNode(title="select destination node")) for x in nodes: name = x.name()+"_"+str(x.parent()) path= x.path() objmergenode = destnode.createNode("object_merge") objmerge...

Send nodes to new alembic export

Houdini FX Python

import hou nodes = hou.selectedNodes() destnode = hou.node("/obj/EXPORT") if not destnode: destnode = hou.node("/obj").createNode("geo") destnode.setName("EXPORTS") for x in nodes: name = x.name()+"_"+str(x.parent()) path= x.path(...

TOPs - symlink output file of parent

Houdini FX Python

  exportFile = str(work_item.expectedInputFiles[0]) dir = os.path.dirname(exportFile) newFile = os.path.join(dir, "cache.abc") os.symlink(exportFile, newFile)

Expressions

Houdini FX

Switch by Normal: if(point("../resample3", 0, "N", 2)<0, 0, 1)  

Spiral

Houdini FX VEX

#include "math.h" #include "voplib.h" float easeOutCirc ( float t ) { return sqrt ( 1 - ( pow ( ( 1 - t ), 2 ) ) ); } float index = @ptnum; float numpts = @numpt; float startAngle = radians ( ch("angle") ); float dir = 2 * ch("dir") - 1; floa...

Links

Houdini FX VEX

Big resource: https://lex.ikoon.cz/vex-snippets/