Skip to content

What Is Supported

Jim Price edited this page Nov 3, 2021 · 3 revisions

General

The goal is to support everything pbrt has to offer in a somewhat extensible way so if a developer wants to add functionality they can do so in a easily with little to no modifications to the exporter it self.

With the exception of Shapes, Mediums and Transforms, everything has a node based interface through Houdini VOP nodes.

Scene Wide Options

A base set of parameters can be found on the PBRT ROP which covers most of the scene wide options. If additional functionality is required that is not exposed then the corresponding VOP node can be plugged into. In these cases the ROPs values will be disabled and the VOP node's values will be used instead. This makes it easy to add new Integrators, Samplers, etc without having to modify the ROP and Python scripts.

The Scene

Shapes

Houdini pbrt Notes
Circle disk Texture coordinates will not match
Sphere sphere
Tube cone or cylinder if rad1 == rad2 a cylinder is used, otherwise not supported
Poly trianglemesh Polys with more than 3 points are tesselated
PolySoup trianglemesh Polys with more than 3 points are tesselated
Mesh bilinearmesh Only the quad configuation is supported
NURBSMesh nurbs Tesselated to Polys
NURBCurve curve Converted to BezierCurve during export
BezierCurve curve Order and basis restrictions apply, no auto-conversion done
BezierMesh trianglemesh Tesselated to Polys
MetaBall trianglemesh Tesselated to Polys with lod set to 1, if other settings are required, pre-convert MetaBalls
Volume uniformgrid medium A trianglemesh will be created which bounds the volume along with a heterogeneous medium
Heightfield not supported Recommend: Use a Heightfield Convert SOP to create polygons
Tetrahedron trianglemesh Tesselated to Polys
VDB nanovdb medium VDBs are saved out (density and temperature fields only) and converted to NanoVDBs
Packed Prims not supported
Packed Disk Prim ply If your packed disk prim points to a ply file that will be used.

Overriding of Material parameters is supported through Houdini's Material Overrides. This can easily be done via a Material SOP.

Houdini supports arbitrary attributes on the primitives, points and vertices. The exporter will not export all of these attributes to pbrt parms, only the ones that are supported by pbrt are currently exported.

Lights

The two default Houdini lights, Light and Environment Light, will automatically be converted to the appropriate pbrt light type at export. If direct control of the parameter values (or light type) is required then you can add the light_node property. This will allow you to hook up a pbrt light VOP and to the light. The light's transforms will still be wrangled but the parameters on the light will be ignored.

Materials and Textures

Instancing

Houdini has an Instance Object that supports two different modes.

Fast Point Instancing

Fast point instancing uses PBRT's ObjectInstance API to share geometry. This allows for a fast export but does not support different materials between instances. See Exercise B.2 in the book. Good for instancing many copies of the same looking object. (Can be different sizes.) This can be considered "render time instancing".

Full Point Instancing

Full point instancing does not use PBRT's ObjectInstance API. Instead when exporting the scene for PBRT a Houdini will create objects for each of the point representations. This allows for the creation of many objects without needing lots of actual Object nodes in Houdini. This can be considered "scene export instancing".

Materials and Overrides

During full point instancing Houdini will evaluate the shop_materialpath if it exists. Normally a NamedMaterial is made at the start of the export and then referenced. Using a shop_materialpath on points when Full Point Instancing will allow for the full evaluation of the shading graph for each point. This is more expensive but allows the shading network to change per point.

instancepoint()

When Houdini is evaluating Full Point Instancing, it keeps track of the current point being evaluated which you can access via the instancepoint() expression on parameters. Uses cases for this would be to change object settings per point, or instancing lights with different colors. Note the instancepoint() expression does not work on the various PBRT Materials or Textures, only Object nodes (including Lights).

Other Tips

It is recommended that if you are full point "instancing" a lot of large geometry to use the #include filename.pbrt functionality but adding a pbrt_include PBRT Render Property. This saves time on having to generate the same chunk of geometry for every instanced object.

Further Details

SideFX Documentation on Instancing

The Helpers

Mediums

NanoVDBs

While Houdini supports OpenVDB as of Houdini 19.0 there is not a way to directly export NanoVDBs. The user will have to provide their own conversion tool. Luckily the OpenVDB distribution ships with a utility called nanovdb_convert. To build this you can do something along the lines of

git clone https://github.com/AcademySoftwareFoundation/openvdb.git
cd openvdb
git checkout v9.0.0
mkdir build
cmake -DCMAKE_INSTALL_PREFIX=/opt/openvdb/openvdb-9.0.0 -DBLOSC_ROOT=/opt/blosc/blosc-v1.5.0 -DOPENVDB_BUILD_NANOVDB=ON -DNANOVDB_USE_OPENVDB=ON -DOPENVDB_BUILD_BINARIES=ON ..
make install

Then add /opt/openvdb/openvdb-9.0.0/bin to your $PATH. With nanovdb_convert available you'll be able to export OpenVDB volumes from Houdini.

Spectrum