pyvale.render.riley module¶
Riley renderer adapter using Riley’s native public mesh and shader API.
- class Riley(config, output_dir=None)[source]¶
Bases:
IRenderer3DRender native Riley meshes through pyvale’s common scene container.
Riley owns its complete mesh and shader representation. Construct meshes with
riley.Mesh, including its texture, nodal field, or analytic function shader settings, then place them inScene3D.- Parameters:
config (
riley.RasterConfig) – Actual Riley raster configuration passed directly toriley.raster().output_dir (
pathlib.PathorNone, optional) – Directory to which Riley writes requested output.Nonepreserves Riley’s default output behaviour.
- 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=True, supports_psf=True)¶
- __init__(config, output_dir=None)[source]¶
Create a renderer around a concrete Riley raster configuration.
- verify_input(scene)[source]¶
Verify native Riley meshes and common cameras before rasterisation.
- Parameters:
scene (
Scene3D) – Scene containing native Riley meshes and no explicit lights.- Raises:
RenderInputError – If configuration, mesh, camera, or lighting input is unsupported.
- to_riley_camera(camera)[source]¶
Convert one common perspective camera to a Riley camera.
Native
riley.Camerainstances are returned unchanged so scenes may mix cameras built through the render API with cameras loaded directly from Riley. SciPy reports Euler angles in X, Y, Z order, whereas Riley stores its camera angles in Z, Y, X order, so this adapter reverses their storage order at the API boundary.- Parameters:
camera (
Cameraorriley.Camera) – Input camera to convert.- Returns:
riley.Camera– Native Riley camera instance.
- to_riley_mesh(mesh)[source]¶
Convert one common mesh to a native Riley mesh.
Native
riley.Meshinstances are returned unchanged so scenes may mix meshes built through the render API with meshes built directly through Riley.- Parameters:
mesh (
Mesh3Dorriley.Mesh) – Input mesh to convert.- Returns:
riley.Mesh– Native Riley mesh instance.- Raises:
TypeError – If mesh shader is unsupported.