Scene

class huira.rgb.Scene
__init__(self: huira._huira.rgb.Scene) → None
add_ellipsoid(self: huira._huira.rgb.Scene, x: object, y: object, z: object, name: str = '') → huira._huira.rgb.EllipsoidHandle

Add an ellipsoid geometry (accepts any distance unit)

add_mesh(*args, **kwargs)

Overloaded function.

  1. add_mesh(self: huira._huira.rgb.Scene, index_buffer: list[int], vertex_buffer: list[huira._huira.rgb.Vertex], name: str = ‘’) -> huira._huira.rgb.MeshHandle

Add a mesh from a list of indices, three per triangle, and a list of Vertex

  1. add_mesh(self: huira._huira.rgb.Scene, index_buffer: list[int], vertex_buffer: list[huira._huira.rgb.Vertex], tangent_buffer: numpy.ndarray[numpy.float64], name: str = ‘’) -> huira._huira.rgb.MeshHandle

Add a mesh from a list of indices, a list of Vertex, and a tangent buffer: each vertex’s tangent and bitangent, as an array (or nested lists) of shape (vertices, 2, 3).

  1. add_mesh(self: huira._huira.rgb.Scene, index_buffer: numpy.ndarray[numpy.int64], positions: numpy.ndarray[numpy.float64], normals: numpy.ndarray[numpy.float64], *, uvs: Optional[numpy.ndarray[numpy.float64]] = None, albedo: Optional[numpy.ndarray[numpy.float64]] = None, tangent_buffer: Optional[numpy.ndarray[numpy.float64]] = None, name: str = ‘’) -> huira._huira.rgb.MeshHandle

Add a mesh from arrays (numpy arrays, or nested lists): index_buffer, three indices per triangle, of shape (triangles, 3) or flat; and each vertex’s position and normal, of shape (vertices, 3), in the mesh’s frame. Optionally, each vertex’s texture coordinates, uvs (vertices, 2), 0 if not given; its albedo, (vertices, bins), which scales the material’s, 1 if not given; and its tangent and bitangent, tangent_buffer (vertices, 2, 3).

add_normal_texture(*args, **kwargs)

Overloaded function.

  1. add_normal_texture(self: huira._huira.rgb.Scene, image: huira._huira.Image_Vec3f, name: str = ‘’) -> huira._huira.TextureHandle_vec3

Add a normal map texture from a Vec3 image

  1. add_normal_texture(self: huira._huira.rgb.Scene, image: huira._huira.rgb.Image, name: str = ‘’) -> huira._huira.TextureHandle_vec3

Add a normal map texture from an RGB image

add_primitive(*args, **kwargs)

Overloaded function.

  1. add_primitive(self: huira._huira.rgb.Scene, geom: huira._huira.rgb.GeometryHandle, name: str = ‘’) -> huira._huira.rgb.PrimitiveHandle

Add a primitive from a geometry

  1. add_primitive(self: huira._huira.rgb.Scene, geom: huira._huira.rgb.GeometryHandle, mat: huira._huira.rgb.MaterialHandle, name: str = ‘’) -> huira._huira.rgb.PrimitiveHandle

Add a primitive from a geometry and material

  1. add_primitive(self: huira._huira.rgb.Scene, geom: huira._huira.rgb.GeometryHandle, medium: huira._huira.rgb.MediumHandle, name: str = ‘’) -> huira._huira.rgb.PrimitiveHandle

Add a primitive from a geometry and medium

  1. add_primitive(self: huira._huira.rgb.Scene, geom: huira._huira.rgb.GeometryHandle, mat: huira._huira.rgb.MaterialHandle, medium: huira._huira.rgb.MediumHandle, name: str = ‘’) -> huira._huira.rgb.PrimitiveHandle

Add a primitive from a geometry, material, and medium

add_texture(*args, **kwargs)

Overloaded function.

  1. add_texture(self: huira._huira.rgb.Scene, image: huira._huira.rgb.Image, name: str = ‘’) -> huira._huira.rgb.TextureHandle

Add a spectral texture from an image

  1. add_texture(self: huira._huira.rgb.Scene, image: huira._huira.Image_f32, name: str = ‘’) -> huira._huira.TextureHandle_float

Add a float texture from a single-channel image

  1. add_texture(self: huira._huira.rgb.Scene, image: huira._huira.Image_Vec3f, name: str = ‘’) -> huira._huira.TextureHandle_vec3

