UPDATED: November 25, 2019.
#First Reason
The main reason that snapshots taken in AR apps are darker than a video stream coming from a rear RGB camera is because you have two absolutely different scenes: the first one is SCNScene with 3D models having its own exposure and the second one is a RGB camera's view with its own exposure. In ARSCNView these exposures are added together forming an average exposure value, what can be darker (like in your case) or can be lighter.
#Second Reason
Also, you need to take into account a whitePoint
instance property also known as a luminance level for use as the upper end of a tone mapping curve.
var whitePoint: CGFloat { get set }
When using a High Dynamic Range (HDR) camera, SceneKit applies a process called tone mapping to translate the wide range of luminance values in the visible scene to the narrower range of brightness values that can be shown on a display. SceneKit determines a tone mapping curve from the minimumExposure
, maximumExposure
, exposureOffset
, and whitePoint
properties, along with a measure of scene luminance.
The default value of whitePoint
is 1.0
. By setting this property to a higher or lower value, you can produce more gradual or more abrupt transitions between shadows and highlights. This property has no effect if the wantsHDR
value is false
.
camera.whitePoint = 1.5
#Third Reason
Color models of RGB camera stream, rendered SCNView and an iPhone's display are slightly different in Gamma Correction.