Material

Reference

class CullingMode

Enumeration of the available culling modes

Name

Description

Front

front polygons are culled

Back

back polygons are culled

Off

no polygons are culled

class Workflow

Enumeration of available workflows

Name

Description

Metallic

metallic workflow

Specular

specular workflow

class WrapMode

Enumeration of available wrap modes.

Name

Description

Repeat

texture coordinates repeat

ClampToEdge

texture coordinates clamp to edge

MirroredRepeat

texture coordinates mirror and then repeat

class MagFilter

Enumeration of available magnification filters.

Name

Description

Linear

linear magnification filter

Nearest

nearest magnification filter

class MinFilter

Enumeration of available minification filters.

Name

Description

Nearest

nearest minification filter

NearestMipmapNearest

nearest with nearest mipmap

NearestMipmapLinear

nearest with linear mipmap

Linear

linear minification filter

LinearMipmapNearest

linear with nearest mipmap

LinearMipmapLinear

linear with linear mipmap

class Anisotropy

Enumeration of available anisotropy levels.

Name

Description

X1

1x anisotropy level

X2

2x anisotropy level

X4

4x anisotropy level

X8

8x anisotropy level

X16

16x anisotropy level

class NormalType

Enumeration of available normal types.

Name

Description

TangentSpace

tangent space normals

ObjectSpace

object space normals

class BlendMode

Enumeration of available blend modes.

Name

Description

None

no blending

Normal

normal blending

Additive

additive blending

Subtractive

subtractive blending

Multiply

multiply blending

Custom

custom blending

class BlendSource

Enumeration of available blend sources.

Name

Description

Zero

zero source

One

one source

SourceColor

source color

OneMinusSourceColor

one minus source color

SourceAlpha

source alpha

OneMinusSourceAlpha

one minus source alpha

DestinationAlpha

destination alpha

OneMinusDestinationAlpha

one minus destination alpha

DestinationColor

destination color

OneMinusDestinationColor

one minus destination color

SourceAlphaSaturate

source alpha saturate

class BlendDest

Enumeration of available blend destinations.

class BlendEquation

Enumeration of available blend equations.

Name

Description

Add

addition blend equation

Subtract

subtraction blend equation

ReverseSubtract

reverse subtraction blend equation

Min

minimum blend equation

Max

maximum blend equation

class DepthMode

Enumeration of available depth test modes.

Name

Description

Never

never pass depth test

Always

always pass depth test

Less

pass if incoming is less than existing

LessEqual

pass if incoming is less or equal to existing

GreaterEqual

pass if incoming is greater or equal to existing

Greater

pass if incoming is greater than existing

NotEqual

pass if incoming is not equal to existing

class Material
module:
fromObject(obj)

Create a material from an object

Parameters:

obj (Object) – The object to cast

Return type:

Material

fromHandle(handle)

create a material object from a handle. Used internally.

Parameters:

handle (number)

create(attributes)

Create a new material

Parameters:

attributes (table) – list of attributes. without, the material will be created with default values

Returns:

the created material

Return type:

Material

getWorkflow()

Retrieves the workflow value for the material.

Returns:

The current workflow value of the material. Expected to be a value from Material.Workflow.

Return type:

str

setWorkflow(workflow)

Sets the workflow for the material.

Parameters:

workflow (str) – The desired workflow value. Expected to be a value from Material.Workflow.

getAttenuationColor()

Retrieves the attenuation color for the material.

Returns:

A table representing the RGB color values, or any suitable color representation of the attenuation color.

Return type:

Color

setAttenuationColor(color)

Sets the attenuation color for the material.

Parameters:

color (Color) – A table representing the RGB color values, or any suitable color representation.

getAttenuationDistance()

Retrieves the attenuation distance for the material.

Returns:

A number representing the attenuation distance.

Return type:

number

setAttenuationDistance(distance)

Sets the attenuation distance for the material.

Parameters:

distance (number) – A number representing the attenuation distance.

getDiffuseColor()

Retrieves the diffuse color for the material.

Returns:

The diffuse color

Return type:

Color

setDiffuseColor(color)

Sets the diffuse color for the material.

Parameters:

color (Color) – The diffuse color to set

getAlbedoMap()

Get the albedo texture or video or nil if none is linked

Returns:

or Video or nil

Return type:

Texture

setAlbedoMap(linkItem)

Set the albedo texture or video

Parameters:

linkItem (texture) – or video to use

getAlbedoWrapS()

Gets the wrap mode along the s-axis (usually horizontal) for the albedo map.

Return type:

str

setAlbedoWrapS(mode)

Sets the wrap mode along the s-axis (usually horizontal) for the albedo map.

Parameters:

mode (str) – The wrap mode. Expected to be a value from Material.WrapMode.

getAlbedoWrapT()

Sets the wrap mode along the t-axis (usually vertical) for the albedo map.

Return type:

str

setAlbedoWrapT(mode)

Sets the wrap mode along the t-axis (usually vertical) for the albedo map.

Parameters:

mode (str) – The wrap mode. Expected to be a value from Material.WrapMode.

