A3DGraphMaterialData Struct Reference

Material data. More...

Data Fields

A3DDouble m_dAmbientAlpha
 
A3DDouble m_dDiffuseAlpha
 
A3DDouble m_dEmissiveAlpha
 
A3DDouble m_dShininess
 
A3DDouble m_dSpecularAlpha
 
A3DUns32 m_uiAmbient
 
A3DUns32 m_uiDiffuse
 
A3DUns32 m_uiEmissive
 
A3DUns32 m_uiSpecular
 
A3DUns16 m_usStructSize
 

Detailed Description

Material data.

Version
2.0
Note
Use A3DGlobalGetGraphRgbColorData to get ambient, diffuse, emissive and specular colors.
The conventions described here are similar to the common scene graphics conventions described for other 3D standards such as OpenGL and DirectX.
Support for PBR (Physically-Based Rendering):
The following properties are supported:
  • base color
  • emissive color
  • normals
  • metallness
  • roughness
  • occlusion
They are all optional, and available as textures and constants.
The textures can have the following types (see m_uiMappingAttributes in A3DGraphTextureDefinitionData): Two combinations of these flags are also provided for simplicity, as these data are often packed in a single texture: If a kA3DTextureMappingMetallnessRoughnessOcclusion texture is used, its components are packed with:
  • red = occlusion
  • green = roughness
  • blue = metallness
The base color and emissive color constants are A3DGraphRgbColorData provided through the m_uiDiffuse and m_uiEmissive members of the A3DGraphMaterialData structure.
The other constants are provided as A3DMiscAttribute attached to the A3DGraphMaterialData, with the titles:
  • normals: "NormalTextureFactor"
  • metallness: "MetallicFactor"
  • roughness: "RoughnessFactor"
  • occlusion: "OcclusionTextureFactor"
Each attribute contains a single A3DMiscSingleAttributeData of type kA3DModellerAttributeTypeReal (see A3DEModellerAttributeType).

If both texture and constant are provided for a given type, the constant is used as a texel multiplier.

Field Documentation

A3DUns16 A3DGraphMaterialData::m_usStructSize

Reserved; must be initialized with A3D_INITIALIZE_DATA.

A3DUns32 A3DGraphMaterialData::m_uiAmbient

Ambient color.

A3DUns32 A3DGraphMaterialData::m_uiDiffuse

Diffuse color.

A3DUns32 A3DGraphMaterialData::m_uiEmissive

Emissive color.

A3DUns32 A3DGraphMaterialData::m_uiSpecular

Specular color.

A3DDouble A3DGraphMaterialData::m_dAmbientAlpha

Ambient alpha value. Not yet implemented. Use A3DGraphStyleData::m_ucTransparency instead.

A3DDouble A3DGraphMaterialData::m_dDiffuseAlpha

Diffuse alpha value. Not yet implemented. Use A3DGraphStyleData::m_ucTransparency instead.

A3DDouble A3DGraphMaterialData::m_dEmissiveAlpha

Emissive alpha value. Not yet implemented. Use A3DGraphStyleData::m_ucTransparency instead.

A3DDouble A3DGraphMaterialData::m_dSpecularAlpha

Specular alpha value. Not yet implemented. Use A3DGraphStyleData::m_ucTransparency instead.

A3DDouble A3DGraphMaterialData::m_dShininess

Shininess. Valid values are between 0.0 and 1.0.