Configuration¶
This page contains class defined in the hkw.setup
module.
Config¶
Config
dataclass
¶
Configuration for rendering.
Attributes:
Name | Type | Description |
---|---|---|
sensor |
Sensor
|
Sensor settings. |
film |
Film
|
Film settings. |
sampler |
Sampler
|
Sampler settings. |
emitters |
list[Emitter]
|
Emitter settings. |
integrator |
Integrator
|
Integrator settings. |
albedo_only |
bool
|
Whether to render albedo only (i.e. without shading). |
Source code in hakowan/setup/config.py
albedo_only: bool
property
writable
¶
Whether to render albedo only (i.e. without shading).
y_down()
¶
Update configuration for y-down coordinate system.
Source code in hakowan/setup/config.py
y_up()
¶
Update configuration for y-up coordinate system.
Source code in hakowan/setup/config.py
z_down()
¶
Update configuration for z-down coordinate system.
Source code in hakowan/setup/config.py
z_up()
¶
Update configuration for z-up coordinate system.
Source code in hakowan/setup/config.py
Emitter¶
Emitter
dataclass
¶
Envmap
dataclass
¶
Bases: Emitter
Environment light (i.e. image-based lighting).
Attributes:
Name | Type | Description |
---|---|---|
filename |
Path
|
Path to the environment light image file. |
scale |
float
|
Scaling factor to be applied to the environment light. |
up |
list
|
Up vector of the environment light. |
rotation |
float
|
Rotation angle of the environment light around the up direction. |
Source code in hakowan/setup/emitter.py
Film¶
Film
dataclass
¶
Film dataclass stores specifications of the output image.
Attributes:
Name | Type | Description |
---|---|---|
width |
int
|
Width of the output image in pixels. |
height |
int
|
Height of the output image in pixels. |
file_format |
str
|
File format of the output image. |
pixel_format |
str
|
Pixel format of the output image. |
component_format |
str
|
Component format of the output image. |
crop_offset |
NDArray | None
|
Offset of the crop window in pixels. |
crop_size |
NDArray | None
|
Size of the crop window in pixels. |
Together, width
and height
specify the output image resolution.
crop_offset
and crop_size
defines a crop region. If either is None
, no cropping is performed.
file_format
, pixel_format
and component_format
are for advanced user only. The default
values should work in most cases.
Source code in hakowan/setup/film.py
Integrator¶
AOV
dataclass
¶
Bases: Integrator
Arbitrary output variable (AOV) integrator.
Attributes:
Name | Type | Description |
---|---|---|
aovs |
list[str]
|
List of AOVs to render. |
integrator |
Integrator | None
|
Integrator to use for rendering AOVs. |
Note
See Mitsuba doc for supported AOV types and other details.
Source code in hakowan/setup/integrator.py
Direct
dataclass
¶
Bases: Integrator
Direct integrator.
Attributes:
Name | Type | Description |
---|---|---|
shading_samples |
int | None
|
Number of shading samples. |
emitter_samples |
int | None
|
Number of emitter samples. |
bsdf_samples |
int | None
|
Number of BSDF samples. |
Note
See Mitsuba doc for more details.
Source code in hakowan/setup/integrator.py
Integrator
dataclass
¶
Integrator dataclass contains parameters of various rendering techniques.
Attributes:
Name | Type | Description |
---|---|---|
hide_emitters |
bool
|
Whether to hide emitters from the camera. |
Source code in hakowan/setup/integrator.py
Path
dataclass
¶
Bases: Integrator
Path integrator.
Attributes:
Name | Type | Description |
---|---|---|
max_depth |
int
|
Maximum path depth. (-1 for unlimited) |
rr_depth |
int
|
Depth at which Russian roulette starts. |
Note
This integrator should work well for most surface-based scenes. See Mitsuba doc for more details.
Source code in hakowan/setup/integrator.py
VolPath
dataclass
¶
Bases: Integrator
Volumetric path integrator.
Attributes:
Name | Type | Description |
---|---|---|
max_depth |
int
|
Maximum path depth. (-1 for unlimited) |
rr_depth |
int
|
Depth at which Russian roulette starts. |
Note
This integrator should work well for most volume-based scenes. For example, if dielectric
material is involved, VolPath
integrator sometimes produces better results than Path
integrator.
See Mitsuba doc for more details.
Source code in hakowan/setup/integrator.py
VolPathMIS
dataclass
¶
Bases: Integrator
Volumetric path integrator with spectral MIS.
Attributes:
Name | Type | Description |
---|---|---|
max_depth |
int
|
Maximum path depth. (-1 for unlimited) |
rr_depth |
int
|
Depth at which Russian roulette starts. |
Note
See Mitsuba doc for more details.
Source code in hakowan/setup/integrator.py
Sampler¶
Independent
dataclass
¶
Bases: Sampler
Independent sampler.
Note
See Mitsuba doc for more details.
Source code in hakowan/setup/sampler.py
Sampler
dataclass
¶
Sampler dataclass contains sampling-related settings.
Attributes:
Name | Type | Description |
---|---|---|
sample_count |
int
|
Number of samples per pixel. |
seed |
int
|
Seed for random number generate. |
Source code in hakowan/setup/sampler.py
Stratified
dataclass
¶
Bases: Sampler
Stratified sampler.
Attributes:
Name | Type | Description |
---|---|---|
jitter |
bool
|
Whether to jitter the samples. |
Note
See Mitsuba doc for more details.
Source code in hakowan/setup/sampler.py
Sensor¶
Orthographic
dataclass
¶
Perspective
dataclass
¶
Bases: Sensor
Perspective camera dataclass.
Attributes:
Name | Type | Description |
---|---|---|
fov |
float
|
Field of view in degrees. |
fov_axis |
str
|
Axis to which fov is applied. Can be "x" or "y" or "diagonal" or "smaller" or "larger". |
Source code in hakowan/setup/sensor.py
Sensor
dataclass
¶
Sensor dataclass contains camera-related settings.
Attributes:
Name | Type | Description |
---|---|---|
location |
list
|
Camera location in world space. |
target |
list
|
Camera look-at location in world space. |
up |
list
|
Camera up vector in world space. |
near_clip |
float
|
Near clipping plane distance. |
far_clip |
float
|
Far clipping plane distance. |
Source code in hakowan/setup/sensor.py
ThinLens
dataclass
¶
Bases: Perspective
Thin lens camera dataclass.
Attributes:
Name | Type | Description |
---|---|---|
aperture_radius |
float
|
Radius of the aperture in world space. |
focus_distance |
float
|
Distance to the focal plane in world space. |