pyvale.render.feebee module

Feebee ray tracer scene definitions and renderer scaffold.

Feebee is pyvale’s future ray tracing backend - these are stubs/placeholders that will not be implemented until Feebee is merged.

class EFeebeeMaterialType(*values)[source]

Bases: Enum

Light transport models supplied by Feebee.

UNLIT returns the shader colour without lighting. DIFFUSE, SPECULAR, and REFRACTIVE use Feebee’s ray tracing material paths.

DIFFUSE = 'diffuse'
SPECULAR = 'specular'
REFRACTIVE = 'refractive'
UNLIT = 'unlit'
class EFeebeeShading(*values)[source]

Bases: Enum

Normal interpolation methods supported by Feebee.

FLAT uses geometric normals. BLENDED uses the element specific normal interpolation used by the original ray tracer. ANGLE_AVERAGED uses angle averaged node normals for every supported surface topology.

FLAT = 'flat'
BLENDED = 'blended'
ANGLE_AVERAGED = 'angle_averaged'
class EFeebeeTextureSampler(*values)[source]

Bases: Enum

Texture filters planned for Feebee’s texture shader.

NEAREST_NEIGHBOUR = 'nearest_neighbour'
LANCZOS_2 = 'lanczos_2'
LANCZOS_3 = 'lanczos_3'
CATMULL_ROM = 'catmull_rom'
MITCHELL_NETRAVALI = 'mitchell_netravali'
BSPLINE = 'bspline'
QUINTIC_SPLINE = 'quintic_spline'
class Feebee(config=None)[source]

Bases: IRenderer3D

Prepare pyvale scenes for the forthcoming Feebee ray tracer.

The class already validates Feebee specific shader, material, and scene options before any costly scene expansion occurs. The compiled rendering backend has not yet been migrated, so render() currently raises NotImplementedError only after successful validation.

Parameters:

config (FeebeeConfig, optional) – Global options for the Feebee render request.

capabilities = RenderCapabilities(element_types=frozenset({<EElemType.QUAD9: 'quad9'>, <EElemType.TRI7: 'tri7'>, <EElemType.TRI6: 'tri6'>, <EElemType.TET4: 'tet4'>, <EElemType.QUAD8: 'quad8'>, <EElemType.QUAD4: 'quad4'>, <EElemType.HEX20: 'hex20'>, <EElemType.TRI3: 'tri3'>, <EElemType.HEX8: 'hex8'>, <EElemType.TET10: 'tet10'>, <EElemType.HEX27: 'hex27'>}), supports_lights=False, supports_camera_distortion=False, supports_psf=False)
__init__(config=None)[source]

Create a Feebee renderer with global render options.

verify_input(scene)[source]

Validate a Feebee scene without expanding geometry or rendering.

Parameters:

scene (Scene3D) – Scene containing common meshes with a FeebeeColourShader or FeebeeTextureShader.

Raises:

RenderInputError – If inputs are unsupported or invalid.

class FeebeeColourShader(colours, material=<factory>)[source]

Bases: object

Face colour shader with a Feebee material.

Parameters:
  • colours (np.ndarray) – RGB face colours array with shape (num_frames, num_elements, 3) and dtype float64. A single frame can be used for a static mesh.

  • material (FeebeeMaterial, optional) – Light transport properties applied to the face colours.

colours
material
__init__(colours, material=<factory>)
class FeebeeConfig(background_colour=<factory>, scene_refractive_index=1.0003, antialiasing_samples=1, shading=EFeebeeShading.FLAT, texture_sampler=EFeebeeTextureSampler.NEAREST_NEIGHBOUR, max_depth=None, min_refractive_depth=None, output_dir=None)[source]

Bases: object

Global options for a Feebee render request.

Parameters:
  • background_colour (np.ndarray, optional) – Linear RGB scene background array with shape (3,) and dtype float64. Defaults to (0.7, 0.7, 0.7).

  • scene_refractive_index (float, optional) – Refractive index of the medium that fills the scene. Defaults to 1.0003.

  • antialiasing_samples (int, optional) – Number of samples evaluated for every pixel. Defaults to 1.

  • shading (EFeebeeShading, optional) – Surface normal interpolation method. Defaults to EFeebeeShading.FLAT.

  • texture_sampler (EFeebeeTextureSampler, optional) – Filter used by texture shaders. Defaults to EFeebeeTextureSampler.NEAREST_NEIGHBOUR.

  • max_depth (int or None, optional) – Maximum secondary ray depth. None requests Feebee’s automatic depth selection.

  • min_refractive_depth (int or None, optional) – Minimum deterministic depth before refractive paths may terminate.

  • output_dir (pathlib.Path or None, optional) – Directory in which Feebee will write rendered image files.

background_colour
scene_refractive_index
antialiasing_samples
shading
texture_sampler
max_depth
min_refractive_depth
output_dir
__init__(background_colour=<factory>, scene_refractive_index=1.0003, antialiasing_samples=1, shading=EFeebeeShading.FLAT, texture_sampler=EFeebeeTextureSampler.NEAREST_NEIGHBOUR, max_depth=None, min_refractive_depth=None, output_dir=None)
class FeebeeMaterial(material_type=EFeebeeMaterialType.DIFFUSE, colour=<factory>, refractive_index=None, priority=0, is_shell=False, thickness=1.0)[source]

Bases: object

Material properties for one Feebee mesh shader.

Parameters:
  • material_type (EFeebeeMaterialType, optional) – Ray transport model for the mesh. Defaults to EFeebeeMaterialType.DIFFUSE.

  • colour (np.ndarray, optional) – RGB multiplier or refractive tint array with shape (3,) and dtype float64. Values are linear and non negative; values exceeding 1.0 are permitted. Defaults to np.ones(3).

  • refractive_index (float or None, optional) – Material refractive index. Required for refractive materials.

  • priority (int, optional) – Nesting priority used to resolve overlapping refractive volumes. Defaults to 0.

  • is_shell (bool, optional) – Whether the mesh represents a shell rather than a closed solid. Defaults to False.

  • thickness (float, optional) – Physical shell thickness. Used only when is_shell is true. Defaults to 1.0.

material_type
colour
refractive_index
priority
is_shell
thickness
__init__(material_type=EFeebeeMaterialType.DIFFUSE, colour=<factory>, refractive_index=None, priority=0, is_shell=False, thickness=1.0)
class FeebeeTextureShader(uvs, texture, material=<factory>)[source]

Bases: object

Texture shader with nodal UV coordinates and a Feebee material.

Parameters:
  • uvs (np.ndarray) – Nodal UV coordinate array with shape (num_nodes, 2) and dtype float64 in the normalized range [0.0, 1.0].

  • texture (np.ndarray) – Greyscale or RGB texture image array with shape (height, width) or (height, width, num_channels).

  • material (FeebeeMaterial, optional) – Light transport properties applied to sampled texture values.

uvs
texture
material
__init__(uvs, texture, material=<factory>)