Compiled shader to OTL

   1698   1   0
User Avatar
Member
301 posts
Joined: July 2005
Offline
Hi,

I am having a look at custom compiled shader handling in Houdini

I came across a python script called sdl2otl.py as part of the Houdini distribution

I created a HDA using the following command

$ sdl2otl.py -l delight.hda shinymetal.sdl
$ cp delight.hda $HOME/houdini16.0/otls
$ houdini

Houdini issued the following errors

oplibShop/shinymetal?Shop/shinymetal Error(6): script unknown identifier shadertype

My end goal is not 3delight shader by compiled OSL shader but I was hoping to learn something from the sdl2otl.py code so that I can write my own oso2otl.py (didn't find such script via google)

Cheers
Nicholas Yue
User Avatar
Staff
1471 posts
Joined: July 2005
Offline
Looks like sdl2otl calls rmands.py, which always writes out the ‘shadertype’ field, but that field is valid only for the VOP-based shaders. SHOPs don't have such keyword. SHOPs are being replaced by VOPs as representation for shaders and materials.

In rmands.py, there is self.Table, which should probably be set to “Vop”. There is _HoudiniTableMap which hard codes some shader type mappings for RMan.

Once your HDA is a VOP, the error above should go away.
  • Quick Links