pub struct Material {
    pub id: u32,
    pub properties: Dict,
}
Expand description

A material used to render this model.

Fields

id: u32

The Material’s ID. Corresponds to an index in the palette.

properties: Dict

Properties of the material, mapped by property name.

Implementations

The _type field, if present

The _weight field associated with the material

The _metal field associated with the material

The _rough field associated with the material

The _sp field associated with the material.

The _ior field associated with the material

The _emit field associated with the material

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)

The ‘_ri’ field associated with the material (appears to just be 1 + _ior)

The _att field associated with the glass material.

This is the falloff that models the optiocal density of the medium.

The _flux field associated with the emissive material.

The _g field associated with the material.

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).

The _trans field associated with the material.

This is the transparency of the material. I.e. a physical property, honours refractive_index(), see above.

The _d field associated with the cloud material.

This is the density of the volumetric medium.

The _media field associated with the material. This corresponds to the cloud material.

The _media_type field associated with the material.

Corresponds to the type of cloud: absorb, scatter, emissive, subsurface scattering

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.