Page tree

Versions Compared

Key

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

...

The RIX_BXDFPLUGINCREATE() macro defines the CreateRixBxdfFactory() method, which is called by the renderer to create an instance of the bxdf plugin. Generally, the implementation of this method should simply return a new allocated copy of your bxdf factory class. Similarly, the RIX_BXDFPLUGINDESTROY() macro defines the DestroyRixBxdfFactory()  method  function called by the renderer to delete an instance of the bxdf plugin; a typical implementation of this method function is to delete the passed in bxdf pointer:

Code Block
languagecpp
    RIX_BXDFPLUGINCREATE
    {
        return new MyBxdfFactory();
    }
    RIX_BXDFPLUGINDESTROY
    {
        delete ((MyBxdfFactory*)bxdf);
    }

RixBxdfFactory::BeginScatter()

...

  • The transportTrait tells the Bxdf the subset of light transport to consider: direct illumination, indirect illumination, or both. 
  • lobesWanted specifies what lobes are requested, for example specular reflection, diffuse transmission, etc. 
  • rng should be called to generate well-stratified samples; such samples typically reduce noise and improve convergence compared to using uniform random samples. 

...

  • RixBxdf::GetPresence() to evaluate the geometry presence.
  • RixBxdf::GetOpacity() to evaluate the opacity color.

Installation

RenderMan will search for bxdf plugins on demand, under the rixplugin searchpath. The following rib stream will search for a plugin file named MyDiffuse.so

Code Block
Bxdf "MyDiffuse" "diffuse1" "color tint" [0.5 0.5 0.5]

Creating a Bxdf args File

...

  • .


...

Additional Considerations

...