BackgroundRandomizer
Samples an HDRI background, which also drives the scene lighting.
python
from telekinesis.illusion.randomizer.randomizer_node import BackgroundRandomizer
BackgroundRandomizer(
hdris_root=None, # directory holding the HDRIs
categories=None, # HDRI categories to sample from
)Parameters
| Parameter | Type | Description |
|---|---|---|
hdris_root | Path | None | Root directory of the HDRI assets. None uses the hdris/ sub-directory of the resolved asset directory. |
categories | list[str] | None | Categories to sample from. None samples from every category. |
Available categories:
| Category | Description |
|---|---|
indoor/industrial | Factory and workshop environments. |
indoor/studio | Neutral studio lighting. |
indoor/misc | Other indoor environments. |
outdoor/day | Daylight. |
outdoor/morning | Morning light. |
outdoor/evening | Evening light. |
outdoor/night | Night. |
The catalog is built when the node is constructed. A FileNotFoundError is raised when no HDRI matches the requested categories.
Usage
python
randomizer.add_randomizer(
randomizer_node=BackgroundRandomizer(
categories=["indoor/industrial", "indoor/studio"]
),
node_name="background_randomizer",
)