getAlbedoMagFilter()

Gets the magnification filter for the albedo map.

Returns:

The magnification filter. Expected to be a value from Material.MagFilter.

Return type:

str

setAlbedoMagFilter(filter)

Sets the magnification filter for the albedo map.

Parameters:

filter (str) – The magnification filter. Expected to be a value from Material.MagFilter.

getAlbedoMinFilter()

Gets the minification filter for the albedo map.

Returns:

The minification filter. Expected to be a value from Material.MinFilter.

Return type:

str

setAlbedoMinFilter(filter)

Sets the minification filter for the albedo map.

Parameters:

filter (str) – The minification filter. Expected to be a value from Material.MinFilter.

getAlbedoAnisotropy()

Gets the anisotropy level for the albedo map.

Returns:

The anisotropy level. Expected to be a value from Material.Anisotropy.

Return type:

str

setAlbedoAnisotropy(anisotropy)

Sets the anisotropy level for the albedo map.

Parameters:

anisotropy (str) – The anisotropy level. Expected to be a value from Material.Anisotropy.

getAlphaTest()

Get the alpha test value of the material.

Returns:

The alpha test value.

Return type:

number

setAlphaTest(amount)

Set the alpha test value of the material.

Parameters:

amount (number) – The alpha test value.

getTransparent()

Check if the material is transparent.

Returns:

True if transparent, false otherwise.

Return type:

boolean

setTransparent(enabled)

Set the transparency of the material.

Parameters:

enabled (boolean) – True if transparent, false otherwise.

getOpacity()

Get the opacity of the material.

Returns:

The opacity value.

Return type:

number

setOpacity(amount)

Set the opacity of the material.

Parameters:

amount (number) – The opacity value.

getAlphaMap()

Get the alpha map of the material.

Returns:

The alpha map texture.

Return type:

Texture

setAlphaMap(texture)

Set the alpha map of the material.

Parameters:

texture (Texture) – The alpha map texture.

getAlphaWrapS()

Get the alpha wrap S mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setAlphaWrapS(mode)

Set the alpha wrap S mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getAlphaWrapT()

Get the alpha wrap T mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setAlphaWrapT(mode)

Set the alpha wrap T mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getAlphaMagFilter()

Get the alpha magnification filter of the material.

Returns:

The magnification filter mode (from Material.MagFilter).

Return type:

str

setAlphaMagFilter(filter)

Set the alpha magnification filter of the material.

Parameters:

filter (str) – The magnification filter mode (from Material.MagFilter).

getAlphaMinFilter()

Get the alpha minification filter of the material.

Returns:

The minification filter mode (from Material.MinFilter).

Return type:

str

setAlphaMinFilter(filter)

Set the alpha minification filter of the material.

Parameters:

filter (str) – The minification filter mode (from Material.MinFilter).

getAlphaAnisotropy()

Get the alpha anisotropy mode of the material.

Returns:

The anisotropy mode (from Material.Anisotropy).

Return type:

str

setAlphaAnisotropy(anisotropy)

Set the alpha anisotropy mode of the material.

Parameters:

anisotropy (str) – The anisotropy mode (from Material.Anisotropy).

getEmissiveColor()

Get the emissive color of the material.

Returns:

The emissive color.

Return type:

Color

setEmissiveColor(color)

Set the emissive color of the material.

Parameters:

color (Color) – The emissive color. Default is black.

getEmissiveMap()

Get the emissive texture or nil if none is linked.

Returns:

Linked texture or nil.

Return type:

Texture

setEmissiveMap(texture)

Set the emissive texture.

Parameters:

texture (Texture) – Texture to use or nil.

getEmissiveWrapS()

Get the emissive wrap S mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setEmissiveWrapS(mode)

Set the emissive wrap S mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getEmissiveWrapT()

Get the emissive wrap T mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setEmissiveWrapT(mode)

Set the emissive wrap T mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getEmissiveMagFilter()

Get the emissive magnification filter of the material.

Returns:

The magnification filter mode (from Material.MagFilter).

Return type:

str

setEmissiveMagFilter(filter)

Set the emissive magnification filter of the material.

Parameters:

filter (str) – The magnification filter mode (from Material.MagFilter).

getEmissiveMinFilter()

Get the emissive minification filter of the material.

Returns:

The minification filter mode (from Material.MinFilter).

Return type:

str

setEmissiveMinFilter(filter)

Set the emissive minification filter of the material.

Parameters:

filter (str) – The minification filter mode (from Material.MinFilter).

getEmissiveAnisotropy()

Get the emissive anisotropy mode of the material.

Returns:

The anisotropy mode (from Material.Anisotropy).

Return type:

str

setEmissiveAnisotropy(anisotropy)

Set the emissive anisotropy mode of the material.

Parameters:

anisotropy (str) – The anisotropy mode (from Material.Anisotropy).

getSheenAmount()

Get the sheen amount of the material.

Returns:

The sheen value.

Return type:

number

setSheenAmount(amount)

Set the sheen amount of the material.

Parameters:

amount (number) – The sheen value.

getSheenRoughness()

