GoochMaterial QML Type

GoochMaterial 提供了一种实现 Gooch 阴影模型的材料,在 CAD 和 CAM 应用程序中非常流行。更多

Import Statement: import Qt3D.Extras 2.9
Inherits:

Material

Status: Deprecated

属性

详细说明

Gooch 灯光模型同时使用颜色和亮度来帮助显示 3D 表面的曲率。这通常比单纯依靠亮度变化的 Phong 等模型更好。在 CAD 和 CAM 等应用中,逼真度并不是目标,在这种情况下,Gooch 阴影模型与某种轮廓边缘着墨相结合,是一种常用的解决方案。

古氏照明模型在古氏论文原文中有详细解释。古奇模型将物体的漫反射颜色与用户提供的冷色和暖色混合,产生一个颜色斜坡的端点,该斜坡根据从片段到光源的矢量与片段法线矢量之间夹角的余弦值对物体进行着色。此外,还可以在上面添加镜面高光。漫反射颜色对冷色和暖色的相对贡献分别由 alpha 和 beta 属性控制。

该材质采用了单次渲染通过的效果方法,并对每个片段进行照明。该技术适用于 OpenGL 2、OpenGL 3 或更高版本以及 OpenGL ES 2。

属性文档

alpha : real

保持当前的 Alpha 值。Gooch 着色器使用的颜色斜坡起点计算公式为 {c = cool + alpha * diffuse}。


beta : real

保存当前的贝塔值。Gooch 着色器使用的颜色斜坡的起点计算公式为 {c = 暖 + β* 扩散}。


cool : color

保存当前的冷色。


diffuse : color

保存当前的漫反射颜色。


shininess : real

当前光泽度值。光泽度值越高,高光部分越小越亮。


specular : color

当前镜面反射颜色。


warm : color

保存当前暖色。


© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.