Page tree

Versions Compared

Key

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

...

Any instance data that is created will be automatically returned by the renderer when the lightweight instance is created - for example, when RixBxdfFactory::BeginScatter() is invoked to create a RixBxdf. The implementation of BeginScatter() is now free to use this instance data to reduce the cost of creating the associated RixBxdf.

Anchor
dynamicparameters
dynamicparameters
Dynamic Parameters

A plugin can create its parameter table dynamically based on the parameters provided to each instance of the plugin. This dynamically created table is created using the CreateInstanceData() method, and should be saved in the paramtable member of the InstanceData, along with a corresponding freefunc() routine. Generally, static interfaces should be preferred over dynamic interfaces due to their extra memory expense. If the paramtable member remains null, all instances will share the parameter table returned by GetParamTable(). In order to prevent the renderer from filtering out dynamic parameters as bad inputs, a plugin that is using a dynamically created table should have a k_RixSCAnyType entry in its plugin parameter table.

...