Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Creating Mesh Lights

Mesh Lights in RenderMan are created with a PxrMeshLight.  Any piece of geometry can be used as a mesh light (also referred to as a "geometric area light"). The two main workflows for creating mesh lights in RfK are described below. 

...

Method 2: The geometry.areaLightGeometrySource Attribute

Mesh light geometry needs to be attached to the light using a specific attribute that RfK looks for when processing the lights. That attribute is named "geometry.areaLightGeometrySource". The attribute is a string attribute on the light and it's value should be the geometry location. For convenience, the PrmanMeshLightCreate macro, a part of the RfK distribution, demonstrates this set up.

Method 3: Assign a PxrMeshLight Material

You may assign a PxrMeshLight material to an object to create a mesh light. However, you will not be able to take advantage of light linking and light filter options.

Additional Notes

The geometry can be rendered with or without a Bxdf. RfK assigns PxrBlack to mesh lights if no other Bxdf is assigned (does not apply to Method 3). If a Bxdf is assigned to the geometry then the geometry will be rendered according to the characteristics of that shader.

It is recommended that you increase the micropolygonlength on the mesh light for improved performance. This attribute is available on the PxrMeshLight GafferThree package in the Object Tab.Unlike in previous versions of RenderMan, Mesh Lights now have a specific light shader. Where you could previously use any geometric area light as the light shader, you must now use PxrMeshLight.

If you want to use the Texture Color parameter of PxrMeshLight, you can create a shading network with PrmanShadingNodes and a NetworkMaterial node.  Then assign the NetworkMaterial to the light location with a MaterialAssign node, downstream of the GafferThree where the light was created.