Add a Vec3 texture from a three-channel image

delete_camera_model(self: huira._huira.rgb.Scene, camera_model_handle: huira._huira.rgb.CameraModelHandle) → None
delete_constellation(self: huira._huira.rgb.Scene, constellation_handle: huira._huira.rgb.ConstellationHandle) → None

Delete a constellation; its satellites can then be placed by something else

delete_geometry(self: huira._huira.rgb.Scene, geom_handle: huira._huira.rgb.GeometryHandle) → None

Delete a geometry from the scene

delete_light(self: huira._huira.rgb.Scene, light_handle: huira._huira.rgb.LightHandle) → None
delete_model(self: huira._huira.rgb.Scene, model_handle: huira._huira.rgb.ModelHandle) → None
delete_primitive(self: huira._huira.rgb.Scene, primitive_handle: huira._huira.rgb.PrimitiveHandle) → None

Delete a primitive from the scene

delete_unresolved_object(self: huira._huira.rgb.Scene, unresolved_object_handle: huira._huira.rgb.UnresolvedObjectHandle) → None
get_camera_model(self: huira._huira.rgb.Scene, name: str) → huira._huira.rgb.CameraModelHandle

Get a camera model handle by name

get_constellation(self: huira._huira.rgb.Scene, name: str) → huira._huira.rgb.ConstellationHandle

Get a constellation handle by name

get_geometry(self: huira._huira.rgb.Scene, name: str) → huira._huira.rgb.GeometryHandle

Get a geometry handle by name

get_light(self: huira._huira.rgb.Scene, name: str) → huira._huira.rgb.LightHandle

Get a light handle by name

get_model(self: huira._huira.rgb.Scene, name: str) → huira._huira.rgb.ModelHandle

Get a model handle by name

get_primitive(self: huira._huira.rgb.Scene, name: str) → huira._huira.rgb.PrimitiveHandle

Get a primitive handle by name

get_unresolved_object(self: huira._huira.rgb.Scene, name: str) → huira._huira.rgb.UnresolvedObjectHandle

Get an unresolved object handle by name

load_dynamic_stars(self: huira._huira.rgb.Scene, star_catalog_path: os.PathLike, time: huira._huira.Time, min_magnitude: float = 100.0) → None

Load dynamic stars from a catalog file for the given observation time

load_model(self: huira._huira.rgb.Scene, file: os.PathLike, name: str = '') → huira._huira.rgb.ModelHandle

Load a model from a file

load_stars(self: huira._huira.rgb.Scene, star_catalog_path: os.PathLike, time: huira._huira.Time, min_magnitude: float = 100.0) → None

Load stars from a catalog file for the given observation time

new_bsdf_cook_torrance(self: huira._huira.rgb.Scene, name: str = '') → huira._huira.rgb.BSDFHandle

Create a Cook-Torrance BSDF

new_bsdf_hapke(self: huira._huira.rgb.Scene, h: float, B0: float, b: float, c: float, name: str = '') → huira._huira.rgb.BSDFHandle

Create a Hapke BSDF

new_bsdf_lambertian(self: huira._huira.rgb.Scene, name: str = '') → huira._huira.rgb.BSDFHandle

Create a Lambertian BSDF

new_bsdf_lommel_seeliger(self: huira._huira.rgb.Scene, name: str = '') → huira._huira.rgb.BSDFHandle

Create a Lommel-Seeliger BSDF

new_bsdf_mcewen(self: huira._huira.rgb.Scene, name: str = '') → huira._huira.rgb.BSDFHandle

Create a McEwen BSDF

new_bsdf_null(self: huira._huira.rgb.Scene, name: str = '') → huira._huira.rgb.BSDFHandle

Create a null (transparent/passthrough) BSDF

new_bsdf_oren_nayar(self: huira._huira.rgb.Scene, name: str = '') → huira._huira.rgb.BSDFHandle

Create an Oren-Nayar BSDF

new_camera_model(self: huira._huira.rgb.Scene, name: str = '') → huira._huira.rgb.CameraModelHandle

Create a new camera model and return its handle

new_constant_density_field(self: huira._huira.rgb.Scene, absorption: huira._huira.rgb.SpectralBins, scattering: huira._huira.rgb.SpectralBins, name: str = '') → huira._huira.rgb.DensityFieldHandle

