Python API#

Ignis (module)#

Ignis python interface

Enums#

  • CPUArchitecture:

    Enum holding supported CPU architectures

    • ARM

    • X86

    • Unknown

  • GPUArchitecture:

    Enum holding supported GPU architectures

    • AMD

    • Intel

    • Nvidia

    • Unknown

  • LogLevel:

    Enum holding verbosity level for logging

    • Debug

    • Info

    • Warning

    • Error

    • Fatal

Static Methods#

  • flushLog() -> None:

    Flush internal logs

  • loadFromFile(arg: str | os.PathLike) -> RuntimeWrap:

    Load a scene from file and generate a default runtime

  • loadFromFile(arg0: str | os.PathLike, arg1: RuntimeOptions) -> RuntimeWrap:

    Load a scene from file and generate a runtime with given options

  • loadFromScene(arg: Scene) -> RuntimeWrap:

    Generate a default runtime from an already loaded scene

  • loadFromScene(arg0: Scene, arg1: str | os.PathLike) -> RuntimeWrap:

    Generate a default runtime from an already loaded scene with directory for external resources

  • loadFromScene(arg0: Scene, arg1: RuntimeOptions) -> RuntimeWrap:

    Generate a runtime with given options from an already loaded scene

  • loadFromScene(arg0: Scene, arg1: str | os.PathLike, arg2: RuntimeOptions) -> RuntimeWrap:

    Generate a runtime with given options from an already loaded scene with directory for external resources

  • loadFromString(arg: str) -> RuntimeWrap:

    Load a scene from a string and generate a default runtime

  • loadFromString(arg0: str, arg1: str | os.PathLike) -> RuntimeWrap:

    Load a scene from a string with directory for external resources and generate a default runtime

  • loadFromString(arg0: str, arg1: RuntimeOptions) -> RuntimeWrap:

    Load a scene from a string and generate a runtime with given options

  • loadFromString(arg0: str, arg1: str | os.PathLike, arg2: RuntimeOptions) -> RuntimeWrap:

    Load a scene from a string with directory for external resources and generate a runtime with given options

  • saveExr(arg0: str | os.PathLike, arg1: CPUImage) -> bool:

    Save an OpenEXR image to the filesystem

  • saveExr(arg0: str | os.PathLike, arg1: CPUArray2d_Float32) -> bool:

    Save an OpenEXR grayscale image to the filesystem

  • setQuiet(arg: bool) -> None:

    Set True to disable all messages from the framework

  • setVerbose(arg: bool) -> None:

    Set True to enable all messages from the framework, else only important messages will be shown. Shortcut for setVerbose(LogLevel.Debug)

  • setVerbose(arg: LogLevel) -> None:

    Set the level of verbosity for the logger

BoundingBox#

BoundingBox

Properties#

  • Center:

    Returns Vec3

  • Diameter:

    Returns Vec3

  • HalfArea:

    Returns float

  • IsEmpty:

    Returns bool

  • Max:

    Returns Vec3

  • Min:

    Returns Vec3

  • Volume:

    Returns float

Static Methods#

Methods#

  • extend(self, arg: BoundingBox) -> BoundingBox:

    No documentation

  • extend(self, arg: Vec3) -> BoundingBox:

    No documentation

  • inflate(self, arg: float) -> None:

    No documentation

  • isInside(self, arg: Vec3) -> bool:

    No documentation

  • isOverlapping(self, arg: BoundingBox) -> bool:

    No documentation

  • overlap(self, arg: BoundingBox) -> BoundingBox:

    No documentation

CameraOrientation#

General camera orientation

Properties#

  • Dir:

    Direction the camera is facing

  • Eye:

    Origin of the camera

  • Up:

    Vector defining the up of the camera

DenoiserSettings#

Settings for the denoiser

Properties#

  • Enabled:

    Enable or disable the denoiser

  • HighQuality:

    Set True if denoiser should be high quality or interactive

  • Prefilter:

    Set True if normal and albedo layer should be prefiltered

Ray#

