MaxwellMayaReflectance class

MaxwellMayaReflectance class

Description

The reflectance component defines how light is reflected or transmitted by a BSDF or coating. Details about the parameters of the Maxwell reflectance model can be found in the main manual.

Texturable attributes: reflectance0 (AttrType_Color), reflectance90 (AttrType_Color), transmittance (AttrType_Color), scattering (AttrType_Double), thickness (AttrType_Double). The last 3 attributes do not apply to coatings. The scattering attribute is texturable only when single-sided SSS is used; for volumetric SSS, only the color value matters. The thickness attribute is only relevant when single-sided SSS is on.

Base class: MaxwellMayaMaterialComponent.

Methods

bool

SetAttenuation(double distance, AttenDistUnit unit)

void

GetAttenuation(double& distance, AttenDistUnit& unit) const

void

SetNd(double nd)

double

GetNd() const

void

SetK(double k)

double

GetK() const

void

SetAbbe(double abbe)

double

GetAbbe() const

void

SetForceFresnel(bool forceFresnel)

bool

GetForceFresnel() const

void

SetR2(bool use, double angle, double roughness)

void

GetR2(bool& use, double& angle, double& roughness) const

void

SetIORFile(bool use, const MString& fileName)

void

GetIORFile(bool& use, MString& fileName) const

void

SetScattering(double coefficient, double asymmetry, bool singleSided)

void

GetScattering(double& coefficient, double& asymmetry, bool& singleSided) const

void

SetThicknessRange(double thicknessMin, double thicknessMax)

void

GetThicknessRange(double& thicknessMin, double& thicknessMax) const

 

Inherited methods

bool SetAttenuation(double distance, AttenDistUnit unit)
void GetAttenuation(double& distance, AttenDistUnit& unit) const 

The attenuation distance controls how much light has to travel through the component before it is absorbed (this only applies to BSDFs). See here for more details. The Python version of GetAttenuation takes no arguments and returns a tuple with the values. The unit argument can be one of:

  • AttenDistUnit_Nanometers

  • AttenDistUnit_Micrometers

  • AttenDistUnit_Millimeters

  • AttenDistUnit_Centimeters

  • AttenDistUnit_Decimeters

  • AttenDistUnit_Meters

Attribute names: attenuationDistance (AttrType_Double), attenuationUnit (AttrType_Int).

void SetNd(double nd)
double GetNd() const

Nd is the real part of the index of refraction. See here for details on this attribute.

These methods do not exist in Python; SetNd is replaced by SetIOR, which takes an optional second argument specifying the imaginary part of the index of refraction (equivalent to SetK) and GetNd is replaced by GetIOR, which returns a tuple with both the real and imaginary parts of the IOR.

Attribute name: iorNd (AttrType_Double).

void SetK(double k) = 0
double GetK() const

K is the imaginary part of the index of refraction. See here for details on this attribute. These methods do not exist in Python, where they are replaced by SetIOR and GetIOR (described in the SetNd documentation above).

Attribute name: iorK (AttrType_Double).

void SetAbbe(double abbe)
double GetAbbe() const

Thee Abbe number controls the amount of light dispersion produced by the component (see here for details). This attribute does not apply to coatings.

Attribute name: abbe (AttrType_Double).

void SetForceFresnel(bool forceFresnel)
bool GetForceFresnel() const

When Force Fresnel is on, the brightness of the reflectance 0 and 90 colors does not influence how much light is reflected by the component; only the IOR value is used to determine how reflective the surface is. See here for more details on this feature.

Attribute name: forceFresnel (AttrType_Bool).

void SetR2(bool use, double angle, double roughness)
void GetR2(bool& use, double& angle, double& roughness) const