Functions
Sub-Surface Scattering API

SSS utility functions. More...

Functions

AI_API void AiBSSRDFEmpirical (const AtShaderGlobals *sg, AtRGB &direct, AtRGB &indirect, const float *mfp, const float *albedo, const AtRGB *weight, unsigned int num=1)
 Calculate direct and indirectly lit SSS using an BSSRDF model that was empirically fitted to match brute-force Monte Carlo scattering. More...
 
AI_API AI_PURE bool AiShaderGlobalsFromSSS (const AtShaderGlobals *sg)
 

Detailed Description

SSS utility functions.

Function Documentation

◆ AiBSSRDFEmpirical()

AI_API void AiBSSRDFEmpirical ( const AtShaderGlobals sg,
AtRGB direct,
AtRGB indirect,
const float *  mfp,
const float *  albedo,
const AtRGB weight,
unsigned int  num 
)

Calculate direct and indirectly lit SSS using an BSSRDF model that was empirically fitted to match brute-force Monte Carlo scattering.

This BSSRDF accounts for both single and multiple scattering.

Note that Fresnel or other layer or mixing weights must be provided separately from the albedo in the weights array, as the albedo affects the shape of the BSSRDF profile.

BSSRDF sampling quality is controlled by the GI_sss_samples render option.

Note
Deprecated, use AiClosureEmpiricalBSSRDF instead.
Deprecated, use shader closures instead of integrating light in shaders.
Parameters
sgshader globals to perform the lookup at
[out]directvariable returning the directly lit part of the result
[out]indirectvariable returning the indirectly lit part of the result
mfparray of mean free path lengths (mfp = 1/sigmat' = 1/(sigmas' + sigmaa))
albedoarray of diffuse reflectivities
weightarray of weights for mixing profiles or applying fresnel
numnumber of elements in mfp and albedo arrays
Returns
nothing

© 2023 Autodesk, Inc. · All rights reserved · www.arnoldrenderer.com