eradiate.scenes.bsdfs.CheckerboardBSDF#

class eradiate.scenes.bsdfs.CheckerboardBSDF(id='bsdf', reflectance_a=0.2, reflectance_b=0.8, scale_pattern=2.0)[source]#

Bases: eradiate.scenes.bsdfs._core.BSDF

Checkerboard BSDF [checkerboard].

This class defines a Lambertian BSDF textured with a checkerboard pattern.

Parameters
  • id (str, optional, default: "bsdf") – User-defined object identifier.

  • reflectance_a (Spectrum or dict or float, default: 0.2) – Reflectance spectrum. Can be initialised with a dictionary processed by spectrum_factory.

  • reflectance_b (Spectrum or dict or float, default: 0.8) – Reflectance spectrum. Can be initialised with a dictionary processed by spectrum_factory.

  • scale_pattern (float, default: 2.0) – Scaling factor for the checkerboard pattern. The higher the value, the more checkboard patterns will fit on the surface to which this reflection model is attached.

Fields
  • id (str or None) – User-defined object identifier.

  • reflectance_a (Spectrum) – Reflectance spectrum.

  • reflectance_b (Spectrum) – Reflectance spectrum.

  • scale_pattern (float) – Scaling factor for the checkerboard pattern.

kernel_dict(ctx)[source]#

Return a dictionary suitable for kernel scene configuration.

Parameters

ctx (KernelDictContext) – A context data structure containing parameters relevant for kernel dictionary generation.

Returns

KernelDict – Kernel dictionary which can be loaded as a Mitsuba object.