Material — Aspose.3D FOSS for .NET

Namespace: Aspose.ThreeD.Shading

LambertMaterial

Classic diffuse-only material with basic surface properties.

Properties

NameTypeAccessDescription
Namestringget/setMaterial name
AmbientVector4get/setAmbient colour
DiffuseVector4get/setDiffuse colour
EmissiveVector4get/setEmissive colour
ReflectiveVector4get/setReflective colour
Reflectivityfloatget/setReflectivity factor
Transparencyfloatget/setTransparency factor
IndexOfRefractionfloatget/setIndex of refraction
Texturestringget/setTexture file path
using Aspose.ThreeD.Shading;

var material = new LambertMaterial("Wood");
material.Diffuse = new Vector4(0.6f, 0.4f, 0.2f, 1.0f);

PhongMaterial

Extends LambertMaterial with specular highlights.

Additional Properties

NameTypeAccessDescription
SpecularVector4get/setSpecular highlight colour
Shininessfloatget/setShininess exponent
SpecularPowerfloatget/setSpecular power
var material = new PhongMaterial("Metal");
material.Specular = new Vector4(0.8f, 0.8f, 0.8f, 1.0f);
material.Shininess = 50.0f;

PbrMaterial

Physically Based Rendering material used by glTF 2.0 and other PBR-capable formats.

Properties

NameTypeAccessDescription
Namestringget/setMaterial name
BaseColorVector4get/setBase colour (albedo)
Metallicfloatget/setMetallic factor (0–1)
Roughnessfloatget/setRoughness factor (0–1)
Occlusionfloatget/setAmbient occlusion factor
BaseColorTexturestringget/setBase colour texture path
MetallicRoughnessTexturestringget/setCombined metallic/roughness texture
NormalTexturestringget/setNormal map texture path
EmissiveTexturestringget/setEmissive texture path
OcclusionTexturestringget/setOcclusion texture path
var material = new PbrMaterial("Gold");
material.BaseColor = new Vector4(1.0f, 0.8f, 0.2f, 1.0f);
material.Metallic = 0.9f;
material.Roughness = 0.1f;

See Also