Maintenance on 2022-06-30
rmanwiki will be down from 7pm-8pm PT for maintenance.
Curves are typically used to render fur, hair, grass, and other vegetation. In most cases, an artist has spent time grooming or styling the curves into an approved look. Then a physics simulation is applied so that they move naturally in the scene. Once you or another artist has completed all of the above, it is time to render.
There are several ways to get curves into Katana. If your upstream application supports exporting curves to Alembic or USD (if you have installed the USD plugins from http://graphics.pixar.com/usd/), you can import the file directly into Katana. You will be able to visualize the curves within Katana's Viewer. If your object has lots of curves and you choose to expand the Scenegraph in order to see them in the Viewer, it may take a while for Katana to expand the Scenegraph.
Otherwise, you will be using a renderer procedural to have the curves emitted dynamically into RenderMan as it renders. If you are using something like Yeti or an in-house fur system, you will be using a render procedural. Katana will have no knowledge of them in this case. See Procedurals in Katana for details on how to set up a procedural.
When Katana knows about the curves (as is the case if you import Alembic), it will emit them directly to RenderMan. How the curves are specified in the Alembic file is how they will be rendered. See the RenderMan documentation for curves to understand the specifics of how RenderMan expects curves to be specified.
In order to get interesting looking curves, you will likely want to vary the width of the curve from the base to the tip. Primitive Variables (primvars) need to be attached to the curve in order to vary the width. Your upstream application is responsible for doing this and emitting it to the Alembic file, or dynamically to RenderMan as a part of that vary along the curve for width, other.
As you create your curves your upstream application, be sure that you are creating curves that are either degree 1 (linear) or degree 3 (cubic). RenderMan only supports those two types. Degree 2 (quadratic) is not supported.
For example, if you are using nHair in Maya to create your curves and exporting them to Alembic, nHair creates curves with degree 2 by default. In order to render them with RenderMan, you must convert them to degree 3. To do this, go to the Outliner, select all of the follicles, go to the Channel Box, then change the degree to 3.
Attached you can find a sample .katana file where we load an an Alembic file with curves and render it. The render below as produced with higher quality settings than are present in the attached .katana file. If you download and open the .katana file, you will need to change the path to the Alembic file in the "Alembic_In" node as well as the "AttributeSet_viewerProxy" node.
When you render curves, you may be interested in the following attributes and options.
Within the PrmanObjectStatements node, within the Advanced layout, there is an option to tell RenderMan to render curves as "roundcurves". Otherwise, you will render the curves as flat ribbons. If you are rendering hair, especially long hair, we recommend that you turn the "hair" attribute shown below to "Yes".
Within the PrmanGlobalStatements node, in the Advanced layout, there are a few more options you may be interested in. You can find them within the options -> dice and options -> hair section of the parameters.