Expand description
A material used to render this model.
Fields
id: u32The Material’s ID. Corresponds to an index in the palette.
properties: DictProperties of the material, mapped by property name.
Implementations
sourceimpl Material
impl Material
sourcepub fn material_type(&self) -> Option<&str>
pub fn material_type(&self) -> Option<&str>
The _type field, if present
sourcepub fn refractive_index(&self) -> Option<f32>
pub fn refractive_index(&self) -> Option<f32>
The _ior field associated with the material
sourcepub fn low_dynamic_range_scale(&self) -> Option<f32>
pub fn low_dynamic_range_scale(&self) -> Option<f32>
The ‘_ldr’ field associated with the material. This is a ‘hack’ factor
to scale emissive materials visually by so they look less bright when
rendered. I.e. this blends between the actual color of the resp.
voxel (low_dynamic_range_scale = 0) and its pure diffuse color
(low_dynamic_range_scale = 1)
sourcepub fn ri(&self) -> Option<f32>
pub fn ri(&self) -> Option<f32>
The ‘_ri’ field associated with the material (appears to just be 1 + _ior)
sourcepub fn attenuation(&self) -> Option<f32>
pub fn attenuation(&self) -> Option<f32>
The _att field associated with the glass material.
This is the falloff that models the optiocal density of the medium.
sourcepub fn radiant_flux(&self) -> Option<f32>
pub fn radiant_flux(&self) -> Option<f32>
The _flux field associated with the emissive material.
sourcepub fn opacity(&self) -> Option<f32>
pub fn opacity(&self) -> Option<f32>
The _alpha field associated with the material.
This is the alpha/blending value that is used to blend the voxel with the background (compositing related, has no relation to physics).
sourcepub fn transparency(&self) -> Option<f32>
pub fn transparency(&self) -> Option<f32>
The _trans field associated with the material.
This is the transparency of the material. I.e. a physical property,
honours refractive_index(), see above.
sourcepub fn density(&self) -> Option<f32>
pub fn density(&self) -> Option<f32>
The _d field associated with the cloud material.
This is the density of the volumetric medium.
sourcepub fn media(&self) -> Option<f32>
pub fn media(&self) -> Option<f32>
The _media field associated with the material.
This corresponds to the cloud material.
sourcepub fn media_type(&self) -> Option<&str>
pub fn media_type(&self) -> Option<&str>
The _media_type field associated with the material.
Corresponds to the type of cloud: absorb, scatter, emissive,
subsurface scattering