Material — Aspose.3D FOSS for .NET
Navnerum: Aspose.ThreeD.Shading
LambertMaterial
Klassisk kun-diffus materiale med grundlæggende overfladeegenskaber.
Example
| Example | Example | Example | Example |
|---|---|---|---|
Name | string | hent/indstil | Materialenavn |
Ambient | Vector4 | hent/indstil | Omgivende farve |
Diffuse | Vector4 | hent/indstil | Diffus farve |
Emissive | Vector4 | hent/indstil | Udstødende farve |
Reflective | Vector4 | hent/indstil | Reflekterende farve |
Reflectivity | float | hent/indstil | Refleksionsfaktor |
Transparency | float | hent/indstil | Gennemsigtighedsfaktor |
IndexOfRefraction | float | hent/indstil | Brydningsindeks |
Texture | string | get/set | Sti til teksturfil |
using Aspose.ThreeD.Shading;
var material = new LambertMaterial("Wood");
material.Diffuse = new Vector4(0.6f, 0.4f, 0.2f, 1.0f);PhongMaterial
Example LambertMaterial med spekulære højlys.
Yderligere egenskaber
| Example | Example | Example | Example |
|---|---|---|---|
Specular | Vector4 | hent/indstil | Spekulær højlysfarve |
Shininess | float | hent/indstil | Glans eksponent |
SpecularPower | float | hent/indstil | Spekulær styrke |
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-materiale brugt af glTF 2.0 og andre PBR-kompatible formater.
Example
| Example | Example | Example | Example |
|---|---|---|---|
Name | string | hent/indstil | Materialenavn |
BaseColor | Vector4 | hent/indstil | Basisfarve (albedo) |
Metallic | float | hent/indstil | Metalisk faktor (0–1) |
Roughness | float | hent/indstil | Rughedsfaktor (0–1) |
Occlusion | float | hent/indstil | Ambient occlusion-faktor |
BaseColorTexture | string | hent/indstil | Basisfarve tekstursti |
MetallicRoughnessTexture | string | hent/indstil | Kombineret metalisk/ruhed tekstur |
NormalTexture | string | hent/indstil | Normal map tekstursti |
EmissiveTexture | string | hent/indstil | Emissiv tekstursti |
OcclusionTexture | string | hent/indstil | Occlusion tekstursti |
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;