iOS SceneKit lights not working in simulator

836 Views Asked by At

When I run my app containing a SCNView, containing some objects and some SCNLight (added a keylight and ambientlight), it does run correctly on real iOS devices.

However, when I try to run in iOS Simulator, the lighting does not work. When I set the scene background color, I can still see the objects as black silhouettes in the simulator.

Does anyone have an idea what causes this and is there any solution to let SCNLights work correctly on the iOS Simulator?

I already tried changing the render engine mode with various options:

defaults write com.apple.CoreSimulator.IndigoFramebufferServices FramebufferRendererHint X

Where X is:

0 = auto
1 = Metal
2 = OpenCL
3 = OpenGL

As mentioned here. However, this doesn't appear to make any difference (when I reset iOS simulator).

Some context:

  • Running iOS 11.1
  • It is a rather advanced app with another (separate) SceneView (an ARSCNView to be precise). Can the problem be caused because there are basically two SCNView's in the app? (they are never shown at the same time though).
1

There are 1 best solutions below

3
On

Had same issue. Disabled shadows casting in the light's inspector and it light returned in the simulator.