Skip to content

Retrospective

jim price edited this page Oct 11, 2020 · 1 revision

Over the course of development much was learned about pbrt and Houdini's export system. Below are some future considerations and possible design changes to experiment with.

Left vs Right handed coordinate system.

Houdini is right handed, and pbrt is left handed. This is actually quite standard and its common to flip the z of camera space. While this solves the problem another approach is to convert all geometry and params instead of flipping camera space.

SOHO versus hou.

The original intent was to fully use SOHO for processing geometry, parameters and shaders however that was met with many restrictions, mainly shopclerks and sohog.tesselate. Currently a hybrid approach is being used where SOHO is used to define the overall scene and its parameters, then handles the processing of geometry and shaders to hou.

shopclerks

shopclerks allow for easy shader output given a shader path as input. In principle this is a great feature, however there are two drawbacks. Since shopclerks is a Python package, it has to be copied out of the Houdini install directory in its entirety. This makes it difficult to distribution a simple to use package that contains everything you need. Shipping the shopclerks entirely isn't feasible, and adding an installer adds complexity. The other drawback is that shopclerks are only valid for known SHOP Types. This is fine for shaders, displacements and lights, but for the pbrt exporter I wanted to have SHOP/VOP support for things like the filters, accelerator, etc. Since its impossible to extend the SHOP_Types Enum it wouldn't be possible to use shopclerks with these types. The end result is having to avoid shopclerks entirely and implement similar workflows in the PBRTnodes.py module.

sohog

sohog is extremely handy. The partitioning as well as extra geometry processing it provides is good, unfortunately I couldn't use it. There is a bug, at least in Houdini 16.5, that prevents you from tessellating partitioned geometry. The tessellation operation happens on the entire geometry, not the partitioned piece. Because of this the geometry back-end had to be done in HOM. However due to the Convert SOP not being verbified an actual SOP network is created at generation time to further process the geometry. It works but feels dirty.