Hi,
For a project my students are working on, we use the great hair system from 16.5. (by the way, many thanks to Kai Stavginski for his supple system, we all loved the toolset and it's pipeline ‘philosophy’ !)
Trouble came later, when we tried to get the generated hair back in Maya for rendering. It's so heavy the ol'mule can't take it, or at least not without falling on its knees, even on decent PCs (Z640).
So I've been looking for a while to get some RIB files (exported from Maya) in Houdini.
For geometry, no problems, I just add a RibArchive render parameter to any GeoNode. That works just fine.
But to reuse all the lookdev work, I'd also like to import Lights and Shaders as well, in order to use Houdini as a launching base for rendering instead of Maya.
Does someone has a clue ?
Yann.
Import Renderman lights and shaders in Houdini
4063 9 1-
- Yann_P
- Member
- 13 posts
- Joined: Jan. 2015
- Offline
-
- jsmack
- Member
- 8177 posts
- Joined: Sept. 2011
- Offline
-
- goldfarb
- Staff
- 3465 posts
- Joined: July 2005
- Online
-
- Yann_P
- Member
- 13 posts
- Joined: Jan. 2015
- Offline
Thanks for your answers.
This pipeline issue, although very specific I guess, is very important for me because at my school we decided to go for Houdini for Fxs, and at the same time we switched to Renderman for the rendering part. As a comp/fx teacher, I don't really mind what rendering engine is used, but having the possibility to gather everything in Houdini is quite appealing - it would smooth out so many export problems !

Exporting the lighting info out of Maya is a breeze : the Export selection to RIB will write a text file with all the light parameters (type, position, etc.)
I guess it wouldn't be to hard to write the import script for Houdini. Problem is, I've never done that. Scripting in Houdini.
Guess there must be a first time for everything…
I know some basics in Python, would that be a good way to go ?
So I would just need to write a procedure that reads a RIB file, and then call some Houdini functions to create nodes with the parameters I just grabbed, right ?
Thanks again for your answers !
Yann.
This pipeline issue, although very specific I guess, is very important for me because at my school we decided to go for Houdini for Fxs, and at the same time we switched to Renderman for the rendering part. As a comp/fx teacher, I don't really mind what rendering engine is used, but having the possibility to gather everything in Houdini is quite appealing - it would smooth out so many export problems !
arctorAarh, that's exactly where I was trying not to go
you could script out the light type/locations/parameters to the Pixar lights, and then the same for the shaders.
but nothing built-in to do this for you.

Exporting the lighting info out of Maya is a breeze : the Export selection to RIB will write a text file with all the light parameters (type, position, etc.)
I guess it wouldn't be to hard to write the import script for Houdini. Problem is, I've never done that. Scripting in Houdini.
Guess there must be a first time for everything…
I know some basics in Python, would that be a good way to go ?
So I would just need to write a procedure that reads a RIB file, and then call some Houdini functions to create nodes with the parameters I just grabbed, right ?
Thanks again for your answers !
Yann.
Edited by Yann_P - Feb. 1, 2018 17:08:17
Head of CGTraining - ESMA School, Toulouse -
-
- goldfarb
- Staff
- 3465 posts
- Joined: July 2005
- Online
yann PANNETIERyep
I know some basics in Python, would that be a good way to go ?
have a read through this:
http://www.sidefx.com/docs/houdini/hom/hou/Node.html [www.sidefx.com]
most of the work will be done by createNode()
a good way to learn how to make/modify nodes is to make the nodes manually and then use the python shell.
for example:
make a null in the network
/obj/null1
then in the python shell type:
>>> null =
then drag and drop null1 from the network into the python shell
you'll get this:
null = hou.node('/obj/null1')
then type:
print null.asCode(brief=True)
this will spit out the python needed to make the null - brief=True will restrict the output to just the non-default values
-
- Yann_P
- Member
- 13 posts
- Joined: Jan. 2015
- Offline
Hey Michael,
I just realized that you were arctor and that arctor was you
How're you doing ?
Thanks a lot for this jumpstart, I just tried with success to make a Pxrrectlight from scratch via the python shell !
You opened the gate, the path lies beyond me now.
Opening and reading the right info from RIB files will be the toughest part for my patchy Python, but I'm not there yet.
I'll post some news of my progression.
Many thanks Michael !!!
Y.
I just realized that you were arctor and that arctor was you

How're you doing ?
Thanks a lot for this jumpstart, I just tried with success to make a Pxrrectlight from scratch via the python shell !
You opened the gate, the path lies beyond me now.
Opening and reading the right info from RIB files will be the toughest part for my patchy Python, but I'm not there yet.
I'll post some news of my progression.
Many thanks Michael !!!
Y.
Head of CGTraining - ESMA School, Toulouse -
-
- goldfarb
- Staff
- 3465 posts
- Joined: July 2005
- Online
-
- Yann_P
- Member
- 13 posts
- Joined: Jan. 2015
- Offline
Hi !
I didn't have much time lately to work on this, here is my humble progress.
First step was to write a simple text file from Maya. As this is foreign to the Houdini realm, I won't post the Maya script here, but here's the file generated :
PxrRectLightShape1
{u'boundingBoxMax': , u'intermediateObject': False, __//lots of other parms//__, u'shadowDistance': -1.0, u'ghostFrames': None}
Two lines, the first is the name of the renderman light, the second is the parameters, as a python dictionnary.
I thought the hardest part was through, as creating nodes and modifying parameters in Houdini is something I now know how to do, thanks to you Arctor.
But I encountered a rather unexpected problem : I cant read text from a file !
Here's the wip of my Houdini python script :
myPath='E:\PYTHON\Renderman_Lookdev_Exporter\ESMA\LIGHTS.sma' #the path - not relative yet
f=open(myPath,'r') #open the file (sma extension is just for fun, it's a plain text file
myName = f.readline # read line 1, which is the name of the light
myDico = f.readline # read line 2, wich is, written raw, a dictionnary
theRoot=hou.node(“/obj”) # définit le node parent - ici, le root.
theLight = theRoot.createNode(“pxrrectlight”, myName, run_init_scripts=False, load_contents=True, exact_type_name=True)
theLight.setParms(myDico) # set light parameters with the content of the dictionnary
The problem comes from the two last lines, as the readline does not return a string, but some kind of handle :
myName
<built-in method readline of file object at 0x000001DCC4C2F150>
How can I ‘extract’ the information from this ‘handle’ ???
Or what am I doing wrong ?
I didn't have much time lately to work on this, here is my humble progress.
First step was to write a simple text file from Maya. As this is foreign to the Houdini realm, I won't post the Maya script here, but here's the file generated :
PxrRectLightShape1
{u'boundingBoxMax': , u'intermediateObject': False, __//lots of other parms//__, u'shadowDistance': -1.0, u'ghostFrames': None}
Two lines, the first is the name of the renderman light, the second is the parameters, as a python dictionnary.
I thought the hardest part was through, as creating nodes and modifying parameters in Houdini is something I now know how to do, thanks to you Arctor.
But I encountered a rather unexpected problem : I cant read text from a file !
Here's the wip of my Houdini python script :
myPath='E:\PYTHON\Renderman_Lookdev_Exporter\ESMA\LIGHTS.sma' #the path - not relative yet
f=open(myPath,'r') #open the file (sma extension is just for fun, it's a plain text file
myName = f.readline # read line 1, which is the name of the light
myDico = f.readline # read line 2, wich is, written raw, a dictionnary
theRoot=hou.node(“/obj”) # définit le node parent - ici, le root.
theLight = theRoot.createNode(“pxrrectlight”, myName, run_init_scripts=False, load_contents=True, exact_type_name=True)
theLight.setParms(myDico) # set light parameters with the content of the dictionnary
The problem comes from the two last lines, as the readline does not return a string, but some kind of handle :
myName
<built-in method readline of file object at 0x000001DCC4C2F150>
How can I ‘extract’ the information from this ‘handle’ ???
Or what am I doing wrong ?
Edited by Yann_P - Feb. 14, 2018 06:18:51
Head of CGTraining - ESMA School, Toulouse -
-
- Yann_P
- Member
- 13 posts
- Joined: Jan. 2015
- Offline
-
- goldfarb
- Staff
- 3465 posts
- Joined: July 2005
- Online
-
- Quick Links


