Mathematica v12.1 on macOS Catalina 10.15.5. I'm getting weird Lighting behavior in Graphics3D in the sense that the rendered object appears "dark" unless it is being actively rotated with the mouse, during which time the lighting seems to spring to life, only to go dark again the moment the mouse button is released.

My simple code is:


See screenshots below illustrating the behavior in question. I presume this is not normal. I'd much prefer the lighting to appear as in the "active rotating" view at all times, if possible. Can anyone explain if/what I'm doing wrong?

"Static" view (while not actively rotating):

[enter image description here]

"Rotating" view (while actively rotating with mouse):

enter image description here

EDIT: If it helps/matters, AbsoluteOptions[Graphics3D[Sphere[]]] gives me

{AlignmentPoint -> Center, AspectRatio -> Automatic, 
 AutomaticImageSize -> False, Axes -> False, AxesEdge -> Automatic, 
 AxesLabel -> None, AxesOrigin -> Automatic, AxesStyle -> {}, 
 Background -> None, BaselinePosition -> Automatic, BaseStyle -> {}, 
 Boxed -> True, BoxRatios -> {1., 1., 1.}, BoxStyle -> {}, 
 ClipPlanes -> None, ClipPlanesStyle -> Automatic, 
 ColorOutput -> Automatic, ContentSelectable -> Automatic, 
 ControllerLinking -> False, ControllerMethod -> Automatic, 
 ControllerPath -> Automatic, CoordinatesToolOptions -> Automatic, 
 DisplayFunction -> Identity, Epilog -> {}, FaceGrids -> None, 
 FaceGridsStyle -> {}, FormatType -> TraditionalForm, 
 ImageMargins -> 0., ImagePadding -> All, ImageSize -> Automatic, 
 ImageSizeRaw -> Automatic, LabelStyle -> {}, Lighting -> Automatic, 
 Method -> Automatic, PlotLabel -> None, 
 PlotRange -> {{-1., 1.}, {-1., 1.}, {-1., 1.}}, 
 PlotRangePadding -> Automatic, PlotRegion -> Automatic, 
 PreserveImageOptions -> Automatic, Prolog -> {}, 
 RotationAction -> "Fit", SphericalRegion -> Automatic, 
 Ticks -> Automatic, TicksStyle -> {}, TouchscreenAutoZoom -> False, 
 ViewAngle -> Automatic, ViewCenter -> {0.5, 0.5, 0.5}, 
 ViewMatrix -> Automatic, ViewPoint -> {1.3, -2.4, 2.}, 
 ViewProjection -> Automatic, ViewRange -> All, 
 ViewVector -> Automatic, ViewVertical -> {0., 0., 1.}}

And I'm using the Default style sheet with no modifications.

  • $\begingroup$ no such issue V 12.1 on windows 10. May be graphics card problem? $\endgroup$ – Nasser Jun 10 at 4:30
  • $\begingroup$ why is your ViewProjection has different color than all options? They all should be black fonts, but this one is blue? $\endgroup$ – Nasser Jun 10 at 4:35
  • $\begingroup$ Regarding the blue font, I think that's just the code parser on this website, as it doesn't show up that way in my notebook file. $\endgroup$ – bmclaurin Jun 10 at 4:40
  • $\begingroup$ I think you're on to something with the graphics card idea. I'm using an external monitor with my MacBook Pro 16. When I disconnected the monitor and re-evaluated the expression, the graphics object rendered as desired on the MBP's built-in display. $\endgroup$ – bmclaurin Jun 10 at 4:42

This is a known bug in the macOS Mathematica. Please see my answer here: 3D graphics render as though no illumination

You will need to use a different rendering engine than "Metal" for example:

SetOptions[$FrontEnd, RenderingOptions -> {"3DRenderingEngine" -> "OpenGL"}]
| improve this answer | |
  • $\begingroup$ Thank you for this! Using the guidance in your answer and the link you provided, my issue has been resolved. $\endgroup$ – bmclaurin Jun 10 at 17:19

I'm posting this as an answer mainly because it's too long for a comment.

I can now confirm this is a graphics card issue. My MBP 16 has the AMD Radeon Pro 5300M 4 GB dGPU and Intel UHD Graphics 630 1536 MB iGPU with macOS's "automatic graphics switching." When using an external monitor, the dGPU is forced into service for both displays. But when using only the built-in display (and with Automatic Graphics Switching enabled), the system uses the iGPU for Mathematica. In this configuration, the 3D graphics object renders properly. But when Automatic Graphics Switching is disabled, the system uses the dGPU for Mathematica, in which case I get the "dimming" behavior described in my original post.

So there seems to be some sort of compatibility issue with the AMD Radeon Pro 5300M and Mathematica 12.1 on macOS Catalina 10.15.5.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.