Meta_StdMaterial
Module: Metanodes / Definitions
A StdMaterial describes a standard material that can be applied to numerous 3D objects (geogroups, visuals, etc)
#include <meta_importables.hpp>
Public Types
Type | Name |
---|---|
enum | BlendMode { Blend_None, Blend_Alpha, Blend_Add, Blend_Mult } Values for Idx_BlendMode. |
enum | IDX { Idx_Diffuse, Idx_Ambient, Idx_Specular, Idx_Emissive, Idx_Reflectivity, Idx_Smoothness, Idx_Metalness, Idx_Opacity, Idx_DiffuseMap, Idx_AmbientMap, Idx_ReflectivityMap, Idx_EmissiveMap, Idx_EnvironmentMap, Idx_SmoothnessMap, Idx_MetalnessMap, Idx_OpacityMap, Idx_NormalMap, Idx_BumpMap, Idx_TwoSidedLighting, Idx_Fresnel, Idx_MapMatrix, Idx_EmissiveIntensity, Idx_BumpScale, Idx_BlendMode, Idx_AlphaTest, Idx_AlphaTestRef, Idx_Enabled, Idx_LineWidth, Idx_ReliefMapping, Idx_LinePattern, Idx_Lit, Idx_AlphaToCoverage, Idx_HalfLambert, Idx_AmbientMapChannel, Idx_ReflectivityMapChannel, Idx_SmoothnessMapChannel, Idx_MetalnessMapChannel, Idx_InvertSmoothness, Idx_PreviewShape } Property index. |
enum | LinePatterns { FullLine = 0x0001FFFF, NoLine = 0x00010000, DoubleDashed = 0x00010F0F, DashedLine = 0x000100FF } Values for Idx_LinePattern. |
enum | TextureChannels { TextureChannel_Red = 0, TextureChannel_Green = 1, TextureChannel_Blue = 2, TextureChannel_Alpha = 3 } |
Public Types Documentation
enum BlendMode
Enumerator | Value | Description |
---|---|---|
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 ) |
Values for Idx_BlendMode.
enum IDX
Enumerator | Value | Description |
---|---|---|
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 |
Property index.
enum LinePatterns
Enumerator | Value | Description |
---|---|---|
FullLine | 0x0001FFFF | Symbols - C: "LinePatternFullLine" , Lua: __StdMaterial_LinePatternFullLine |
NoLine | 0x00010000 | Symbols - C: "LinePatternNoLine" , Lua: __StdMaterial_LinePatternNoLine |
DoubleDashed | 0x00010F0F | Symbols - C: "LinePatternDoubleDashed" , Lua: __StdMaterial_LinePatternDoubleDashed |
DashedLine | 0x000100FF | Symbols - C: "LinePatternDashedLine" , Lua: __StdMaterial_LinePatternDashedLine |
Values for Idx_LinePattern.
enum TextureChannels
Enumerator | Value | Description |
---|---|---|
TextureChannel_Red | 0 | |
TextureChannel_Green | 1 | |
TextureChannel_Blue | 2 | |
TextureChannel_Alpha | 3 |