wolfhece.pyvertexvectors.polygon_pbr_material
Module Contents
- wolfhece.pyvertexvectors.polygon_pbr_material._float_pair(values, default: tuple[float, float]) tuple[float, float][source]
- wolfhece.pyvertexvectors.polygon_pbr_material._float_vec3(values, default: tuple[float, float, float]) tuple[float, float, float][source]
- wolfhece.pyvertexvectors.polygon_pbr_material._float_vec4(values, default: tuple[float, float, float, float]) tuple[float, float, float, float][source]
- class wolfhece.pyvertexvectors.polygon_pbr_material.PolygonPBRMaterial[source]
Optional PBR-like material for filled polygon rendering.
The material blends texture details (albedo, normal, ORM, emissive) with global control factors (metallic_factor, roughness_factor, etc.) to achieve intuitive per-pixel variation and global override capability.
Key shading formula: - metallic: blends ORM texture metallic channel with metallic_factor
factor=0 → fully controlled by texture
factor=1 → forces fully metallic everywhere
0<factor<1 → smooth interpolation enables artistic control
roughness: scales ORM roughness channel by roughness_factor
normal: applies normalScale to detail intensity from normal texture
- metallic_factor: float = 0.0[source]
Metallic blending control [0..1]. 0 = texture determines metallic appearance. 1 = surface fully metallic. Use >0 to add metallic character to any surface.
- roughness_factor: float = 1.0[source]
Surface roughness multiplier [0.04..1.0]. Scales the ORM texture roughness channel. Values <1 = smoother, >1 = rougher. Interacts with ORM texture; pure texture control requires factor=1.
- normal_scale: float = 1.0[source]
Normal map intensity [0..∞]. Controls detail relief from normal texture. 0 = flat, 1 = full strength.
- occlusion_strength: float = 1.0[source]
Ambient occlusion intensity [0..1]. Scales ORM texture AO channel into shadow; 0 = no shadows, 1 = full.
- emissive_factor: tuple[float, float, float] = (0.0, 0.0, 0.0)[source]
Emissive RGB [0..∞]. Additive glow color. Blends with emissive texture if present.
- uv_scale: tuple[float, float] = (100.0, 100.0)[source]
Texture tiling scale. Larger = more repetitions.
- uv_offset: tuple[float, float] = (0.0, 0.0)[source]
Texture coordinate translation for animation or alignment.
- cushion_strength: float = 0.0[source]
Cushion/pillow effect strength [0..2]. Tilts surface normals near polygon edges to simulate a raised border. 0 = flat, 1 = moderate pillow, 2 = strong 3D-like bevel.
- classmethod from_dict(data: dict | None) PolygonPBRMaterial[source]
- classmethod from_json(raw: str | None) PolygonPBRMaterial[source]
- wolfhece.pyvertexvectors.polygon_pbr_material.get_pbr_presets_root(base_dir: pathlib.Path | None = None) pathlib.Path[source]
Return the expected root directory for built-in polygon PBR presets.
- wolfhece.pyvertexvectors.polygon_pbr_material.get_official_polygon_pbr_preset_names() list[str][source]
Return the two official presets highlighted in the UI.
- wolfhece.pyvertexvectors.polygon_pbr_material._make_material(*, root: pathlib.Path, preset_name: str, folder: str, metallic: float, roughness: float, normal_scale: float, occlusion_strength: float, emissive_factor: tuple[float, float, float], uv_scale: tuple[float, float], base_color_factor: tuple[float, float, float, float], with_emissive: bool = False) PolygonPBRMaterial[source]
- wolfhece.pyvertexvectors.polygon_pbr_material.get_builtin_polygon_pbr_presets(base_dir: pathlib.Path | None = None) dict[str, PolygonPBRMaterial][source]
Return the built-in polygon PBR preset catalogue.