Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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

boolSetAttenuation(double distance, AttenDistUnit unit)
voidGetAttenuation(double& distance, AttenDistUnit& unit) const
voidSetNd(double nd)
doubleGetNd() const
voidSetK(double k)
doubleGetK() const
voidSetAbbe(double abbe)
doubleGetAbbe() const
voidSetForceFresnel(bool forceFresnel)
boolGetForceFresnel() const
voidSetR2(bool use, double angle, double roughness)
voidGetR2(bool& use, double& angle, double& roughness) const
voidSetIORFile(bool use, const MString& fileName)
voidGetIORFile(bool& use, MString& fileName) const
voidSetScattering(double coefficient, double asymmetry, bool singleSided)
voidGetScattering(double& coefficient, double& asymmetry, bool& singleSided) const
voidSetThicknessRange(double thicknessMin, double thicknessMax)
voidGetThicknessRange(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.

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

These are the parameters for the custom Fresnel curve. See here for details on this feature.

In Python, SetR2 can be either be given None to turn off the feature (equivalent to calling the C++ version with false as the first argument), or two floating point arguments to turn on the feature and set the angle and roughness weights. Similarly, GetR2 takes no arguments and returns None if the feature is off, or a tuple with the two weights if it's on.

Attribute names: useR2 (AttrType_Bool), r2Angle (AttrType_Double), r2Roughness (AttrType_Double).

void SetIORFile(bool use, const MString& fileName)
void GetIORFile(bool& use, MString& fileName) const

The Maxwell reflectance model can use measured data from IOR files.

The Python version of SetIOR takes a single argument, which can either be None to turn off the use of measured data, or a string containing the path to the IOR file. GetIOR takes no arguments and returns None if measured data is off, or the path to the IOR file if it's on.

Attribute names: useIORFile (AttrType_Bool), iorFile (AttrType_String).

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

These are the subsurface scattering parameters for the component (they only apply to BSDFs). See here for details. The singleSided argument decides if the thin SSS model is used instead of the volumetric version. Turning on singleSided makes the scattering attribute texturable and enables the thickness attribute.

The Python version of GetScattering takes no arguments and returns the values as a 3-tuple.

Attribute names: scatterCoeff (AttrType_Double), asymmetry (AttrType_Double), singleSided (AttrType_Bool).

void SetThicknessRange(double thicknessMin, double thicknessMax)
void GetThicknessRange(double& thicknessMin, double& thicknessMax) const

When single-sided SSS is on and the thickness attribute is textured, these two attributes control the range defined by the thickness texture: black is mapped to thicknessMin and white is mapped to thicknessMax, with linear interpolation in between.

The Python version of GetThicknessRange takes no arguments and returns the values as a 2-tuple.

Attribute names: thicknessMin (AttrType_Double), thicknessMax (AttrType_Double).

  • No labels