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:
EnumLight transport models supplied by Feebee.
UNLITreturns the shader colour without lighting.DIFFUSE,SPECULAR, andREFRACTIVEuse Feebee’s ray tracing material paths.- DIFFUSE = 'diffuse'¶
- SPECULAR = 'specular'¶
- REFRACTIVE = 'refractive'¶
- UNLIT = 'unlit'¶
- class EFeebeeShading(*values)[source]¶
Bases:
EnumNormal interpolation methods supported by Feebee.
FLATuses geometric normals.BLENDEDuses the element specific normal interpolation used by the original ray tracer.ANGLE_AVERAGEDuses angle averaged node normals for every supported surface topology.- FLAT = 'flat'¶
- BLENDED = 'blended'¶
- ANGLE_AVERAGED = 'angle_averaged'¶
- class EFeebeeTextureSampler(*values)[source]¶
Bases:
EnumTexture 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:
IRenderer3DPrepare 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 raisesNotImplementedErroronly 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)¶
- verify_input(scene)[source]¶
Validate a Feebee scene without expanding geometry or rendering.
- Parameters:
scene (
Scene3D) – Scene containing common meshes with aFeebeeColourShaderorFeebeeTextureShader.- Raises:
RenderInputError – If inputs are unsupported or invalid.
- class FeebeeColourShader(colours, material=<factory>)[source]¶
Bases:
objectFace colour shader with a Feebee material.
- Parameters:
colours (
np.ndarray) – RGB face colours array with shape(num_frames, num_elements, 3)and dtypefloat64. 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:
objectGlobal options for a Feebee render request.
- Parameters:
background_colour (
np.ndarray, optional) – Linear RGB scene background array with shape(3,)and dtypefloat64. 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 toEFeebeeShading.FLAT.texture_sampler (
EFeebeeTextureSampler, optional) – Filter used by texture shaders. Defaults toEFeebeeTextureSampler.NEAREST_NEIGHBOUR.max_depth (
intorNone, optional) – Maximum secondary ray depth.Nonerequests Feebee’s automatic depth selection.min_refractive_depth (
intorNone, optional) – Minimum deterministic depth before refractive paths may terminate.output_dir (
pathlib.PathorNone, 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:
objectMaterial properties for one Feebee mesh shader.
- Parameters:
material_type (
EFeebeeMaterialType, optional) – Ray transport model for the mesh. Defaults toEFeebeeMaterialType.DIFFUSE.colour (
np.ndarray, optional) – RGB multiplier or refractive tint array with shape(3,)and dtypefloat64. Values are linear and non negative; values exceeding 1.0 are permitted. Defaults tonp.ones(3).refractive_index (
floatorNone, 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 toFalse.thickness (
float, optional) – Physical shell thickness. Used only whenis_shellis 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:
objectTexture shader with nodal UV coordinates and a Feebee material.
- Parameters:
uvs (
np.ndarray) – Nodal UV coordinate array with shape(num_nodes, 2)and dtypefloat64in 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>)¶