Meta_StdMaterial

A StdMaterial describes a standard material that can be applied to numerous 3D objects (geogroups, visuals, etc)

Public Types


Values for Idx_BlendMode.

Blend_None

No alpha blending. Opacity related options are ignored (Symbols - C: "BlendNone", Lua: __StdMaterial_BlendNone)

Blend_Alpha

Alpha blending (Symbols - C: "BlendAlpha", Lua: __StdMaterial_BlendAlpha)

Blend_Add

Additive blending (Symbols - C: "BlendAdditive", Lua: __StdMaterial_BlendAdditive)

Blend_Mult

Multiplicative blending (Symbols - C: "BlendMultiplicative", Lua: __StdMaterial_BlendMultiplicative)


enum IDX

Property index.

Idx_Diffuse

vec3f - Constant diffuse colour; RGB 0.0 to 1.0

Idx_Ambient

float - Ambient scalar.

Idx_Specular

vec3f - Constant specular colour; RGB 0.0 to 1.0

Idx_Emissive

vec3f - Constant emissive colour; RGB 0.0 to 1.0

Idx_Reflectivity

float - Constant which modulates the colour sampled from the reflection map before adding to result.

Idx_Smoothness

float - Constant smoothness value (0=minimum exponent, 1=maximum exponent).

Idx_Metalness

float - Constant metalness value (0=not metal, 1=metal).

Idx_Opacity

float - Constant opacity value (0=fully transparent, 1=fully opaque).

Idx_DiffuseMap

link - Texture providing per-pixel diffuse colour. Alpha is used to modulate Idx_Opacity value unless Idx_OpacityMap is present.

Idx_AmbientMap

link - Texture providing per-pixel ambient colour.

Idx_ReflectivityMap

link - Texture providing per-pixel specular colour. Alpha is used to modulate Idx_Smoothness value unless Idx_SmoothnessMap is present.

Idx_EmissiveMap

link - Texture providing per-pixel emissive colour. Adds on to Idx_Emissive value.

Idx_EnvironmentMap

link - Texture providing per-pixel reflection colour.

Idx_SmoothnessMap

link - Texture providing per-pixel smoothness, modulates Idx_Smoothness value.

Idx_MetalnessMap

link - Texture providing per-pixel metalness, modulates Idx_Metalness value.

Idx_OpacityMap

link - Texture providing per-pixel opacity, modulates Idx_Opacity value.

Idx_NormalMap

link - Texture providing per-pixel object-space normal vector (XYZ scaled and biased into RGB).

Idx_BumpMap

link - Texture providing per-pixel tangent-space normal vector (XYZ scaled and biased into RGB).

Idx_TwoSidedLighting

bool - Tf true, back faces are lit using the inverted normal (which results in an expensive branch in the shader).

Idx_Fresnel

Unused.

Idx_MapMatrix

mat4f - Transformation matrix for the texture coordinates

Idx_EmissiveIntensity

float - Constant emissive intensity.

Idx_BumpScale

float - Constant bump scale.

Idx_BlendMode

BlendMode (int) - Blend mode

Idx_AlphaTest

bool - Enables alpha testing - required for any blend mode other than "None"

Idx_AlphaTestRef

float - Determines the level at what point in an opacity map is it counted as transparent or not.

Idx_Enabled

bool - When disabled, objects with this material are not rendered

Idx_LineWidth

float - Width of any lines drawn with this material

Idx_ReliefMapping

Whether or not relief mapping is enabled.

Idx_LinePattern

LinePatterns (int) - Sets line drawing pattern (factor and pattern combined)

Idx_Lit

bool - if true (default) the material is affected by scene lighting, if false it isn't (only emits light).

Idx_AlphaToCoverage

bool - Use the alpha of this material for a screen-door transparency effect (Note: MSAA must be enabled)

Idx_HalfLambert

bool - Use special diffuse lighting to prevent the rear of an object losing its shape and looking too flat

Idx_AmbientMapChannel

int - Specifies which channel of the ambient map contains the ambient values, allowing a single RGB/RGBA texture to be shared between several maps.

Idx_ReflectivityMapChannel

int - Specifies which channel of the reflectivity map contains the reflectivity values, allowing a single RGB/RGBA texture to be shared between several maps.

Idx_SmoothnessMapChannel

int - Specifies which channel of the smoothness map contains the smoothness values, allowing a single RGB/RGBA texture to be shared between several maps.

Idx_MetalnessMapChannel

int - Specifies which channel of the metalness map contains the metalness values, allowing a single RGB/RGBA texture to be shared between several maps.

Idx_InvertSmoothness

bool - Inverts smoothness and smoothness map values, enabling use of a roughness map.

Idx_PreviewShape

link - the model used for previewing the material


Values for Idx_LinePattern.

FullLine

Symbols - C: "LinePatternFullLine", Lua: __StdMaterial_LinePatternFullLine

NoLine

Symbols - C: "LinePatternNoLine", Lua: __StdMaterial_LinePatternNoLine

DoubleDashed

Symbols - C: "LinePatternDoubleDashed", Lua: __StdMaterial_LinePatternDoubleDashed

DashedLine

Symbols - C: "LinePatternDashedLine", Lua: __StdMaterial_LinePatternDashedLine


TextureChannel_Red
TextureChannel_Green
TextureChannel_Blue
TextureChannel_Alpha

No Results.

Getting StartedArchitectureBest PracticesHow ToAdvanced TopicsChangelogvrtreevrtree_cppvtCoreCoreForeign Function InterfaceMetanodesMigrationsObserversPropertiesSettingsTreeUtilitiesAPI DefinitionsVR ExchangePluginsLua API