This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
How to | Color a 3D Surface without Lighting
Mathematica lets you determine the final rendered color of a 3D surface using simulated lighting, reflection, and glow. With the Glow option, you can color a 3D surface independently of simulated lighting and reflection by effectively causing the surface to emit light in the specified color.
First, create a 3D cylinder. By default, the intrinsic surface color of 3D objects in Mathematica is white. The color you see comes from the simulated lighting that Mathematica uses by default:
Click for copyable input
Set Lighting to None to prevent any light from being projected onto the cylinder. The cylinder now appears black:
Click for copyable input
With Lighting still set to None, use Glow to color the cylinder purple:
Click for copyable input
Now return to using Mathematica's default Lighting with the purple Glow still active:
Click for copyable input
As you can see from the last two graphics, Lighting interacts strongly with Glow, which effectively causes a 3D surface to emit its own light in the color that you specify.
In the Manipulate here, the sliders are used to set the Glow color. In other words, the sliders control the color of light that is emitted by the cylinder. Lighting can be set to None or Automatic. Automatic is the explicit setting for the default Lighting scheme in Mathematica. The Inset 2D rectangle at the top right shows the raw color used for the Glow setting in the absence of Lighting; it does not vary with the setting for Lighting in the Manipulate.
To see how Lighting interacts with Glow to determine the final rendered color of the 3D surface, click any color in the slider and switch the setting for Lighting:
You can gain even further control over the final color of a 3D surface by explicitly giving it an intrinsic surface color. This affects the color of light that the surface reflects. For more information, see How to: Control the Response of a 3D Surface to Lighting.