Get the sheen roughness value of the material.

Returns:

The sheen roughness value.

Return type:

number

setSheenRoughness(amount)

Set the sheen roughness value of the material.

Parameters:

amount (number) – The sheen roughness value.

getSheenRoughnessMap()

Get the sheen roughness map of the material.

Returns:

The sheen roughness texture.

Return type:

Texture

setSheenRoughnessMap(texture)

Set the sheen roughness map of the material.

Parameters:

texture (Texture) – Texture to use or nil.

getSheenRoughnessWrapS()

Get the sheen roughness wrap S mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setSheenRoughnessWrapS(mode)

Set the sheen roughness wrap S mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getSheenRoughnessWrapT()

Get the sheen roughness wrap T mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setSheenRoughnessWrapT(mode)

Set the sheen roughness wrap T mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getSheenRoughnessMagFilter()

Get the sheen roughness magnification filter of the material.

Returns:

The magnification filter mode (from Material.MagFilter).

Return type:

str

setSheenRoughnessMagFilter(filter)

Set the sheen roughness magnification filter of the material.

Parameters:

filter (str) – The magnification filter mode (from Material.MagFilter).

getSheenRoughnessMinFilter()

Get the sheen roughness minification filter of the material.

Returns:

The minification filter mode (from Material.MinFilter).

Return type:

str

setSheenRoughnessMinFilter(filter)

Set the sheen roughness minification filter of the material.

Parameters:

filter (str) – The minification filter mode (from Material.MinFilter).

getSheenRoughnessAnisotropy()

Get the sheen roughness anisotropy mode of the material.

Returns:

The anisotropy mode (from Material.Anisotropy).

Return type:

str

setSheenRoughnessAnisotropy(anisotropy)

Set the sheen roughness anisotropy mode of the material.

Parameters:

anisotropy (str) – The anisotropy mode (from Material.Anisotropy).

getSheenColor()

Get the sheen color of the material.

Returns:

The sheen color.

Return type:

Color

setSheenColor(color)

Set the sheen color of the material.

Parameters:

color (Color) – The sheen color.

getSheenColorMap()

Get the sheen color map of the material.

Returns:

The sheen color texture.

Return type:

Texture

setSheenColorMap(texture)

Set the sheen color map of the material.

Parameters:

texture (Texture) – Texture to use or nil.

getSheenColorWrapS()

Get the sheen color wrap S mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setSheenColorWrapS(mode)

Set the sheen color wrap S mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getSheenColorWrapT()

Get the sheen color wrap T mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setSheenColorWrapT(mode)

Set the sheen color wrap T mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getSheenColorMagFilter()

Get the sheen color magnification filter of the material.

Returns:

The magnification filter mode (from Material.MagFilter).

Return type:

str

setSheenColorMagFilter(filter)

Set the sheen color magnification filter of the material.

Parameters:

filter (str) – The magnification filter mode (from Material.MagFilter).

getSheenColorMinFilter()

Get the sheen color minification filter of the material.

Returns:

The minification filter mode (from Material.MinFilter).

Return type:

str

setSheenColorMinFilter(filter)

Set the sheen color minification filter of the material.

Parameters:

filter (str) – The minification filter mode (from Material.MinFilter).

getSheenColorAnisotropy()

Get the sheen color anisotropy mode of the material.

Returns:

The anisotropy mode (from Material.Anisotropy).

Return type:

str

setSheenColorAnisotropy(anisotropy)

Set the sheen color anisotropy mode of the material.

Parameters:

anisotropy (str) – The anisotropy mode (from Material.Anisotropy).

getNormalMap()

Get the normal map texture of the material.

Returns:

The normal map texture.

Return type:

Texture

setNormalMap(texture)

Set the normal map texture of the material.

Parameters:

texture (Texture) – The texture to use or nil.

getNormalScale()

Get the normal scale value of the material.

Returns:

The normal scale value.

Return type:

number

setNormalScale(scale)

Set the normal scale value of the material.

Parameters:

scale (number) – The normal scale value.

getNormalType()

Get the normal type of the material.

Returns:

The normal type (from Material.NormalType).

Return type:

str

setNormalType(type)

Set the normal type of the material.

Parameters:

type (str) – The normal type (from Material.NormalType).

getNormalWrapS()

Get the normal wrap S mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setNormalWrapS(mode)

Set the normal wrap S mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getNormalWrapT()

Get the normal wrap T mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setNormalWrapT(mode)

Set the normal wrap T mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getNormalMagFilter()

Get the normal magnification filter of the material.

Returns:

The magnification filter mode (from Material.MagFilter).

Return type:

str

setNormalMagFilter(filter)

Set the normal magnification filter of the material.

Parameters:

filter (str) – The magnification filter mode (from Material.MagFilter).

getNormalMinFilter()

Get the normal minification filter of the material.

Returns:

The minification filter mode (from Material.MinFilter).

Return type:

str

setNormalMinFilter(filter)

Set the normal minification filter of the material.

Parameters:

filter (str) – The minification filter mode (from Material.MinFilter).

