is a three-dimensional graphics directive specifying that surfaces that follow are to be drawn with a warm color facing toward the light and a cool color facing away.
GoochShading[col]
uses cool and warm colors obtained by blending col with slate Blue and Orange.
GoochShading[{ccol,wcol}]
uses the cool color ccol and the warm color wcol.
GoochShading[{w1,w2}{ccol,wcol}]
uses the colors ccol and wcol weighted by the wi.
GoochShading["scheme"]
uses the specified gradient color scheme in ColorData.
GoochShading
is a three-dimensional graphics directive specifying that surfaces that follow are to be drawn with a warm color facing toward the light and a cool color facing away.
GoochShading[col]
uses cool and warm colors obtained by blending col with slate Blue and Orange.
GoochShading[{ccol,wcol}]
uses the cool color ccol and the warm color wcol.
GoochShading[{w1,w2}{ccol,wcol}]
uses the colors ccol and wcol weighted by the wi.
GoochShading["scheme"]
uses the specified gradient color scheme in ColorData.
Details
- GoochShading is also known as cool to warm shading.
- GoochShading is typically used to highlight details and contours of three-dimensional objects.
- The final colors of 3D surfaces are determined by linearly adding RGB colors from the diffuse reflection, specular reflection lights.
- GoochShading[{w1,w2}{ccol,wcol}] specifies that luminosity on the surface should be mapped to the color gradients between ccol and wcol weighted by w1 and w2. A higher weight wi indicates that more of the corresponding color should be used.
- Colors can be defined by RGBColor, Hue or any other color specification. Any number of colors can be used.
- GoochShading[] is effectively equivalent to GoochShading[{
,
,
}]. - In GoochShading[{ccol,wcol}], the colors ccol and wcol are weighted uniformly.
- The setting Lighting"Accent" uses a directional light and faithfully reproduces colors on the surface.
Examples
open all close allBasic Examples (4)
Apply Gooch shading to the unit sphere with a directional light:
Graphics3D[{GoochShading[], Sphere[]}, Lighting -> "Accent"]Use a colored Gooch shading to show a knot:
Graphics3D[{GoochShading[{LABColor[0.268505119996119, 0.26589133685332694, -0.5698407894340829], LABColor[0.9838025798885295, -0.1047406804200568, 0.48599170232069433]}], KnotData["SolomonSeal", "ImageData"]}, Lighting -> "Accent"]Plot3D[Sin[x + y ^ 2], {x, -3, 3}, {y, -2, 2}, PlotPoints -> 80, PlotStyle -> Directive[White, GoochShading[]], Mesh -> None, Lighting -> "Accent"]Graphics3D[{GoochShading[], ExampleData[{"Geometry3D", "Galleon"}, "GraphicsComplex"]}, Boxed -> False, Lighting -> "Accent"]Scope (14)
Basic Uses (5)
Apply GoochShading to a graphics primitive:
Graphics3D[{GoochShading[], #}, Lighting -> "Accent"]& /@ {Sphere[], CapsuleShape[], Cone[]}Apply Gooch shading to a plot:
SphericalPlot3D[1 + 2Cos[2θ], {θ, 0, Pi}, {ϕ, 0, 2Pi}, Axes -> False, PlotStyle -> GoochShading[], PlotPoints -> 40, Lighting -> "Accent" ]Apply Gooch shading to a chart:
BarChart3D[Range[5], ChartElements -> [image], ChartStyle -> GoochShading[], Lighting -> "Accent"]Apply Gooch shading to a 3D object:
Graphics3D[{GoochShading[], ExampleData[{"Geometry3D", "Beethoven"}, "GraphicsComplex"]}, Lighting -> "Accent"]GoochShading[]Specification (6)
GoochShading with no arguments uses three gray tones:
Graphics3D[{GoochShading[], Sphere[]}, Lighting -> "Accent"]Graphics3D[{GoochShading[#], Sphere[]}, Lighting -> "Accent"]& /@ {Red, Green, Blue}Graphics3D[{GoochShading[#], Sphere[]}, Lighting -> "Accent"]& /@ {{DarkGray, LightGray}, {Red, Pink, LightRed}, {Purple, Blue, Green, Yellow, Orange, Red}}Specify the weight of each color:
Graphics3D[{GoochShading[# -> {DarkGray, Gray, LightGray}], Sphere[]}, Lighting -> "Accent"]& /@ {{1, 0.1, 0.1}, {1, 1, 1}, {0.1, 1, 0.1}}Use a predefined color scheme from ColorData:
Graphics3D[{GoochShading[#], Sphere[]}, Lighting -> "Accent"]& /@ {"SunsetColors", "BlueGreenYellow", "DeepSeaColors"}Use LightDarkSwitched to specify different colors for light and dark modes:
graphic = Graphics3D[{GoochShading[LightDarkSwitched[StandardRed, StandardBlue]], Sphere[]}, Lighting -> "Accent"];{LightModePane[graphic], DarkModePane[graphic]}Lighting (3)
GoochShading works with all types of lights:
lights = {{"Ambient", LightGray}, {"Point", White, ImageScaled[{1, 1, 2}]}, {"Directional", White, ImageScaled[{1, 1, 2}]}, {"Spot", White, {{1, -1, 1}, {0, 0, 0}}, Pi / 4}};
Graphics3D[{GoochShading[], Sphere[]}, Lighting -> {#}]& /@ lightsGraphics3D[{GoochShading[], Sphere[]}, Lighting -> {{"Directional", Red, ImageScaled[{1, -0.5, 1}]}, {"Directional", Green, ImageScaled[{-1, -0.5, 1}]}, {"Directional", Blue, ImageScaled[{0, 1, 1}]}, {"Ambient", GrayLevel[0.2]}}]Use "Accent" lighting to faithfully reproduce colors on the surface.
Graphics3D[{GoochShading[], Sphere[]}, Lighting -> #] & /@ {"Accent", Automatic}Properties & Relations (2)
Approximate the default system shader with GoochShading:
seq = GrayLevel /@ Range[0, 1, 1 / 50]Graphics3D[{GoochShading[seq], Sphere[]}]Approximate GoochShading with ToonShading:
seq = Blend[{LABColor[0.25, 0.4, -0.65], LABColor[0.55, 0.65, 0.65], LABColor[0.9, 0.05, 0.4]}, #]& /@ Range[0, 1, 1 / 60]Graphics3D[{ToonShading[seq], Sphere[]}, Lighting -> "Accent"]Possible Issues (2)
The default light scheme uses several colored light sources:
Graphics3D[{GoochShading[], Sphere[]}]Use a single directional light to get the standard Gooch shading effect:
Graphics3D[{GoochShading[], Sphere[]}, Lighting -> {{"Directional", White, ImageScaled[{1, 1, 2}]}}]Surfaces are displayed in a darker color:
Graphics3D[{Red, GoochShading[], Sphere[]}, Lighting -> "Accent"]Automatically get a balanced three-tone color scheme:
Graphics3D[{GoochShading[Red], Sphere[]}, Lighting -> "Accent"]Interactive Examples (3)
Adjust the weights of the base colors:
Manipulate[Graphics3D[{GoochShading[{w1, w2, w3} -> {DarkGray, Gray, LightGray}], Sphere[]}, Lighting -> "Accent"], {{w1, 0.5, "Dark"}, 0, 1}, {{w2, 0.5, "Base"}, 0, 1}, {{w3, 0.05, "Highlight"}, 0, 1}]Explore gradient color schemes from ColorData:
Manipulate[Graphics3D[{GoochShading[gradient], Sphere[]}, Lighting -> "Accent"], {{gradient, "SolarColors", "Gradient"}, ColorData["Gradients"]}]Explore indexed color schemes from ColorData:
Manipulate[Graphics3D[{GoochShading[index], Sphere[]}, Lighting -> "Accent"], {{index, 23, "Index"}, ColorData["Indexed"]}]Related Guides
History
Text
Wolfram Research (2020), GoochShading, Wolfram Language function, https://reference.wolfram.com/language/ref/GoochShading.html.
CMS
Wolfram Language. 2020. "GoochShading." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GoochShading.html.
APA
Wolfram Language. (2020). GoochShading. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GoochShading.html
BibTeX
@misc{reference.wolfram_2026_goochshading, author="Wolfram Research", title="{GoochShading}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/GoochShading.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_goochshading, organization={Wolfram Research}, title={GoochShading}, year={2020}, url={https://reference.wolfram.com/language/ref/GoochShading.html}, note=[Accessed: 13-June-2026]}