Single ray traced into the scene

Properties#

  • Direction:

    Direction of the ray

  • Origin:

    Origin of the ray

  • Range:

    Range (tmin, tmax) of the ray

Runtime#

Renderer runtime allowing control of simulation and access to results

Properties#

  • AOVs:

    Returns list[str]

  • Camera:

    Returns str

  • ColorParameters:

    Returns dict[str, Vec4]

  • FloatParameters:

    Returns dict[str, float]

  • FrameCount:

    Returns int

  • FramebufferHeight:

    Returns int

  • FramebufferWidth:

    Returns int

  • InitialCameraOrientation:

    Returns CameraOrientation

  • IntParameters:

    Returns dict[str, int]

  • IterationCount:

    Returns int

  • RenderStartTime:

    Returns int

  • SPI:

    Returns int

  • SampleCount:

    Returns int

  • SceneBoundingBox:

    Returns BoundingBox

  • Seed:

    Returns int

  • StringParameters:

    Returns dict[str, str]

  • Target:

    Returns Target

  • Technique:

    Returns str

  • VectorParameters:

    Returns dict[str, Vec3]

Methods#

  • clearFramebuffer(self) -> None:

    No documentation

  • clearFramebuffer(self, arg: str) -> None:

    No documentation

  • getFramebufferForDevice(self, aov: str = '') -> Image:

    No documentation

  • getFramebufferForHost(self, aov: str = '') -> CPUImage:

    No documentation

  • incFrameCount(self) -> None:

    No documentation

  • reset(self) -> None:

    Reset internal counters etc. This should be used if data (like camera orientation) has changed. Frame counter will NOT be reset

  • saveFramebuffer(self, arg: str | os.PathLike) -> bool:

    No documentation

  • setCameraOrientation(self, arg: CameraOrientation) -> None:

    No documentation

  • setParameter(self, arg0: str, arg1: int) -> None:

    No documentation

  • setParameter(self, arg0: str, arg1: float) -> None:

    No documentation

  • setParameter(self, arg0: str, arg1: Vec3) -> None:

    No documentation

  • setParameter(self, arg0: str, arg1: Vec4) -> None:

    No documentation

  • setParameter(self, arg0: str, arg1: str) -> None:

    No documentation

  • step(self, ignoreDenoiser: bool = False) -> None:

    No documentation

  • tonemap(self, arg: CPUArray2d_UInt32) -> None:

    No documentation

  • trace(self, arg: list[Ray]) -> list[Vec3]:

    No documentation

RuntimeOptions#

Options to customize runtime behaviour

Properties#

  • AcquireStats:

    Set True if statistical data should be acquired while rendering

  • Denoiser:

    Settings for the denoiser

  • DumpShader:

    Set True if most shader should be dumped into the filesystem

  • DumpShaderFull:

    Set True if all shader should be dumped into the filesystem

  • EnableTonemapping:

    Set True if any of the two tonemapping functions tonemap and imageinfo is to be used

  • OverrideCamera:

    Type of camera to use instead of the one used by the scene

  • OverrideFilmSize:

    Type of film size to use instead of the one used by the scene

  • OverrideTechnique:

    Type of technique to use instead of the one used by the scene

  • SPI:

    The requested sample per iteration. Can be 0 to set automatically

  • Seed:

    Seed for the random generators

  • Target:

    The target device

  • WarnUnused:

    Set False if you want to ignore warnings about unused property entries

Static Methods#

  • makeDefault(trace: bool = False) -> RuntimeOptions:

    No documentation

RuntimeWrap#

Wrapper around the runtime used for proper runtime loading and shutdown

Properties#

Methods#

  • shutdown(self) -> None:

    No documentation

Scene#

Class representing a whole scene

Properties#

Static Methods#

  • loadFromFile(path: str | os.PathLike, flags: int = 13303) -> Scene:

    No documentation

  • loadFromString(str: str, opt_dir: str | os.PathLike = '', flags: int = 13303) -> Scene:

    No documentation