getNormalAnisotropy()

Get the normal anisotropy mode of the material.

Returns:

The anisotropy mode (from Material.Anisotropy).

Return type:

str

setNormalAnisotropy(anisotropy)

Set the normal anisotropy mode of the material.

Parameters:

anisotropy (str) – The anisotropy mode (from Material.Anisotropy).

getRoughnessIntensity()

Get the roughness intensity value of the material.

Returns:

The roughness intensity value.

Return type:

number

setRoughnessIntensity(amount)

Set the roughness intensity value of the material.

Parameters:

amount (number) – The roughness intensity value.

getRoughnessMap()

Get the roughness map texture of the material.

Returns:

The roughness map texture.

Return type:

Texture

setRoughnessMap(texture)

Set the roughness map texture of the material.

Parameters:

texture (Texture) – The texture to use or nil.

getRoughnessWrapS()

Get the roughness wrap S mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setRoughnessWrapS(mode)

Set the roughness wrap S mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getRoughnessWrapT()

Get the roughness wrap T mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setRoughnessWrapT(mode)

Set the roughness wrap T mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getRoughnessMagFilter()

Get the roughness magnification filter of the material.

Returns:

The magnification filter mode (from Material.MagFilter).

Return type:

str

setRoughnessMagFilter(filter)

Set the roughness magnification filter of the material.

Parameters:

filter (str) – The magnification filter mode (from Material.MagFilter).

getRoughnessMinFilter()

Get the roughness minification filter of the material.

Returns:

The minification filter mode (from Material.MinFilter).

Return type:

str

setRoughnessMinFilter(filter)

Set the roughness minification filter of the material.

Parameters:

filter (str) – The minification filter mode (from Material.MinFilter).

getRoughnessAnisotropy()

Get the roughness anisotropy mode of the material.

Returns:

The anisotropy mode (from Material.Anisotropy).

Return type:

str

setRoughnessAnisotropy(anisotropy)

Set the roughness anisotropy mode of the material.

Parameters:

anisotropy (str) – The anisotropy mode (from Material.Anisotropy).

getMetalnessIntensity()

Get the metalness intensity value of the material.

Returns:

The metalness intensity value.

Return type:

number

setMetalnessIntensity(amount)

Set the metalness intensity value of the material.

Parameters:

amount (number) – The metalness intensity value.

getMetalnessMap()

Get the metalness map texture of the material.

Returns:

The metalness map texture.

Return type:

Texture

setMetalnessMap(texture)

Set the metalness map texture of the material.

Parameters:

texture (Texture) – The texture to use or nil.

getMetalnessWrapS()

Get the metalness wrap S mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setMetalnessWrapS(mode)

Set the metalness wrap S mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getMetalnessWrapT()

Get the metalness wrap T mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setMetalnessWrapT(mode)

Set the metalness wrap T mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getMetalnessMagFilter()

Get the metalness magnification filter of the material.

Returns:

The magnification filter mode (from Material.MagFilter).

Return type:

str

setMetalnessMagFilter(filter)

Set the metalness magnification filter of the material.

Parameters:

filter (str) – The magnification filter mode (from Material.MagFilter).

getMetalnessMinFilter()

Get the metalness minification filter of the material.

Returns:

The minification filter mode (from Material.MinFilter).

Return type:

str

setMetalnessMinFilter(filter)

Set the metalness minification filter of the material.

Parameters:

filter (str) – The minification filter mode (from Material.MinFilter).

getMetalnessAnisotropy()

Get the metalness anisotropy mode of the material.

Returns:

The anisotropy mode (from Material.Anisotropy).

Return type:

str

setMetalnessAnisotropy(anisotropy)

Set the metalness anisotropy mode of the material.

Parameters:

anisotropy (str) – The anisotropy mode (from Material.Anisotropy).

getSpecularIntensity()

Get the specular intensity value of the material.

Returns:

The specular intensity value.

Return type:

number

setSpecularIntensity(amount)

Set the specular intensity value of the material.

Parameters:

amount (number) – The specular intensity value.

getSpecularIntensityMap()

Get the specular intensity map texture of the material.

Returns:

The specular intensity map texture.

Return type:

Texture

setSpecularIntensityMap(texture)

Set the specular intensity map texture of the material.

Parameters:

texture (Texture) – The texture to use or nil.

getSpecularIntensityWrapS()

Get the specular intensity wrap S mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setSpecularIntensityWrapS(mode)

Set the specular intensity wrap S mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getSpecularIntensityWrapT()

Get the specular intensity wrap T mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setSpecularIntensityWrapT(mode)

Set the specular intensity wrap T mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getSpecularIntensityMagFilter()

Get the specular intensity magnification filter of the material.

Returns:

The magnification filter mode (from Material.MagFilter).

Return type:

str

setSpecularIntensityMagFilter(filter)

Set the specular intensity magnification filter of the material.

Parameters:

filter (str) – The magnification filter mode (from Material.MagFilter).

getSpecularIntensityMinFilter()

Get the specular intensity minification filter of the material.

Returns:

The minification filter mode (from Material.MinFilter).

