Material¶
This page contains classes defined in hakowan.material module.
Declarative surface and hair material channels.
Material
dataclass
¶
Bases: Channel
Material base class.
Attributes:
| Name | Type | Description |
|---|---|---|
two_sided |
bool
|
Whether to render both sides of the surface (default: False). |
back_side |
Material | None
|
An independent material for the back face of each facet
(default: None). When set, the front face uses this material's
owning material and the back face uses |
Source code in hakowan/grammar/channel/material/material.py
Diffuse
dataclass
¶
Bases: Material
Diffuse material.
Attributes:
| Name | Type | Description |
|---|---|---|
reflectance |
TextureLike
|
Diffuse reflectance (i.e. base color) texture (default: 0.5). |
Source code in hakowan/grammar/channel/material/material.py
Conductor
dataclass
¶
Bases: Material
Conductor material.
Attributes:
| Name | Type | Description |
|---|---|---|
material |
str
|
Conductor material name based on Mitsuba preset. |
Source code in hakowan/grammar/channel/material/material.py
RoughConductor
dataclass
¶
Bases: Conductor
Rough conductor material.
Attributes:
| Name | Type | Description |
|---|---|---|
distribution |
Literal['beckmann', 'ggx', 'phong']
|
Microfacet distribution
(default: |
alpha |
ScalarTextureLike
|
Roughness value (default: 0.1). |
Source code in hakowan/grammar/channel/material/material.py
Plastic
dataclass
¶
Bases: Material
Plastic material.
Attributes:
| Name | Type | Description |
|---|---|---|
diffuse_reflectance |
TextureLike
|
Diffuse reflectance (i.e. base color) texture (default: 0.5). |
specular_reflectance |
ScalarTextureLike
|
Specular reflectance texture (default: 1.0). |
Source code in hakowan/grammar/channel/material/material.py
RoughPlastic
dataclass
¶
Bases: Plastic
Rough plastic material.
Attributes:
| Name | Type | Description |
|---|---|---|
distribution |
Literal['beckmann', 'ggx', 'phong']
|
Microfacet distribution
(default: |
alpha |
float
|
Roughness value (default: 0.1). |
Source code in hakowan/grammar/channel/material/material.py
Principled
dataclass
¶
Bases: Material
Principled material.
Attributes:
| Name | Type | Description |
|---|---|---|
color |
TextureLike
|
Base color texture (default: 0.5). |
roughness |
ScalarTextureLike
|
Roughness texture (default: 0.5). |
metallic |
ScalarTextureLike
|
Metallic texture (default: 0.0). |
anisotropic |
float
|
Anisotropy amount (default: 0.0). |
spec_trans |
float
|
Specular transmission / transparency (default: 0.0). |
eta |
float
|
Interior index of refraction (default: 1.5). |
spec_tint |
float
|
Specular tint towards base color (default: 0.0). |
sheen |
float
|
Sheen amount (default: 0.0). |
sheen_tint |
float
|
Sheen tint towards base color (default: 0.0). |
flatness |
float
|
Blend between thin and volumetric subsurface scattering (default: 0.0). |
Source code in hakowan/grammar/channel/material/material.py
ThinPrincipled
dataclass
¶
Bases: Principled
Thin Principled material.
Attributes:
| Name | Type | Description |
|---|---|---|
diff_trans |
float
|
Diffuse transmission amount (default: 0.0). |
Source code in hakowan/grammar/channel/material/material.py
Dielectric
dataclass
¶
Bases: Material
Dielectric material.
Attributes:
| Name | Type | Description |
|---|---|---|
int_ior |
str | float
|
Interior index of refraction (default: "bk7"). |
ext_ior |
str | float
|
Exterior index of refraction (default: "air"). |
medium |
Medium | None
|
Medium (default: None). |
specular_reflectance |
float
|
Specular reflectance (default: 1.0). |
specular_transmittance |
float
|
Specular transmittance (default: 1.0). |
Source code in hakowan/grammar/channel/material/material.py
ThinDielectric
dataclass
¶
RoughDielectric
dataclass
¶
Bases: Dielectric
Rough dielectric material.
Attributes:
| Name | Type | Description |
|---|---|---|
distribution |
Literal['beckmann', 'ggx', 'phong']
|
Microfacet distribution
(default: |
alpha |
ScalarTextureLike
|
Roughness value (default: 0.1). |
Source code in hakowan/grammar/channel/material/material.py
Hair
dataclass
¶
Bases: Material
Hair material.
Color is controlled either physically, via the two melanin pigment
concentrations (natural hair palette: black → brown → red → blonde), or
directly via color with an RGB / named color for uniform fur of any
hue. color overrides the melanin parametrization when set.
For richer fur, colors can be mixed procedurally along and across strands:
root_color / tip_color give a root-to-tip gradient (dark undercoat →
lighter tips), and color_variation adds per-strand random brightness
jitter. These are evaluated in the hair shader (Blender), so they compose
with the guide/child hairs for free.
Note: a data-driven color (e.g. ScalarField) is not supported by the
hair renderers and falls back to melanin with a warning — the hair BSDF
darkens/tints colors, which is poor for reading data anyway. To color fur
by an attribute, use a non-Hair material (e.g. Diffuse) on the fur
strands.
Attributes:
| Name | Type | Description |
|---|---|---|
eumelanin |
float
|
Eumelanin (dark/brown pigment) concentration (default: 1.3).
Ignored when |
pheomelanin |
float
|
Pheomelanin (reddish-yellow pigment) concentration
(default: 0.2). Ignored when |
color |
TextureLike | None
|
Direct RGB / named hair color (overrides melanin). |
root_color |
ColorLike | None
|
Strand-root color of a root-to-tip gradient. Setting
|
tip_color |
ColorLike | None
|
Strand-tip color of the root-to-tip gradient. |
color_variation |
float
|
Per-strand random brightness jitter in |