MaxwellMayaBSDF class

Description

A BSDF (bidirectional scattering distribution function) describes how a material responds to light. When a material layer contains more than one BSDF, each ray interaction samples one of the BSDFs. The probability of a BSDF being used is determined by its weight value. See this section of the main manual for more details on how Maxwell BSDFs work.

Texturable attributes: weight (AttrType_Double), roughness (AttrType_Double), anisotropy (AttrType_Double), anisotropyAngle (AttrType_Double), bump (AttrType_Double). When the weight or roughness attributes are textured, their scalar values act as multipliers for the values sampled from the textures. The bump value specifies the intensity of the effect when the attribute is textured and is ignored when no texture is present.

Base class: MaxwellMayaMaterialComponent.

Methods

void Destroy()

Destroys the BSDF, removing it from the parent layer.

bool SetName(const MString& name)
MString GetName() const

Set or get the name which will be displayed for this BSDF in Maxwell Studio or in the material editor.

MaxwellMayaReflectance* GetReflectance()
const MaxwellMayaReflectance* GetReflectance() const

Returns a handle for the reflectance sub-component of this BSDF.

MaxwellMayaCoating* CreateCoating()

Creates and returns a new coating component. If the BSDF already has a coating, returns NULL in C++ or raises maxwell.ParameterError in Python.

MaxwellMayaCoating* GetCoating()
const MaxwellMayaCoating* GetCoating() const

Returns the coating component for the BSDF. If there is no coating, the C++ version returns NULL and the Python version returns None.

bool HasCoating() const

This is a convenience method which allows you to check if a coating is present. It is equivalent to checking if GetCoating returns NULL, but you don't have to worry about managing the returned pointer in case there is a coating and you only wanted to check its existence. This method does not exist in Python, where the object returned by GetCoating is managed automatically by the garbage collector.

void RemoveCoating()

Removes the coating component, if any. The Python version will raise maxwell.ParameterError if no coating is present.

void SetEnabled(bool enabled)
bool GetEnabled() const

BSDFs can be disabled, in which case they do not contribute to the rendering in any way.

Attribute name: enabled (AttrType_Bool).

void SetUseNormalMap(bool use)
bool GetUseNormalMap() const

When a texture is applied on the bump attribute, this attribute controls if it's used as a regular bump map, or a normal map.

Attribute name: useNormalMap (AttrType_Bool).