Material — Aspose.3D FOSS for .NET

Navnerum: Aspose.ThreeD.Shading

LambertMaterial

Klassisk kun-diffus materiale med grundlæggende overfladeegenskaber.

Example

ExampleExampleExampleExample
Namestringhent/indstilMaterialenavn
AmbientVector4hent/indstilOmgivende farve
DiffuseVector4hent/indstilDiffus farve
EmissiveVector4hent/indstilUdstødende farve
ReflectiveVector4hent/indstilReflekterende farve
Reflectivityfloathent/indstilRefleksionsfaktor
Transparencyfloathent/indstilGennemsigtighedsfaktor
IndexOfRefractionfloathent/indstilBrydningsindeks
Texturestringget/setSti 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

ExampleExampleExampleExample
SpecularVector4hent/indstilSpekulær højlysfarve
Shininessfloathent/indstilGlans eksponent
SpecularPowerfloathent/indstilSpekulæ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

ExampleExampleExampleExample
Namestringhent/indstilMaterialenavn
BaseColorVector4hent/indstilBasisfarve (albedo)
Metallicfloathent/indstilMetalisk faktor (0–1)
Roughnessfloathent/indstilRughedsfaktor (0–1)
Occlusionfloathent/indstilAmbient occlusion-faktor
BaseColorTexturestringhent/indstilBasisfarve tekstursti
MetallicRoughnessTexturestringhent/indstilKombineret metalisk/ruhed tekstur
NormalTexturestringhent/indstilNormal map tekstursti
EmissiveTexturestringhent/indstilEmissiv tekstursti
OcclusionTexturestringhent/indstilOcclusion 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;

Se også

 Dansk