Lighting
✖
Lighting
is an option for Graphics3D and related functions that specifies what simulated lighting to use in coloring 3D surfaces.
Details


- The following settings can be given:
-
Automatic default lighting schemes None no lighting "light" named lighting {s1,s2,…} light sources s1, s2, … - Possible named lighting settings "light" include:
-
"Standard" colored light sources in default positions "Neutral" white light sources in default positions "Accent" a directional white light source in default direction "ThreePoint" three directional white light sources in default directions - Each light source si can be of the following forms:
-
AmbientLight uniform ambient light DirectionalLight directional light PointLight spherical point light SpotLight spotlight - Lighting{s1,…} combines the light sources si with any inherited light sources. To prevent combining with inherited light sources, use Lighting{None, s1,…}.
- Lighting->Automatic uses ambient light together with four light sources fixed relative to the final displayed image.
- Lighting can be specified separately for particular objects in Graphics3D by giving a style option Style[obj,Lighting->spec].
Examples
open allclose allBasic Examples (4)Summary of the most common use cases
Default lighting on gray specular sphere:

https://wolfram.com/xid/0ftw0hm-eo9u9n

Neutral lighting on gray specular sphere:

https://wolfram.com/xid/0ftw0hm-kvnus7

Directional light from the top of the specular surface:

https://wolfram.com/xid/0ftw0hm-iz3799

Specify lighting for each object:

https://wolfram.com/xid/0ftw0hm-b8oi83

Scope (24)Survey of the scope of standard use cases
Lighting Specification (18)
Default lighting on a white surface:

https://wolfram.com/xid/0ftw0hm-ex65a1

Default lighting when ColorFunction is specified:

https://wolfram.com/xid/0ftw0hm-gevdht

No lighting means diffuse or specular colors will not be visible:

https://wolfram.com/xid/0ftw0hm-c2i8rk

Using Glow specifies pure color without interaction with lights:

https://wolfram.com/xid/0ftw0hm-6g4x6

Ambient light is uniformly applied to all the surfaces in the scene:

https://wolfram.com/xid/0ftw0hm-lon7i5

Ambient light gives overall lighting on the scene:

https://wolfram.com/xid/0ftw0hm-bhlr5h

https://wolfram.com/xid/0ftw0hm-eeapvr

Directional light is specified by a color and a vector defined by two points:

https://wolfram.com/xid/0ftw0hm-ecrkum

Directional lights with different colors:

https://wolfram.com/xid/0ftw0hm-ckw2lx

Directional lights with different directions:

https://wolfram.com/xid/0ftw0hm-gt6tp

Directional lights on a specular surface:

https://wolfram.com/xid/0ftw0hm-b7xt75

Specify a spherical point light source by a color and a position:

https://wolfram.com/xid/0ftw0hm-vb9wr

Point lights with different colors:

https://wolfram.com/xid/0ftw0hm-ba1gl1

Point lights at various positions:

https://wolfram.com/xid/0ftw0hm-coa9wi

Point lights on specular surfaces:

https://wolfram.com/xid/0ftw0hm-iksl1j

Specify spotlight by position, target position, and half-angle:

https://wolfram.com/xid/0ftw0hm-jz957u

Spotlights with different colors:

https://wolfram.com/xid/0ftw0hm-bagoh7

Spotlights from different positions:

https://wolfram.com/xid/0ftw0hm-cjbyay

Spotlights with different half-angles:

https://wolfram.com/xid/0ftw0hm-ctkzdd

Spotlights on specular surfaces:

https://wolfram.com/xid/0ftw0hm-l4zk2

Lighting Positions (3)
Specify the light source position in the graphics coordinate system by default:

https://wolfram.com/xid/0ftw0hm-bqtu4w

https://wolfram.com/xid/0ftw0hm-kvkyfo

The light source moves with the graphic when the view point changes:

https://wolfram.com/xid/0ftw0hm-jtyrvp

Specify the light position by a fraction of the graphics coordinates using Scaled:

https://wolfram.com/xid/0ftw0hm-h54ktu

https://wolfram.com/xid/0ftw0hm-ktkqbv

The light source moves with the graphic when the view point changes:

https://wolfram.com/xid/0ftw0hm-5en8p

Specify the light position in the view coordinate system using ImageScaled:

https://wolfram.com/xid/0ftw0hm-d6esqs

https://wolfram.com/xid/0ftw0hm-d068y

The light source position is always fixed relative to the view point:

https://wolfram.com/xid/0ftw0hm-j48glq

Lighting Attenuation (3)
By default, point lights are not affected by the distance from an object:

https://wolfram.com/xid/0ftw0hm-bkhblf

https://wolfram.com/xid/0ftw0hm-i0791u

Specify a point light that attenuates with respect to the distance:

https://wolfram.com/xid/0ftw0hm-gbrz3a

Specify a point light that attenuates by the square of the distance:

https://wolfram.com/xid/0ftw0hm-0dh1s

By default, spotlights fall off sharply outside the cone:

https://wolfram.com/xid/0ftw0hm-bkvmd0

https://wolfram.com/xid/0ftw0hm-cj0k7j

Spotlights with different spot exponent has intensity
:

https://wolfram.com/xid/0ftw0hm-idsak4

Spotlight without attenuation:

https://wolfram.com/xid/0ftw0hm-gdb3d9

https://wolfram.com/xid/0ftw0hm-bla5gz

Spotlight with linear attenuation:

https://wolfram.com/xid/0ftw0hm-k503rx

Spotlight with quadratic attenuation:

https://wolfram.com/xid/0ftw0hm-hx6r4p

Generalizations & Extensions (8)Generalized and extended use cases

https://wolfram.com/xid/0ftw0hm-cglwya