Methods#

  • addBSDF(self, arg0: str, arg1: SceneObject) -> None:

    No documentation

  • addConstantEnvLight(self) -> None:

    No documentation

  • addEntity(self, arg0: str, arg1: SceneObject) -> None:

    No documentation

  • addFrom(self, arg: Scene) -> None:

    No documentation

  • addLight(self, arg0: str, arg1: SceneObject) -> None:

    No documentation

  • addMedium(self, arg0: str, arg1: SceneObject) -> None:

    No documentation

  • addShape(self, arg0: str, arg1: SceneObject) -> None:

    No documentation

  • addTexture(self, arg0: str, arg1: SceneObject) -> None:

    No documentation

  • bsdf(self, arg: str) -> SceneObject:

    No documentation

  • entity(self, arg: str) -> SceneObject:

    No documentation

  • light(self, arg: str) -> SceneObject:

    No documentation

  • medium(self, arg: str) -> SceneObject:

    No documentation

  • shape(self, arg: str) -> SceneObject:

    No documentation

  • texture(self, arg: str) -> SceneObject:

    No documentation

SceneObject#

Class representing an object in the scene

Enums#

  • Type:

    Enum holding type of scene object

    • Bsdf

    • Camera

    • Entity

    • Film

    • Light

    • Medium

    • Shape

    • Technique

    • Texture

Properties#

Methods#

  • hasProperty(self, arg: str) -> bool:

    No documentation

  • property(self, arg: str) -> SceneProperty:

    No documentation

  • setProperty(self, arg0: str, arg1: SceneProperty) -> None:

    No documentation

SceneParser#

Parser for standard JSON and glTF scene description

Enums#

  • Flags:

    Flags modifying parsing behaviour and allowing partial scene loads

    • F_LoadCamera

    • F_LoadFilm

    • F_LoadTechnique

    • F_LoadBSDFs

    • F_LoadMedia

    • F_LoadLights

    • F_LoadTextures

    • F_LoadShapes

    • F_LoadEntities

    • F_LoadExternals

    • F_LoadAll

Methods#

  • loadFromFile(self, path: str | os.PathLike, flags: int = 13303) -> Scene:

    No documentation

  • loadFromString(self, str: str, opt_dir: str | os.PathLike = '', flags: int = 13303) -> Scene:

    No documentation

SceneProperty#

Property of an object in the scene

Enums#

  • Type:

    Enum holding type of scene property

    • None

    • Bool

    • Integer

    • Number

    • String

    • Transform

    • Vector2

    • Vector3

    • IntegerArray

    • NumberArray

Properties#

Static Methods#

Methods#

  • canBeNumber(self) -> bool:

    No documentation

  • getBool(self, def: bool = False) -> bool:

    No documentation

  • getInteger(self, def: int = 0) -> int:

    No documentation

  • getIntegerArray(self) -> list[int]:

    No documentation

  • getNumber(self, def: float = 0.0) -> float:

    No documentation

  • getNumberArray(self) -> list[float]:

    No documentation

  • getString(self, def: str = '') -> str:

    No documentation

  • getTransform(self, def: Mat4x4 = Mat4x4.Identity -> Mat4x4:

    No documentation

  • getVector2(self, def: Vec2 = Vec2(0)) -> Vec2:

    No documentation

  • getVector3(self, def: Vec3 = Vec3(0)) -> Vec3:

    No documentation

  • isValid(self) -> bool:

    No documentation

Target#

Target specification the runtime is using

Properties#

Static Methods#

  • makeCPU(arg0: int, arg1: int) -> Target:

    No documentation

  • makeGPU(arg0: GPUArchitecture, arg1: int) -> Target:

    No documentation

  • makeGeneric() -> Target:

    No documentation

  • makeSingle() -> Target:

    No documentation

  • pickBest() -> Target:

    No documentation

  • pickCPU() -> Target:

    No documentation

  • pickGPU(device: int = 0) -> Target:

    No documentation

Methods#

  • toString(self) -> str:

    No documentation