Create a constant density field with the given absorption and scattering coefficients

new_constellation(self: huira._huira.rgb.Scene, unresolved_object: huira._huira.rgb.UnresolvedObjectHandle, name: str = '') → huira._huira.rgb.ConstellationHandle

Create a constellation: satellites placed by SGP4, many at once, each seen as an instance of the unresolved object given (a Lambertian sphere lit by the Sun, say). It starts empty: add satellites with its load(), from a catalog of TLEs or OMMs, or add(), from SatRecs. A satellite is placed once, by a node or by one constellation. Rendering them needs an SPK with the Earth’s ephemeris, such as de440s.bsp.

new_isotropic_phase_function(self: huira._huira.rgb.Scene, name: str = '') → huira._huira.rgb.PhaseFunctionHandle

Create an isotropic phase function

new_material(self: huira._huira.rgb.Scene, bsdf: huira._huira.rgb.BSDFHandle, name: str = '') → huira._huira.rgb.MaterialHandle

Create a new material with the specified BSDF

new_medium(self: huira._huira.rgb.Scene, density_field_handle: huira._huira.rgb.DensityFieldHandle, phase_function_handle: huira._huira.rgb.PhaseFunctionHandle, name: str = '') → huira._huira.rgb.MediumHandle

Create a new medium from a density field and phase function

new_sphere_light(*args, **kwargs)

Overloaded function.

  1. new_sphere_light(self: huira._huira.rgb.Scene, radius: huira._huira.Meter, spectral_radiance: huira._huira.rgb.SpectralWattsPerMeterSquaredSteradian, name: str = ‘’) -> huira._huira.rgb.LightHandle

Create a sphere light from spectral radiance

  1. new_sphere_light(self: huira._huira.rgb.Scene, radius: huira._huira.Meter, spectral_power: huira._huira.rgb.SpectralWatts, name: str = ‘’) -> huira._huira.rgb.LightHandle

Create a sphere light from total spectral power

  1. new_sphere_light(self: huira._huira.rgb.Scene, radius: huira._huira.Meter, total_power: huira._huira.Watt, name: str = ‘’) -> huira._huira.rgb.LightHandle

Create a sphere light from total scalar power (Watts)

new_sun_light(self: huira._huira.rgb.Scene) → huira._huira.rgb.LightHandle

Create a sun light source

new_unresolved_asteroid(*args, **kwargs)