The colored lighting is equivalent to the following explicit setting:

https://wolfram.com/xid/0ftw0hm-fghm3c


https://wolfram.com/xid/0ftw0hm-dbwof

The accent lighting is equivalent to the following explicit setting:

https://wolfram.com/xid/0ftw0hm-ixjeso


https://wolfram.com/xid/0ftw0hm-bjc71q

The neutral lighting is equivalent to the following explicit setting:

https://wolfram.com/xid/0ftw0hm-vchez

Predefined three-point lighting:

https://wolfram.com/xid/0ftw0hm-rzgeiu

The three-point lighting is equivalent to the following explicit setting:

https://wolfram.com/xid/0ftw0hm-elmd61

Specify lighting for each object:

https://wolfram.com/xid/0ftw0hm-kzgp0w

https://wolfram.com/xid/0ftw0hm-lk2s2

Specify lighting within the graphics:

https://wolfram.com/xid/0ftw0hm-hndob

If not specified, the target direction is given toward the center of the objects:

https://wolfram.com/xid/0ftw0hm-c4702f

Specify diffuse and specular colors separately for both objects and lights:

https://wolfram.com/xid/0ftw0hm-4539c

Applications (3)Sample problems that can be solved with this function
Set up four white spheres on a plane:

https://wolfram.com/xid/0ftw0hm-fx1ako

https://wolfram.com/xid/0ftw0hm-iiocwr

https://wolfram.com/xid/0ftw0hm-fv7iwb


https://wolfram.com/xid/0ftw0hm-cv7sb8

https://wolfram.com/xid/0ftw0hm-lbehpe


https://wolfram.com/xid/0ftw0hm-jshtaj

https://wolfram.com/xid/0ftw0hm-fkbe89

Different light instruments at the corner points:

https://wolfram.com/xid/0ftw0hm-4b321

https://wolfram.com/xid/0ftw0hm-kgwpar


https://wolfram.com/xid/0ftw0hm-i09wo2


https://wolfram.com/xid/0ftw0hm-izz3d

Build a scene with multiple objects and light sources:

https://wolfram.com/xid/0ftw0hm-br7dnh

https://wolfram.com/xid/0ftw0hm-mqjf2m

Properties & Relations (8)Properties of the function, and connections to other functions
Surface color and lighting interact with each other:

https://wolfram.com/xid/0ftw0hm-hirsjb

Diffuse object and lighting colors can be exchanged and produce the same effect:

https://wolfram.com/xid/0ftw0hm-5s5yr

Specular object and lighting colors can be exchanged and produce the same effect:

https://wolfram.com/xid/0ftw0hm-lzkvy7

Specularity gives mirror-like reflection:

https://wolfram.com/xid/0ftw0hm-bnxok1

The final color is a linear combination of all the surface colors as well as lighting:

https://wolfram.com/xid/0ftw0hm-dpfi8l

Directional light yields rays parallel to the specified direction:

https://wolfram.com/xid/0ftw0hm-c94xsh

Point light yields rays toward all the directions from the position:

https://wolfram.com/xid/0ftw0hm-floofv

A spotlight emits conic rays toward the specified direction:

https://wolfram.com/xid/0ftw0hm-bqkajl

Possible Issues (5)Common pitfalls and unexpected behavior
The default lighting may not be suitable for light surface colors:

https://wolfram.com/xid/0ftw0hm-hahkqa

Neutral lighting can be used to reflect surface colors more naturally:

https://wolfram.com/xid/0ftw0hm-i0xfrl

If a color function is given to a plot, then neutral lighting is used automatically:

https://wolfram.com/xid/0ftw0hm-1lmsy

Restore the default colored lighting:

https://wolfram.com/xid/0ftw0hm-jsh0et

Flat surfaces may show little or no reflection:

https://wolfram.com/xid/0ftw0hm-cgca22

A spotlight on a sphere may display a jagged boundary:

https://wolfram.com/xid/0ftw0hm-kzbar0

Increasing the spot exponent may reduce the effect:

https://wolfram.com/xid/0ftw0hm-i2xhqx

Inline Lighting directives specifying light sources add those sources to any inherited specification:

https://wolfram.com/xid/0ftw0hm-6sltdc

Set LightingNone on the graphic to override the default LightingAutomatic setting:

https://wolfram.com/xid/0ftw0hm-jbhsoq

Similarly, a sequence of Lighting{s1,…} specifications cumulatively adds the lights together:

https://wolfram.com/xid/0ftw0hm-zmbele

Use list braces to ensure the lighting specification does not leak into subsequent specifications:

https://wolfram.com/xid/0ftw0hm-3zvfar

Neat Examples (2)Surprising or curious use cases
Wolfram Research (1988), Lighting, Wolfram Language function, https://reference.wolfram.com/language/ref/Lighting.html (updated 2021).
Text
Wolfram Research (1988), Lighting, Wolfram Language function, https://reference.wolfram.com/language/ref/Lighting.html (updated 2021).
Wolfram Research (1988), Lighting, Wolfram Language function, https://reference.wolfram.com/language/ref/Lighting.html (updated 2021).
CMS
Wolfram Language. 1988. "Lighting." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/Lighting.html.
Wolfram Language. 1988. "Lighting." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/Lighting.html.
APA
Wolfram Language. (1988). Lighting. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Lighting.html
Wolfram Language. (1988). Lighting. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Lighting.html
BibTeX
@misc{reference.wolfram_2025_lighting, author="Wolfram Research", title="{Lighting}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/Lighting.html}", note=[Accessed: 16-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_lighting, organization={Wolfram Research}, title={Lighting}, year={2021}, url={https://reference.wolfram.com/language/ref/Lighting.html}, note=[Accessed: 16-April-2025
]}