Return type:

str

setSpecularIntensityMinFilter(filter)

Set the specular intensity minification filter of the material.

Parameters:

filter (str) – The minification filter mode (from Material.MinFilter).

getSpecularIntensityAnisotropy()

Get the specular intensity anisotropy mode of the material.

Returns:

The anisotropy mode (from Material.Anisotropy).

Return type:

str

setSpecularIntensityAnisotropy(anisotropy)

Set the specular intensity anisotropy mode of the material.

Parameters:

anisotropy (str) – The anisotropy mode (from Material.Anisotropy).

getSpecularColor()

Get the specular color of the material.

Returns:

The specular color value.

Return type:

str

setSpecularColor(color)

Set the specular color of the material.

Parameters:

color (str) – The specular color value.

getSpecularColorMap()

Get the specular color map texture of the material.

Returns:

The specular color map texture.

Return type:

Texture

setSpecularColorMap(texture)

Set the specular color map texture of the material.

Parameters:

texture (Texture) – The texture to use or nil.

getSpecularColorWrapS()

Get the specular color wrap S mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setSpecularColorWrapS(mode)

Set the specular color wrap S mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getSpecularColorWrapT()

Get the specular color wrap T mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setSpecularColorWrapT(mode)

Set the specular color wrap T mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getSpecularColorMagFilter()

Get the specular color magnification filter of the material.

Returns:

The magnification filter mode (from Material.MagFilter).

Return type:

str

setSpecularColorMagFilter(filter)

Set the specular color magnification filter of the material.

Parameters:

filter (str) – The magnification filter mode (from Material.MagFilter).

getSpecularColorMinFilter()

Get the specular color minification filter of the material.

Returns:

The minification filter mode (from Material.MinFilter).

Return type:

str

setSpecularColorMinFilter(filter)

Set the specular color minification filter of the material.

Parameters:

filter (str) – The minification filter mode (from Material.MinFilter).

getSpecularColorAnisotropy()

Get the specular color anisotropy mode of the material.

Returns:

The anisotropy mode (from Material.Anisotropy).

Return type:

str

setSpecularColorAnisotropy(anisotropy)

Set the specular color anisotropy mode of the material.

Parameters:

anisotropy (str) – The anisotropy mode (from Material.Anisotropy).

getAmbientOcclusionMap()

Get the ambient occlusion map texture of the material.

Returns:

The ambient occlusion map texture.

Return type:

Texture

setAmbientOcclusionMap(texture)

Set the ambient occlusion map texture of the material.

Parameters:

texture (Texture) – The texture to use or nil.

getAmbientOcclusionIntensity()

Get the ambient occlusion intensity of the material.

Returns:

The ambient occlusion intensity value.

Return type:

str

setAmbientOcclusionIntensity(amount)

Set the ambient occlusion intensity of the material.

Parameters:

amount (str) – The ambient occlusion intensity value.

getAmbientOcclusionWrapS()

Get the ambient occlusion wrap S mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setAmbientOcclusionWrapS(mode)

Set the ambient occlusion wrap S mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getAmbientOcclusionWrapT()

Get the ambient occlusion wrap T mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setAmbientOcclusionWrapT(mode)

Set the ambient occlusion wrap T mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getAmbientOcclusionMagFilter()

Get the ambient occlusion magnification filter of the material.

Returns:

The magnification filter mode (from Material.MagFilter).

Return type:

str

setAmbientOcclusionMagFilter(filter)

Set the ambient occlusion magnification filter of the material.

Parameters:

filter (str) – The magnification filter mode (from Material.MagFilter).

getAmbientOcclusionMinFilter()

Get the ambient occlusion minification filter of the material.

Returns:

The minification filter mode (from Material.MinFilter).

Return type:

str

setAmbientOcclusionMinFilter(filter)

Set the ambient occlusion minification filter of the material.

Parameters:

filter (str) – The minification filter mode (from Material.MinFilter).

getAmbientOcclusionAnisotropy()

Get the ambient occlusion anisotropy mode of the material.

Returns:

The anisotropy mode (from Material.Anisotropy).

Return type:

str

setAmbientOcclusionAnisotropy(anisotropy)

Set the ambient occlusion anisotropy mode of the material.

Parameters:

anisotropy (str) – The anisotropy mode (from Material.Anisotropy).

getClearcoatLevel()

Get the clearcoat level of the material.

Returns:

The clearcoat level value.

Return type:

str

setClearcoatLevel(amount)

Set the clearcoat level of the material.

Parameters:

amount (str) – The clearcoat level value.

getClearcoatMap()

Get the clearcoat map texture of the material.

Returns:

The clearcoat map texture.

Return type:

Texture

setClearcoatMap(texture)

Set the clearcoat map texture of the material.

Parameters:

texture (Texture) – The texture to use or nil.

getClearcoatWrapS()

Get the clearcoat wrap S mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setClearcoatWrapS(mode)

Set the clearcoat wrap S mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getClearcoatWrapT()

Get the clearcoat wrap T mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setClearcoatWrapT(mode)

