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 |
bool
|
Whether to render albedo (i.e. without shading). |
depth |
bool
|
Whether to render depth. |
Source code in hakowan/setup/config.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
|
albedo
property
writable
¶
Whether to render albedo (i.e. without shading).
depth
property
writable
¶
Whether to render depth.
normal
property
writable
¶
Whether to render normal.
__add_aov(aov)
¶
Add an AOV to the integrator.
An AOV integrator is created if one does not already exist. Otherwise, the specific output variable will be added to the existing AOV integrator.
Source code in hakowan/setup/config.py
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. |