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.