dichromatic_render — SPECULAR reflectance op

数据种类:normalmaprgbimage

调用:import specularity; specularity.dichromatic_render(normals, albedo_rgb=(0.8, 0.55, 0.35), light=(0.3, 0.2, 1.0), illuminant_rgb=(1.0, 1.0, 1.0), view=(0.0, 0.0, 1.0), specular=0.25, model='blinn_phong', shininess=32.0, roughness=0.3, f0=0.04, ambient=0.0)(或 opsspecular.get("dichromatic_render"))

用法

二色性模型的正向:渲染一个已知高光,以便据此检验分离结果。→ (H, W, 3)。

> 以下的详细说明为原文 —— 摘要与标题已翻译。

`I = albedo_rgb * max(n.l, 0) + specular * lobe(n) * illuminant_unit`, the

body term coming straight from :func:photometric.render_lambertian (called,

not re-implemented, so the two modules cannot drift apart in convention) and

the interface term carrying the illuminant colour, which is what makes

the image obey the dichromatic model exactly.

*albedo_rgb* may be a single `(3,)` colour — the single-material case that

:func:specular_diffuse_split handles without help — or an `(H, W, 3)`

map, which is the textured case that needs `body_rgb` passed to the split.

*model* selects the lobe: `"blinn_phong"` (*shininess*) or

`"microfacet"` (*roughness*, *f0*). Both are available on purpose: the

separation operators must be blind to the lobe shape, and swapping the model

is how that is tested rather than asserted.

This is a shading model, not light transport. No interreflection, no

cast shadow, no subsurface term, no occlusion between pixels — the same

boundary :mod:visiondesign draws. Its purpose is a synthetic image whose

decomposition is known exactly.

Raises `ValueError`: geometry problems as in

:func:brdf_blinn_phong; *albedo_rgb* is neither `(3,)` nor

`(H, W, 3)`; *specular* or *ambient* is negative, non-finite, a string or

a bool; *model* is not in :data:BRDF_MODELS.

详细使用指南

specular_photometric 族使用指南

参考(示例数据・文献)

• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。

• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。

• 算法的正典(作者・年份)与用途见上面的族使用指南

可运行的示例(实际调用该算子并已验证的样例)

specular_photometricpy -3.11 examples/specular_photometric.py

类型可衔接的下一个算子(可接受 rgbimage 作为输入)

specular_diffuse_split · specular_coefficient_map · specular_free_transform · illuminant_from_dichromatic_planes

同类别(reflectance)

brdf_blinn_phong · brdf_microfacet


*Provenance: specularity.py — SPECULAR 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.