Data Structures | |
struct | AtPointCloudSample |
Functions | |
AI_API AtColor | AiBSSRDFCubic (const AtShaderGlobals *sg, const float *radius, const AtColor *weight, unsigned int num=1) |
Calculate SSS using a weighted sum of cubic BSSRDFs at the specified shading point. More... | |
AI_API AtColor | AiBSSRDFGaussian (const AtShaderGlobals *sg, const float *variance, const AtColor *weight, unsigned int num=1) |
Calculate SSS using a weighted sum of gaussian BSSRDFs at the specified shading point. More... | |
AI_API AtColor | AiSSSTraceSingleScatter (AtShaderGlobals *sg, AtColor Rd, AtColor mfp, float g, float eta) |
Perform a single scattered ray traced SSS computation based on the BSSRDF formulation by Henrik Wann Jensen et al. More... | |
AI_API bool | AiShaderGlobalsFromSSS (const AtShaderGlobals *sg) |
Check to see if the shader globals are coming from an SSS evaluation. More... | |
Deprecated | |
The pointcloud iterator interface will be removed in a future release. | |
AI_API AtPointCloudIterator * | AiPointCloudIteratorCreate (const AtShaderGlobals *sg, int distribution, float spacing=0.1f) |
Create a point cloud sample iterator. More... | |
AI_API void | AiPointCloudIteratorDestroy (AtPointCloudIterator *iter) |
Destroy a point cloud sample iterator. More... | |
AI_API AtPointCloudSample | AiPointCloudIteratorGetNext (AtPointCloudIterator *iter) |
Get the next AtPointCloudSample from the sample iterator. More... | |
AI_API bool | AiPointCloudIteratorFinished (const AtPointCloudIterator *iter) |
Detect whether or not the AtPointCloudIterator has looped through all of the samples. More... | |
AI_API AtUInt32 | AiPointCloudGetSampleCount (const AtPointCloudIterator *iter) |
Return the number of samples in the point cloud for the given shader globals. More... | |
#define | AI_POINTCLOUD_BLUE_NOISE 0x00 |
#define | AI_POINTCLOUD_TRIANGLE_MIDPOINT 0x01 |
#define | AI_POINTCLOUD_POLYGON_MIDPOINT 0x02 |
AI_API AtColor AiBSSRDFCubic | ( | const AtShaderGlobals * | sg, |
const float * | radius, | ||
const AtColor * | weight, | ||
unsigned int | num | ||
) |
Calculate SSS using a weighted sum of cubic BSSRDFs at the specified shading point.
BSSRDF sampling quality is controlled by the sss_bssrdf_samples
render option.
sg | shader globals to perform the lookup at |
radius | array of scattering radii (as world space distances) |
weight | array of weights (one for each scattering radius) |
num | number of elements in radius and weight arrays |
AI_API AtColor AiBSSRDFGaussian | ( | const AtShaderGlobals * | sg, |
const float * | variance, | ||
const AtColor * | weight, | ||
unsigned int | num | ||
) |
Calculate SSS using a weighted sum of gaussian BSSRDFs at the specified shading point.
BSSRDF sampling quality is controlled by the sss_bssrdf_samples
render option.
sg | shader globals to perform the lookup at |
variance | array of variance values for gaussians |
weight | array of weights (one for each scattering radius) |
num | number of elements in radius and weight arrays |
AI_API AtColor AiSSSTraceSingleScatter | ( | AtShaderGlobals * | sg, |
AtColor | Rd, | ||
AtColor | mfp, | ||
float | g, | ||
float | eta | ||
) |
Perform a single scattered ray traced SSS computation based on the BSSRDF formulation by Henrik Wann Jensen et al.
The quality of the SSS computation is controlled by the GI_single_scatter_samples
render option.
sg | shader globals to perform the lookup at |
Rd | reduced albedo term |
mfp | mean free path length (mfp = 1/sigmat' = 1/(sigmas' + sigmaa)) |
g | Henyey-Greenstein phase function coefficient, in the (-1,+1) open interval, where 0 means isotropic scattering, positive values mean forward scattering, and negative values mean backward scattering |
eta | index of refraction |
AI_API bool AiShaderGlobalsFromSSS | ( | const AtShaderGlobals * | sg | ) |
Check to see if the shader globals are coming from an SSS evaluation.
This can be used to simplify shader returns while point clouds are being calculated.
sg | shader globals for the currently running shader |
AI_API AtPointCloudIterator* AiPointCloudIteratorCreate | ( | const AtShaderGlobals * | sg, |
int | distribution, | ||
float | spacing | ||
) |
Create a point cloud sample iterator.
sg | shader globals for the currently running shader |
distribution | distribution type for placing the points in the surface. The valid values are defined by the macros AI_POINTCLOUD_* |
spacing | If distribution is set to AI_POINTCLOUD_BLUE_NOISE, this parameter controls the minimum spacing between points |
AI_API void AiPointCloudIteratorDestroy | ( | AtPointCloudIterator * | iter | ) |
Destroy a point cloud sample iterator.
iter | the AtPointCloudIterator to destroy |
AI_API AtPointCloudSample AiPointCloudIteratorGetNext | ( | AtPointCloudIterator * | iter | ) |
Get the next AtPointCloudSample from the sample iterator.
iter | the AtPointCloudIterator the samples are being taken from |
AI_API bool AiPointCloudIteratorFinished | ( | const AtPointCloudIterator * | iter | ) |
Detect whether or not the AtPointCloudIterator has looped through all of the samples.
iter | the AtPointCloudIterator the samples are being taken from |
AI_API AtUInt32 AiPointCloudGetSampleCount | ( | const AtPointCloudIterator * | iter | ) |
Return the number of samples in the point cloud for the given shader globals.
iter | the AtPointCloudIterator the samples are being taken from |