fresnel.material

Overview

Material

Define material properties.

Details

Materials describe the way light interacts with surfaces.

class fresnel.material.Material(solid=0, color=(0.9, 0.9, 0.9), primitive_color_mix=0, roughness=0.3, specular=0.5, spec_trans=0, metal=0)

Define material properties.

Materials control how light interacts with the geometry.

Parameters
  • solid (float) – Set to 1 to pass through a solid color, regardless of the light and view angle.

  • color ((3, ) numpy.ndarray of float32)) – Linear material color.

  • primitive_color_mix (float) – Set to 1 to use the color provided in the Geometry, 0 to use the color specified in the Material, or a value in the range [0, 1] to mix the two colors.

  • roughness (float) – Roughness of the material. Nominally in the range [0.1, 1].

  • specular (float) – Control the strength of the specular highlights. Nominally in the range [0, 1].

  • spec_trans (float) – Control the amount of specular light transmission. In the range [0, 1].

  • metal (float) – Set to 0 for dielectric material, or 1 for metal. Intermediate values interpolate between the two.

See also

Tutorials:

Note

Colors are in the linearized color space. Use fresnel.color.linear to convert standard sRGB colors into this space.

property color
  • Linear material color.

Type

((3, ) numpy.ndarray of float32))

property metal

Set to 0 for dielectric material, or 1 for metal.

Intermediate values interpolate between the two.

Type

float

property primitive_color_mix

Mix the material color with the geometry.

Set to 1 to use the color provided in the Geometry, 0 to use the color specified in the Material, or a value in the range [0, 1] to mix the two colors.

Type

float

property roughness

Roughness of the material.

Nominally in the range [0.1, 1].

Type

float

property solid

Is this material a solid color?

Set to 1 to pass through a solid color, regardless of the light and view angle.

Type

float

property spec_trans

Control the amount of specular light transmission.

In the range [0, 1].

Type

float

property specular

Control the strength of the specular highlights.

Nominally in the range [0, 1].

Type

float