iPhone 8 is said to pack in sophisticated 3D sensors on its front and back capable of scanning a user’s face within “millionths of a second”. The Wall Street Journal has now learned that the phone’s deep-sensing scanners work in low-light situations, even in complete darkness.

In a report published yesterday afternoon, WSJ wrote that using our faces to unlock things could soon become routine because Apple will mainstream advanced 3D facial recognition just as its sophisticated Touch ID sensor has popularized fingerprint readers on smartphones.

Rather than use very limited and unreliable facial recognition systems that analyze 2D images recorded through the front-facing camera, as we saw with Galaxy S8, iPhone 8 is said to employ a dedicated sensor based on so-called “structured light.”

An infrared transmitter will spray thousands of tiny dots across a person’s face or any other target. Bounced off the surface, the light will be picked up by an infrared receiver. By measuring the time it takes the light to travel back, the phone can work out the distance between it and each scanned point, allowing it to build a 3D mesh of any object in real-time.

According to the article (emphasis mine):

Depth-sensing technology, known as structured light, sprays a point cloud of infrared dots on an object or face. By reading distortions in this field of dots, the camera gathers super-accurate depth information. Since the phone’s camera can see infrared but humans can’t, such a system could allow the phone to unlock in complete darkness.

This is in line with a recent report from Bloomberg’s Mark Gurman which said iPhone 8’s 3D scanner would use more detection points than Touch ID, potentially making it more secure and reliable than Apple’s existing fingerprint scanning solution.

“The sensor’s speed and accuracy are focal points of the feature,” Gurman wrote. “It can scan a user’s face and unlock the iPhone within a few hundred milliseconds.”

A 3D-printed mask wouldn’t be able to fool such a system, unlike with Galaxy S8’s bitmap-based facial recognition feature, although identical twins, sunglasses on a person’s face or wearing something that covers your face might.

Qualcomm recently unveiled its Spectra imaging system which can extract depth information from objects including faces. Demonstrated in Qualcomm’s video embedded below, this technology will be included in upcoming Snapdragon processors for 2018 Android devices.

That’s roughly the kind of technology that iPhone 8 is widely expected to use in order to read facial features reliably. Apple’s scanner is likely based on specialized hardware and know how it obtained when it acqu-hired Kinect motion sensor maker PrimeSense.

The 3D sensor for iPhone 8 can even work at odd angles, such as if the device is laying flat on a table, rather than just close up to the face. The sensor is so secure that it will be used for authorizing Apple Pay payment transactions. The intent is for it to completely replace the Touch ID fingerprint scanner, according to Bloomberg’s sources.

iPhone 8 marketing mockup courtesy of industrial designer Quinton Theron