Set the clearcoat wrap T mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getClearcoatMagFilter()

Get the clearcoat magnification filter of the material.

Returns:

The magnification filter mode (from Material.MagFilter).

Return type:

str

setClearcoatMagFilter(filter)

Set the clearcoat magnification filter of the material.

Parameters:

filter (str) – The magnification filter mode (from Material.MagFilter).

getClearcoatMinFilter()

Get the clearcoat minification filter of the material.

Returns:

The minification filter mode (from Material.MinFilter).

Return type:

str

setClearcoatMinFilter(filter)

Set the clearcoat minification filter of the material.

Parameters:

filter (str) – The minification filter mode (from Material.MinFilter).

getClearcoatAnisotropy()

Get the clearcoat anisotropy mode of the material.

Returns:

The anisotropy mode (from Material.Anisotropy).

Return type:

str

setClearcoatAnisotropy(anisotropy)

Set the clearcoat anisotropy mode of the material.

Parameters:

anisotropy (str) – The anisotropy mode (from Material.Anisotropy).

getClearcoatNormalMap()

Get the clearcoat normal map texture of the material.

Returns:

The clearcoat normal map texture.

Return type:

Texture

setClearcoatNormalMap(texture)

Set the clearcoat normal map texture of the material.

Parameters:

texture (Texture) – The texture to use or nil.

getClearcoatNormalScale()

Get the clearcoat normal scale of the material.

Returns:

The clearcoat normal scale value.

Return type:

number

setClearcoatNormalScale(scale)

Set the clearcoat normal scale of the material.

Parameters:

scale (number) – The clearcoat normal scale value.

getClearcoatNormalWrapS()

Get the clearcoat normal wrap S mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setClearcoatNormalWrapS(mode)

Set the clearcoat normal wrap S mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getClearcoatNormalWrapT()

Get the clearcoat normal wrap T mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setClearcoatNormalWrapT(mode)

Set the clearcoat normal wrap T mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getClearcoatNormalMagFilter()

Get the clearcoat normal magnification filter of the material.

Returns:

The magnification filter mode (from Material.MagFilter).

Return type:

str

setClearcoatNormalMagFilter(filter)

Set the clearcoat normal magnification filter of the material.

Parameters:

filter (str) – The magnification filter mode (from Material.MagFilter).

getClearcoatNormalMinFilter()

Get the clearcoat normal minification filter of the material.

Returns:

The minification filter mode (from Material.MinFilter).

Return type:

str

setClearcoatNormalMinFilter(filter)

Set the clearcoat normal minification filter of the material.

Parameters:

filter (str) – The minification filter mode (from Material.MinFilter).

getClearcoatNormalAnisotropy()

Get the clearcoat normal anisotropy mode of the material.

Returns:

The anisotropy mode (from Material.Anisotropy).

Return type:

str

setClearcoatNormalAnisotropy(anisotropy)

Set the clearcoat normal anisotropy mode of the material.

Parameters:

anisotropy (str) – The anisotropy mode (from Material.Anisotropy).

getClearcoatRoughnessMap()

Get the clearcoat roughness map texture of the material.

Returns:

The clearcoat roughness map texture.

Return type:

Texture

setClearcoatRoughnessMap(texture)

Set the clearcoat roughness map texture of the material.

Parameters:

texture (Texture) – The texture to use or nil.

getClearcoatRoughnessIntensity()

Get the clearcoat roughness intensity of the material.

Returns:

The clearcoat roughness intensity value.

Return type:

number

setClearcoatRoughnessIntensity(amount)

Set the clearcoat roughness intensity of the material.

Parameters:

amount (number) – The clearcoat roughness intensity value.

getClearcoatRoughnessWrapS()

Get the clearcoat roughness wrap S mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setClearcoatRoughnessWrapS(mode)

Set the clearcoat roughness wrap S mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getClearcoatRoughnessWrapT()

Get the clearcoat roughness wrap T mode of the material.

Returns:

The wrap mode (from Material.WrapMode).

Return type:

str

setClearcoatRoughnessWrapT(mode)

Set the clearcoat roughness wrap T mode of the material.

Parameters:

mode (str) – The wrap mode (from Material.WrapMode).

getClearcoatRoughnessMagFilter()

Get the clearcoat roughness magnification filter of the material.

Returns:

The magnification filter mode (from Material.MagFilter).

Return type:

str

setClearcoatRoughnessMagFilter(filter)

Set the clearcoat roughness magnification filter of the material.

Parameters:

filter (str) – The magnification filter mode (from Material.MagFilter).

getClearcoatRoughnessMinFilter()

Get the clearcoat roughness minification filter of the material.

Returns:

The minification filter mode (from Material.MinFilter).

Return type:

str

setClearcoatRoughnessMinFilter(filter)

Set the clearcoat roughness minification filter of the material.

Parameters:

filter (str) – The minification filter mode (from Material.MinFilter).

getClearcoatRoughnessAnisotropy()

Get the clearcoat roughness anisotropy mode of the material.

Returns:

The anisotropy mode (from Material.Anisotropy).

Return type:

str

