Created
January 9, 2020 18:02
-
-
Save simonreeves/5686974a902f957d067f9738a2822840 to your computer and use it in GitHub Desktop.
do houdini stuff in batch
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
# run this with hython | |
geo_obj = hou.node('obj').createNode('geo') | |
sphere = geo_obj.createNode('sphere') | |
# make polygons instead of prim | |
sphere.parm('type').set(1) | |
sphere.parm('freq').set(8) | |
sphere.parm('scale').set(.45) | |
# add copytopoints to sphere output | |
ctp = sphere.createOutputNode('copytopoints') | |
# create grid on 2nd input of copytopoints | |
grid = ctp.createInputNode(1, 'grid') | |
# create null on copytopoints | |
out = ctp.createOutputNode('null', 'OUT') | |
out.setDisplayFlag(1) | |
out.setRenderFlag(1) | |
# create randomise attribute on grid | |
rand_color = grid.createOutputNode('attribrandomize') | |
# set copytopoints 2nd input to attributerandomize | |
ctp.setInput(1, rand_color) | |
# create cam | |
cam = hou.node('obj').createNode('cam') | |
cam.parmTuple('t').set((-15,12.6,15)) | |
cam.parmTuple('r').set((-33,-45,0)) | |
# create redshift light | |
rslight = hou.node('obj').createNode('rslight') | |
rslight.parmTuple('t').set((0,5,0)) | |
rslight.parmTuple('r').set((-90,0,0)) | |
rslight.parmTuple('areasize').set((5,5,5)) | |
rslight.parm('RSL_intensityMultiplier').set(1) | |
rslight.parm('Light1_exposure').set(1) | |
# create redshift rop | |
rsrop = hou.node('out').createNode('Redshift_ROP', 'Beauty') | |
rsrop.parm('trange').set(1) | |
rsrop.parm('UnifiedMaxSamples').set(256) | |
rsrop.parm('PrimaryGIEngine').set(3) | |
rsrop.parm('SecondaryGIEngine').set(3) | |
# anhoudeadline | |
andeadline = rsrop.createOutputNode('An_AnHouDeadline') | |
# SAVE SCENE with analog save!! | |
# submit to farm | |
andeadline.parm('dl_Submit').pressButton() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment