Renderman and Paint Effects

The following information relates to the following video.

Renderman has access to the following data on a Paint Effects stroke. The most useful one is Cs (colour).

  • data – how the data attaches to the geometry, varying and vertex both attach to vertices, uniform attaches to each face and constant attaches to the whole mesh
  • type – what type of data is it – color, float, point, vector, normal
  • name – name of the primvar
  • description – a brief description of what the data contains
[data] [type] [name] (description)
vertex normal N (surface normal)
varying float width (width of curve)
vertex float t (length along curve)
varying color Cs (color on curve
vertex point P (position along curve)

These can be used with PxrPrimvar or PxrVariable.

Simple script to help assign Renderman materials to Paint Effects strokes in Maya. To use is easy, select paint strokes and then the PxrSurface you wish to use and run the code.

import pymel.core as pym

mypaintfx = pym.ls (sl=True, fl=True, dag=True, ni=False, type="stroke")
mypxrsurface = pym.ls (sl=True, fl=True, dag=False, ni=False, type="PxrSurface")

myconnection = pym.listConnections('%s.outColor' % str (mypxrsurface[0]))

for x in mypaintfx:
    pym.connectAttr( '%s.message' % str(myconnection[0]), '%s.rman__torattr___customShadingGroup' % x, force=True )

Information based on using Renderman 22.1 and Maya 2018.2, for those curious- these frames took about 3mins at HD resolution and contain about 1.6 million curves.

3 thoughts on “Renderman and Paint Effects”

  1. Hi. I doing some experiments where I would like to output Xgen to curves. I would like to export to animated hair to curves via the output to mel and then maybe convert the curves to Alembic. Finally, I woul like to make these curves renderable and assign a shader. Currently, you have to tag each curve assign a shader set and then switch it to renderble. Not feasible for lots and lots of curves.

    1. Yeah I don’t know what to suggest – Maya unfortunately doesn’t have a node which can just store multiple explicit curves. In production we typically use custom procedurals which stores all the curve data in one node.

      Renderman does handle multiple curves as one object better than multiple curves as multiple objects – so if you can keep them as alembic or xgen it’ll perform better.

Leave a Reply

Your email address will not be published. Required fields are marked *