setClearcoatRoughnessAnisotropy(anisotropy)

Set the clearcoat roughness anisotropy mode of the material.

Parameters:

anisotropy (str) – The anisotropy mode (from Material.Anisotropy).

getReflectivity()

Get the reflectivity of the material.

Returns:

The reflectivity value.

Return type:

number

setReflectivity(value)

Set the reflectivity of the material.

Parameters:

value (number) – The reflectivity value.

getIndexOfRefraction()

Get the index of refraction of the material.

Returns:

The index of refraction value.

Return type:

number

setIndexOfRefraction(value)

Set the index of refraction of the material.

Parameters:

value (number) – The index of refraction value.

getEnvironmentMap()

Get the environment map texture of the material.

Returns:

The environment map texture.

Return type:

Texture

setEnvironmentMap(texture)

Set the environment map texture of the material.

Parameters:

texture (Texture) – The texture to use or nil.

getEnvironmentIntensity()

Get the environment intensity of the material.

Returns:

The environment intensity value.

Return type:

number

setEnvironmentIntensity(amount)

Set the environment intensity of the material.

Parameters:

amount (number) – The environment intensity value.

getThickness()

Get the thickness value of the material.

Returns:

The thickness value.

Return type:

number

setThickness(amount)

Set the thickness value of the material.

Parameters:

amount (number) – The thickness value.

getThicknessMap()

Get the thickness map texture of the material.

Returns:

The thickness map texture.

Return type:

str

setThicknessMap(texture)

Set the thickness map texture of the material.

Parameters:

texture (str) – The texture to use as the thickness map.

getThicknessWrapS()

Get the wrap mode for the S axis of the thickness texture.

Returns:

The wrap mode for the S axis.

Return type:

str

setThicknessWrapS(mode)

Set the wrap mode for the S axis of the thickness texture.

Parameters:

mode (str) – The wrap mode for the S axis.

getThicknessWrapT()

Get the wrap mode for the T axis of the thickness texture.

Returns:

The wrap mode for the T axis.

Return type:

str

setThicknessWrapT(mode)

Set the wrap mode for the T axis of the thickness texture.

Parameters:

mode (str) – The wrap mode for the T axis.

getThicknessMagFilter()

Get the magnification filter for the thickness texture.

Returns:

The magnification filter.

Return type:

str

setThicknessMagFilter(filter)

Set the magnification filter for the thickness texture.

Parameters:

filter (str) – The magnification filter.

getThicknessMinFilter()

Get the minification filter for the thickness texture.

Returns:

The minification filter.

Return type:

str

setThicknessMinFilter(filter)

Set the minification filter for the thickness texture.

Parameters:

filter (str) – The minification filter.

getThicknessAnisotropy()

Get the anisotropy level for the thickness texture.

Returns:

The anisotropy level.

Return type:

str

setThicknessAnisotropy(anisotropy)

Set the anisotropy level for the thickness texture.

Parameters:

anisotropy (str) – The anisotropy level.

getDisplacementMap()

Get the displacement map texture of the material.

Returns:

The displacement map texture.

Return type:

str

setDisplacementMap(texture)

Set the displacement map texture of the material.

Parameters:

texture (str) – The texture to use as the displacement map.

getDisplacementScale()

Get the displacement scale of the material.

Returns:

The displacement scale.

Return type:

number

setDisplacementScale(amount)

Set the displacement scale of the material.

Parameters:

amount (number) – The displacement scale value.

getDisplacementBias()

Get the displacement bias of the material.

Returns:

The displacement bias.

Return type:

number

setDisplacementBias(amount)

Set the displacement bias of the material.

Parameters:

amount (number) – The displacement bias value.

getDisplacementWrapS()

Get the wrap mode for the S axis of the displacement texture.

Returns:

The wrap mode for the S axis.

Return type:

str

setDisplacementWrapS(mode)

Set the wrap mode for the S axis of the displacement texture.

Parameters:

mode (str) – The wrap mode for the S axis.

getDisplacementWrapT()

Get the wrap mode for the T axis of the displacement texture.

Returns:

The wrap mode for the T axis.

Return type:

str

setDisplacementWrapT(mode)

Set the wrap mode for the T axis of the displacement texture.

Parameters:

mode (str) – The wrap mode for the T axis.

getDisplacementMagFilter()

Get the magnification filter for the displacement texture.

Returns:

The magnification filter.

Return type:

str

setDisplacementMagFilter(filter)

Set the magnification filter for the displacement texture.

Parameters:

filter (str) – The magnification filter.

getDisplacementMinFilter()

Get the minification filter for the displacement texture.

Returns:

The minification filter.

Return type:

str

setDisplacementMinFilter(filter)

Set the minification filter for the displacement texture.

Parameters:

filter (str) – The minification filter.

getDisplacementAnisotropy()

Get the anisotropy level for the displacement texture.

Returns:

The anisotropy level.

Return type:

str

setDisplacementAnisotropy(anisotropy)

Set the anisotropy level for the displacement texture.

Parameters:

anisotropy (str) – The anisotropy level.

getTransmissionMap()

