GoochMaterial QML Type | Qt 3D 5.12.10

- Qt 5.12
- Qt 3D
- QML Types
- GoochMaterial QML Type
- Qt 5.12.10 Reference Documentation

# GoochMaterial QML Type

The GoochMaterial provides a material that implements the Gooch shading model, popular in CAD and CAM applications. More...

Import Statement: | import Qt3D.Extras 2.12
Since: | Qt 5.7

- List of all members, including inherited members

## Properties

- alpha : real
- beta : real
- cool : color
- diffuse : color
- shininess : real
- specular : color
- warm : color

## Detailed Description

The Gooch lighting model uses both color and brightness to help show the curvature of 3D surfaces. This is often better than models such as Phong that rely purely upon changes in brightness. In situations such as in CAD and CAM applications where photorealism is not a goal, the Gooch shading model in conjunction with some kind of silhouette edge inking is a popular solution.

The Gooch lighting model is explained fully in the original Gooch paper. The Gooch model mixes a diffuse object color with a user-provided cool color and warm color to produce the end points of a color ramp that is used to shade the object based upon the cosine of the angle between the vector from the fragment to the light source and the fragment's normal vector. Optionally, a specular highlight can be added on top. The relative contributions to the cool and warm colors by the diffuse color are controlled by the alpha and beta properties respecitvely.

This material uses an effect with a single render pass approach and performs per fragment lighting. Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.

## Property Documentation

alpha : real

Holds the current alpha value. The start point of the color ramp used by the Gooch shader is calculated as {c = cool + alpha * diffuse}.

beta : real

Holds the current beta value. The start point of the color ramp used by the Gooch shader is calculated as {c = warm + beta * diffuse}.

cool : color

Holds the current cool color.

diffuse : color

Holds the current diffuse color.

shininess : real

Holds the current shininess value. Higher values of shininess result in a smaller and brighter highlight.

specular : color

Holds the current specular color.

warm : color

Holds the current warm color.