RenderManAPI  24.0
RixBxdf.h File Reference
#include <cstddef>
#include <vector>
#include "RixBxdfLobe.h"
#include "RixShading.h"
#include "prmanapi.h"
#include "RiTypesHelper.h"

Go to the source code of this file.

Classes

class  RixBxdfFactory
 
class  RixBxdf
 
class  RixOpacity
 
class  RixVolumeIntegrator
 
class  RixVolumeIntegrator::IntegratorDelegate
 
class  RixPostLighting
 

Macros

#define RIX_BXDFPLUGINCREATE   extern "C" PRMANEXPORT RixBxdfFactory* CreateRixBxdfFactory(const char* hint)
 
#define RIX_BXDFPLUGINDESTROY   extern "C" PRMANEXPORT void DestroyRixBxdfFactory(RixBxdfFactory* bxdf)
 

Enumerations

enum  RixBXEvaluateDomain {
  k_RixBXEmptyDomain = 0, k_RixBXOutsideReflect = 1, k_RixBXOutsideTransmit = 2, k_RixBXInsideReflect = 4,
  k_RixBXInsideTransmit = 8, k_RixBXReflect = (k_RixBXInsideReflect | k_RixBXOutsideReflect), k_RixBXTransmit = (k_RixBXInsideTransmit | k_RixBXOutsideTransmit), k_RixBXBoth = (k_RixBXReflect | k_RixBXTransmit),
  k_RixBXOutside = (k_RixBXOutsideReflect | k_RixBXOutsideTransmit), k_RixBXInside = (k_RixBXInsideReflect | k_RixBXInsideTransmit), k_RixBXVolume = 16
}
 The RixBxdf interface is a shading plugin responsible for creating a RixBxdf from the the ShadingContext and the set of connected patterns. More...
 
enum  RixBXTransportTrait { k_RixBXDirectLighting = 1 << 0, k_RixBXIndirectLighting = 1 << 1, k_RixBXAnyLighting = k_RixBXDirectLighting | k_RixBXIndirectLighting }
 
enum  RixBXRayFlags { k_RixBXBothEndsInVolume = 0, k_RixBXOriginOnBoundary = 1, k_RixBXEndOnBoundary = 2, k_RixBXBothEndsOnBoundary = 3 }
 

Functions

PRMAN_INLINE bool RixVisibleToDomain (RixBXEvaluateDomain domain, RtVector3 const &L, RtVector3 const &N, RtVector3 const &V)
 

Macro Definition Documentation

◆ RIX_BXDFPLUGINCREATE

#define RIX_BXDFPLUGINCREATE   extern "C" PRMANEXPORT RixBxdfFactory* CreateRixBxdfFactory(const char* hint)

◆ RIX_BXDFPLUGINDESTROY

#define RIX_BXDFPLUGINDESTROY   extern "C" PRMANEXPORT void DestroyRixBxdfFactory(RixBxdfFactory* bxdf)

Enumeration Type Documentation

◆ RixBXEvaluateDomain

The RixBxdf interface is a shading plugin responsible for creating a RixBxdf from the the ShadingContext and the set of connected patterns.

The RixBxdf interface characterizes the light-scattering behavior at positions in a material.

Integrators 'drive' Bxdf subclasses by:

  • invoking RixBxdfFactory::Begin to obtain a RixBxdf parameterized by the Bxdf's potentially varying input parameters. BxdfFactory is expected to invoke EvalParam for those parameters that pertain to the integration request.
  • requesting the Bxdf to generate samples of the bxdf function to facilitate integrating a subset of the general light transport solution.
  • requesting the Bxdf to evaluate samples associated with a particular phase of integration.

To support several integrator-optimization strategies (diverse sampling frequencies, baking, etc.), we characterize a Bxdf as a collection of individually sampled lobes. Integrators may request samples from a subset of lobes and obtain insight into the general characteristics of each component.

Execution model:

  • there is one instance of a RixBxdfFactory per bound RiBxdf (RIB) request.
  • a single RixBxdfFactory may be active in multiple threads simultaneously.
  • the context for a per-thread execution is signaled via Begin/End. The RixBxdfFactory should stash state in the RixBxdf object and consider that the lifetime of a RixBxdf instance is under control of the integrator. Generally integrators should attempt to minimize the number of live RixBxdf objects but may nonetheless require a large number. For this reason, the RixBxdf instances should attempt to minimize memory consumption and construct/deconstruct costs.
  • the primary RixBxdf entrypoints operate on a collection of shading points in order to reasonably maximize shading coherency and support SIMD computation. Integrators rely on the RixBxdf's ability to generate and evaluate a sample across the entire collection of points. Should an integrator require multiple samples at the shading points, it will invoke the single-sample methods multiple times, taking care to initialize the random number contexts appropriately. Sample evaluation may be performed in a 1 sample all points variant - EvaluateSample, and a 1 point n samples variant via EvaluateSamplesAtIndex). Generation however is constrained to 1 sample n points. Evaluation typically has different requirements (eg. for making connections in a bidirectional integrator), whereas generation typically benefits from being performed all points at once.
Enumerator
k_RixBXEmptyDomain 
k_RixBXOutsideReflect 
k_RixBXOutsideTransmit 
k_RixBXInsideReflect 
k_RixBXInsideTransmit 
k_RixBXReflect 
k_RixBXTransmit 
k_RixBXBoth 
k_RixBXOutside 
k_RixBXInside 
k_RixBXVolume 

◆ RixBXRayFlags

Enumerator
k_RixBXBothEndsInVolume 
k_RixBXOriginOnBoundary 
k_RixBXEndOnBoundary 
k_RixBXBothEndsOnBoundary 

◆ RixBXTransportTrait

Enumerator
k_RixBXDirectLighting 
k_RixBXIndirectLighting 
k_RixBXAnyLighting 

Function Documentation

◆ RixVisibleToDomain()