fresnel.material

Overview

fresnel.material.Material

Define material properties.

Details

Materials describe the way light interacts with surfaces.

class fresnel.material.Material(solid=0, color=(0, 0, 0), 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 (numpy.ndarray or array_like) – (3, float32) - Linear RGB color of the material.

  • 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

examples/00-Basic-tutorials/02-Material-properties

Tutorial: Modifying material properties.

Note

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