Overloaded function.

  1. new_unresolved_asteroid(self: huira._huira.rgb.Scene, H: float, G: float, sun: huira._huira.rgb.InstanceHandle, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle

Create an unresolved asteroid from H, G magnitude parameters

  1. new_unresolved_asteroid(self: huira._huira.rgb.Scene, H: float, G: float, sun: huira._huira.rgb.InstanceHandle, albedo: huira._huira.rgb.SpectralBins, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle

Create an unresolved asteroid with spectral albedo

  1. new_unresolved_asteroid(self: huira._huira.rgb.Scene, H: float, G: float, sun: huira._huira.rgb.InstanceHandle, scalar_albedo: float, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle

Create an unresolved asteroid with scalar albedo

new_unresolved_emitter(*args, **kwargs)

Overloaded function.

  1. new_unresolved_emitter(self: huira._huira.rgb.Scene, spectral_power: huira._huira.rgb.SpectralWatts, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle

Create an unresolved emitter from spectral power

  1. new_unresolved_emitter(self: huira._huira.rgb.Scene, power: object, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle

Create an unresolved emitter from total power (any power unit)

new_unresolved_object(*args, **kwargs)

Overloaded function.

  1. new_unresolved_object(self: huira._huira.rgb.Scene, spectral_irradiance: huira._huira.rgb.SpectralWattsPerMeterSquared, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle

Create an unresolved object from spectral irradiance

  1. new_unresolved_object(self: huira._huira.rgb.Scene, irradiance: object, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle

Create an unresolved object from scalar irradiance (any irradiance unit)

new_unresolved_object_from_magnitude(*args, **kwargs)

Overloaded function.

  1. new_unresolved_object_from_magnitude(self: huira._huira.rgb.Scene, visual_magnitude: float, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle

Create an unresolved object from visual magnitude

  1. new_unresolved_object_from_magnitude(self: huira._huira.rgb.Scene, visual_magnitude: float, albedo: huira._huira.rgb.SpectralBins, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle

Create an unresolved object from visual magnitude with spectral albedo

new_unresolved_sphere(*args, **kwargs)

Overloaded function.

  1. new_unresolved_sphere(self: huira._huira.rgb.Scene, radius: object, sun: huira._huira.rgb.InstanceHandle, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle

Create an unresolved sphere (accepts any distance unit for radius)

  1. new_unresolved_sphere(self: huira._huira.rgb.Scene, radius: object, sun: huira._huira.rgb.InstanceHandle, albedo: huira._huira.rgb.SpectralBins, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle

Create an unresolved sphere with spectral albedo

  1. new_unresolved_sphere(self: huira._huira.rgb.Scene, radius: object, sun: huira._huira.rgb.InstanceHandle, scalar_albedo: float, name: str = ‘’) -> huira._huira.rgb.UnresolvedObjectHandle

Create an unresolved sphere with scalar albedo

print_camera_models(self: huira._huira.rgb.Scene) → None
print_constellations(self: huira._huira.rgb.Scene) → None
print_contents(self: huira._huira.rgb.Scene) → None
print_graph(self: huira._huira.rgb.Scene) → None
print_lights(self: huira._huira.rgb.Scene) → None
print_meshes(self: huira._huira.rgb.Scene) → None
print_models(self: huira._huira.rgb.Scene) → None
print_unresolved_objects(self: huira._huira.rgb.Scene) → None
prune_unreferenced_assets(self: huira._huira.rgb.Scene) → None

Remove any assets that are no longer referenced by the scene graph

property root
set_background_radiance(*args, **kwargs)

Overloaded function.

  1. set_background_radiance(self: huira._huira.rgb.Scene, background: huira._huira.rgb.Image) -> None

Set the background radiance from an equirectangular Image, looked up by the direction a ray leaves the scene in. With PSF convolution enabled, it is convolved with the rest of the frame as it is, and so darkens toward the frame’s edges. A 1 x 1 image is a uniform sky.

  1. set_background_radiance(self: huira._huira.rgb.Scene, background: huira._huira.rgb.SpectralBins) -> None

Set a uniform background radiance from a spectral value. With PSF convolution enabled, the sky is convolved as if it continued beyond the frame’s edges, which leaves it as it is. Only the light that geometry adds to the sky, or blocks from it, is spread by the PSF, and with nothing but sky in view the convolution is skipped.

  1. set_background_radiance(self: huira._huira.rgb.Scene, background: float) -> None

Set a uniform background radiance from its total, spread over the spectrum. See the spectral overload for how it meets the PSF convolution.

set_camera_model_name(self: huira._huira.rgb.Scene, camera_model_handle: huira._huira.rgb.CameraModelHandle, name: str) → None

Set the name of a camera model

set_constellation_name(self: huira._huira.rgb.Scene, constellation_handle: huira._huira.rgb.ConstellationHandle, name: str) → None

Set the name of a constellation

set_geometry_name(self: huira._huira.rgb.Scene, geom_handle: huira._huira.rgb.GeometryHandle, name: str) → None

Set the name of a geometry

set_light_name(self: huira._huira.rgb.Scene, light_handle: huira._huira.rgb.LightHandle, name: str) → None

Set the name of a light

set_model_name(self: huira._huira.rgb.Scene, model_handle: huira._huira.rgb.ModelHandle, name: str) → None

Set the name of a model

set_primitive_name(self: huira._huira.rgb.Scene, primitive_handle: huira._huira.rgb.PrimitiveHandle, name: str) → None

Set the name of a primitive

set_unresolved_object_name(self: huira._huira.rgb.Scene, unresolved_object_handle: huira._huira.rgb.UnresolvedObjectHandle, name: str) → None

Set the name of an unresolved object

teme_frame(self: huira._huira.rgb.Scene) → huira._huira.rgb.FrameHandle

The scene’s TEME frame, in which objects placed by their NORAD element sets go: centered on the Earth, with the axes of SGP4’s True Equator, Mean Equinox of date. Made on first use, as a child of the root, and the same frame after that; its pose is fixed. Rendering anything in it needs an SPK with the Earth’s ephemeris.

update_star_epoch(self: huira._huira.rgb.Scene, time: huira._huira.Time) → None

Update the epoch time for dynamic stars, causing their positions to be updated accordingly