Get the transmission map texture of the material.

Returns:

The transmission map texture.

Return type:

str

setTransmissionMap(texture)

Set the transmission map texture of the material.

Parameters:

texture (str) – The texture to use as the transmission map.

getTransmission()

Get the transmission value of the material.

Returns:

The transmission value.

Return type:

number

setTransmission(amount)

Set the transmission value of the material.

Parameters:

amount (number) – The transmission value to set.

getTransmissionWrapS()

Get the wrap mode for the S axis of the transmission texture.

Returns:

The wrap mode for the S axis.

Return type:

str

setTransmissionWrapS(mode)

Set the wrap mode for the S axis of the transmission texture.

Parameters:

mode (str) – The wrap mode for the S axis.

getTransmissionWrapT()

Get the wrap mode for the T axis of the transmission texture.

Returns:

The wrap mode for the T axis.

Return type:

str

setTransmissionWrapT(mode)

Set the wrap mode for the T axis of the transmission texture.

Parameters:

mode (str) – The wrap mode for the T axis.

getTransmissionMagFilter()

Get the magnification filter for the transmission texture.

Returns:

The magnification filter.

Return type:

str

setTransmissionMagFilter(filter)

Set the magnification filter for the transmission texture.

Parameters:

filter (str) – The magnification filter.

getTransmissionMinFilter()

Get the minification filter for the transmission texture.

Returns:

The minification filter.

Return type:

str

setTransmissionMinFilter(filter)

Set the minification filter for the transmission texture.

Parameters:

filter (str) – The minification filter.

getTransmissionAnisotropy()

Get the anisotropy level for the transmission texture.

Returns:

The anisotropy level.

Return type:

str

setTransmissionAnisotropy(anisotropy)

Set the anisotropy level for the transmission texture.

Parameters:

anisotropy (str) – The anisotropy level.

getBlending()

Get the blending status of the material.

Returns:

True if blending is enabled, false otherwise.

Return type:

boolean

setBlending(enabled)

Enable or disable blending for the material.

Parameters:

enabled (boolean) – True to enable blending, false to disable.

getBlendSource()

Get the source factor for the blending equation.

Returns:

The source factor for the blending equation. (from Material.BlendSource)

Return type:

str

setBlendSource(value)

Set the source factor for the blending equation.

Parameters:

value (str) – The source factor for the blending equation. (from Material.BlendSource)

getBlendDest()

Get the destination factor for the blending equation.

Returns:

The destination factor for the blending equation. (from Material.BlendDest)

Return type:

str

setBlendDest(value)

Set the destination factor for the blending equation.

Parameters:

value (str) – The destination factor for the blending equation. (from Material.BlendDest)

getBlendEquation()

Get the equation to use for blending.

Returns:

The equation used for blending. (from Material.BlendEquation)

Return type:

str

setBlendEquation(value)

Set the equation to use for blending.

Parameters:

value (str) – The equation to use for blending. (from Material.BlendEquation)

getDepthTest()

Get the depth test status for the material.

Returns:

True if depth testing is enabled, false otherwise.

Return type:

boolean

setDepthTest(enabled)

Enable or disable depth testing for the material.

Parameters:

enabled (boolean) – True to enable depth testing, false to disable.

getDepthMode()

Get the depth mode for the material.

Returns:

The current depth mode of the material.

Return type:

str

setDepthMode(mode)

Set the depth mode for the material.

Parameters:

mode (str) – The desired depth mode for the material.

getCulling()

Get the culling mode for the material.

Returns:

The current culling mode of the material.

Return type:

str

setCulling(mode)

Set the culling mode for the material.

Parameters:

mode (str) – The desired culling mode for the material.

getPoints()

Check if the material is set to render as points.

Returns:

True if the material renders as points, false otherwise.

Return type:

boolean

setPoints(enabled)

Enable or disable rendering the material as points.

Parameters:

enabled (boolean) – True to render as points, false otherwise.

getPointSize()

Get the point size for the material when rendering as points.

Returns:

The point size used when rendering as points.

Return type:

number

setPointSize(size)

Set the point size for the material when rendering as points.

Parameters:

size (number) – The desired point size.

getPointSizeAttenuation()

Check if point size attenuation is enabled for the material.

Returns:

True if point size attenuation is enabled, false otherwise.

Return type:

boolean

setPointSizeAttenuation(enabled)

Enable or disable point size attenuation for the material.

Parameters:

enabled (boolean) – True to enable point size attenuation, false to disable.

getVertexColors()

Check if point vertex colors are enabled for the material.

Returns:

True if vertex colors are enabled, false otherwise.

Return type:

boolean

setVertexColors(enabled)

Enable or disable vertex colors for the material.

Parameters:

enabled (boolean) – True to enable vertex colors, false to disable.

getFlatShading()

Check if flat shading is enabled for the material.

Returns:

True if flat shading is enabled, false otherwise.

Return type:

boolean

setFlatShading(enabled)

Enable or disable flat shading for the material.

Parameters:

enabled (boolean) – True to enable flat shading, false to disable.

Examples