Skip to content

PhysicalMaterial

Defined in: radiance/src/materials/PhysicalMaterial.ts:34

A physically based material, with the parameters of three.js’s MeshPhysicalMaterial where the meaning is the same (design record 0004).

At M2 the path tracer stores metalness, roughness, ior, transmission and specularIntensity and renders the material as a diffuse of its colour, until the principled BSDF of record 0004, step 2 reads them. The emission renders as it does for every material.

The setter of every parameter adds 1 to version.

new PhysicalMaterial(p?): PhysicalMaterial

Defined in: radiance/src/materials/PhysicalMaterial.ts:44

PhysicalMaterialParameters = {}

PhysicalMaterial

Material.constructor

readonly id: number

Defined in: radiance/src/materials/Material.ts:20

Material.id


name: string = ''

Defined in: radiance/src/materials/Material.ts:22

A name for the author. The renderer does not read it.

Material.name


readonly type: number = MATERIAL_PHYSICAL

Defined in: radiance/src/materials/PhysicalMaterial.ts:35

The scattering the kernel applies: 0 diffuse, 1 mirror, 2 physical.

Material.type


version: number = 0

Defined in: radiance/src/materials/Material.ts:24

Incremented by the setter of every parameter.

Material.version

get color(): Color

Defined in: radiance/src/materials/Material.ts:45

The fraction of light reflected, per channel.

Color

set color(value): void

Defined in: radiance/src/materials/Material.ts:48

Color

void

Material.color


get doubleSided(): boolean

Defined in: radiance/src/materials/Material.ts:63

Whether the surface gives off light from its back face too. Default false.

boolean

set doubleSided(value): void

Defined in: radiance/src/materials/Material.ts:66

boolean

void

Material.doubleSided


get emissive(): Color

Defined in: radiance/src/materials/Material.ts:54

The light the surface gives off from its front face, as radiance.

Color

set emissive(value): void

Defined in: radiance/src/materials/Material.ts:57

Color

void

Material.emissive


get emissiveIntensity(): number

Defined in: radiance/src/materials/PhysicalMaterial.ts:100

Multiplies emissive. The packer stores the product (record 0004).

number

set emissiveIntensity(value): void

Defined in: radiance/src/materials/PhysicalMaterial.ts:103

number

void


get flatShading(): boolean

Defined in: radiance/src/materials/Material.ts:76

Whether the kernel shades with the geometric normal in place of the interpolated vertex normals, as three.js’s material.flatShading does. Default false. The geometry and the hits do not change (design record 0004, “Flat shading”).

boolean

set flatShading(value): void

Defined in: radiance/src/materials/Material.ts:79

boolean

void

Material.flatShading


get ior(): number

Defined in: radiance/src/materials/PhysicalMaterial.ts:73

The index of refraction.

number

set ior(value): void

Defined in: radiance/src/materials/PhysicalMaterial.ts:76

number

void


get metalness(): number

Defined in: radiance/src/materials/PhysicalMaterial.ts:55

How much the surface is a metal, from 0 to 1.

number

set metalness(value): void

Defined in: radiance/src/materials/PhysicalMaterial.ts:58

number

void


get roughness(): number

Defined in: radiance/src/materials/PhysicalMaterial.ts:64

How rough the surface is, from 0 (polished) to 1.

number

set roughness(value): void

Defined in: radiance/src/materials/PhysicalMaterial.ts:67

number

void


get specularIntensity(): number

Defined in: radiance/src/materials/PhysicalMaterial.ts:91

The strength of the specular reflection of a dielectric, from 0 to 1.

number

set specularIntensity(value): void

Defined in: radiance/src/materials/PhysicalMaterial.ts:94

number

void


get transmission(): number

Defined in: radiance/src/materials/PhysicalMaterial.ts:82

How much light passes through the surface, from 0 to 1.

number

set transmission(value): void

Defined in: radiance/src/materials/PhysicalMaterial.ts:85

number

void