Can't find a stable USD + OSL > Renderman/hdPrman pipeline

I’ve been tinkering the past few months trying to get a pipeline as follows:

USD Python API to generate a .usd scene (which has .obj meshes, OSL shaders, a camera and lights) > scene.usd > usdview > rendering with hdprman.

I have not been able to find a configuration that can support this. It appears that usd does not support .osl shaders out of the box, however renderman core (headless) does support OSL through their .rib format.

Does anyone have any suggestions on how to approach this? Perhaps I may need to code a translator from a .usd scene with .osl shaders to a renderman .rib scene?

And if this is currently not possible, I’d be more than happy to make some open source contributions to the community. I’m just trying to learn USD, OSL and Renderman by combining all this tech in a single project. Thank you!

The degree to which USD itself is concerned with OSL is only to populate the SdrRegistry with shader node definitions from your locatable OSL shaders. It’s true that by build_usd.py default, the plugin for doing that population is disabled. However, if you enable hdprman in build_usd, then you should get hdprman’s OSL Sdr plugins built, and all of the OSL shaders locatable by your prman configuration should be populated.

RIB does not come into play, but your prman configuration variable settings at USD runtime do - perhaps that’s the issue?

Please also see: RenderMan USD Imaging Plugin — Universal Scene Description 24.11 documentation