[Sidefx-houdini-list] Command-line render

Sam Swift-Glasman glassman3d at gmail.com
Thu Mar 26 08:09:18 EDT 2015


glad to hear it!

let me know if you have any other questions

best
Sam

On Thu, Mar 26, 2015 at 12:03 PM, Aviv Bar Ami <avivba at snowball.co.il>
wrote:

> Hi Sam,
> That is exactly what I needed to get it up and running,
> many thanks for taking the time!
>
> cheers,
> Aviv
>
> On 26/03/2015 12:51, Sam Swift-Glasman wrote:
>
>> personally i use hython (houdini's interactive python shell) it is much
>> more powerful and easier to use due it's object oriented nature
>>
>> to run use the following
>>
>>
>> *hython -v "myscript.py"*
>>
>>
>> it involves a bit of work learning the hou module but python is much
>> easier
>> to deal with especially if your tasks involve munging strings for changing
>> paths ect
>> hscript is archaic and painful i.m.h.o ;)
>>
>> it is all well documented but here are a few functions to get you started:
>>
>> hou.hipFile.load("pathtomyhipfile")  # open a hipfile
>> myrop = hou.node("/out/myrop") # assign your rop object to a variable
>> myrop.parm("trange").set( 1 ) # set rop to render a frame range
>> myrop.parmTuple("f").set ( (1,200,1) ) # sets frame ranges -parm tuples
>> are
>> vector values
>> myrop.parm("soho_outputmode").set( 0 ) # turns off ifd creation
>> myrop.parm("vm_picture").set( """pathtomyrender.$F4.exr""" ) # set render
>> path
>> myrop.render() # render the rop
>>
>> the above script will render form houdini though this isn't the
>> recommended
>> approach, it is often better to create render archives (ifd files) then
>> use
>> mantra. This is because the above will use a houdini license whereas once
>> your archives are created you can use mantra which comes with 100 license
>> by standard
>>
>> hou.hipFile.load("pathtomyhipfile") # open a hipfile
>> myrop = hou.node("/out/myrop") # assign your rop object to a variable
>> myrop.parm("soho_outputmode").set( 1 ) # turn on ifd creation
>> myrop.parm("soho_diskfile").set( """pathtomyrender.$F4.ifd"""  ) # sets
>> ifd
>> path
>> myrop.parm("vm_picture").set( """pathtomyrender.$F4.exr""" ) # stes render
>> path
>> myrop.render() # render the rop
>>
>> then use mantra from the command line to render
>>
>> mantra -f ""pathtoifdfile"""
>>
>> hope that helps
>> cheers
>>
>> Sam Swift-Glasman
>>
>> On Thu, Mar 26, 2015 at 8:14 AM, Aviv Bar Ami <avivba at snowball.co.il>
>> wrote:
>>
>>  Hi,
>>>
>>> I'm trying to automate some Houdini processing, and would like it to be
>>> outside of Houdini, and with a single button (in a host application, or a
>>> python\batch file).
>>> I found that there are a couple of ways you can achieve this, and most
>>> people recommended using hbatch, but I couldn't find an example I could
>>> use
>>> in a script or a batch file.
>>> Using the hbatch command in a command prompt window (I'm on windows btw),
>>> works great, and I managed to render a specific rop from a given hip
>>> file,
>>> but I'm still looking for a way to automate it..
>>>
>>> I'm looking for something like:
>>> hbatch render -f "myHipFile" -rop /out/myROP
>>> But I could be way off..
>>>
>>> Appreciate any help you can offer!
>>>
>>> Thanks,
>>> Aviv
>>> _______________________________________________
>>> Sidefx-houdini-list mailing list
>>> Sidefx-houdini-list at sidefx.com
>>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>>>
>>>  _______________________________________________
>> Sidefx-houdini-list mailing list
>> Sidefx-houdini-list at sidefx.com
>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>>
>
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>



More information about the Sidefx-houdini-list mailing list