gs.renderers.RayTracer#

class genesis.options.renderers.RayTracer(*, device_index: int = 0, logging_level: str = 'warning', state_limit: int = 33554432, tracing_depth: int = 32, rr_depth: int = 0, rr_threshold: float = 0.95, env_surface: Surface | None = None, env_radius: float = 1000.0, env_pos: tuple = (0.0, 0.0, 0.0), env_euler: tuple = (0.0, 0.0, 0.0), env_quat: tuple | None = None, lights: list = [{'color': (1.0, 1.0, 1.0), 'intensity': 10.0, 'pos': (0.0, 0.0, 10.0), 'radius': 4.0}], normal_diff_clamp: float = 180)[source]#

RayTracer renderer.

Note

We use a environmental sphere wrapped around the scene to render the environment map (i.e. skybox).

Parameters:
  • device_index (int, optional) – Device ID used for the raytracer. Defaults to 0.

  • logging_level (str, optional) – Logging level. Should be one of “debug”, “info”, “warning”. Defaults to “warning”.

  • state_limit (int, optional) – State limit for raytracer integrator. Defaults to 2 ** 25.

  • tracing_depth (int, optional) – Tracing depth. Defaults to 32.

  • rr_depth (int, optional) – Russian Roulette depth. Defaults to 0.

  • rr_threshold (float, optional) – Russian Roulette threshold. Defaults to 0.95.

  • env_surface (Optional[Surface], optional) – Environment surface. Defaults to None.

  • env_radius (float, optional) – Environment radius. Defaults to 1000.0.

  • env_pos (tuple, optional) – Environment position. Defaults to (0.0, 0.0, 0.0).

  • env_euler (tuple, optional) – Environment Euler angles. Defaults to (0.0, 0.0, 0.0).

  • env_quat (Optional[tuple], optional) – Environment quaternion. Defaults to None.

  • lights (list of dict, optional) – List of lights. Each light is a dictionary with keys ‘pos’, ‘color’, ‘intensity’, ‘radius’. Defaults to [{‘pos’ : (0.0, 0.0, 10.0), ‘color’ : (1.0, 1.0, 1.0), ‘intensity’ : 20.0, ‘radius’ : 4.0}].

  • normal_diff_clamp (float, optional) – Lower bound for direct face normal vs vertex normal for face normal interpolation. Range is [0, 180]. Defaults to 180.