This post was written our CTO, Sittiphol. It covers how to access Facebook 3D Photos and shows the results of Sittiphol’s research in getting this to work on Android. Do you want to create your own custom 3D Photo for Facebook? Click here to try our 3D Photo Creator
Comparing 3D photos from iPhone X and Note 9
Is it possible to post a 3D photo from Facebook with an Android Phone?
I did some reverse engineering to create my own 3D Photo on Facebook from ground up, without using any photos from my iPhone X. Turns out, it IS possible to create the 3D photo without an iPhone. I hacked my way around using a Note 9 to upload 3D photos.
I learned the following:
Behind Facebook’s 3D Photos: Depth Maps
Not all photos can be made into 3D. It’s only possible with the photos taken using the iPhone’s “Portrait” mode. Why?
Let’s start by looking at the special features of this mode: Portrait Mode doesn’t just take one photo. It takes your “normal” photo, but also takes another “special” photo. This ‘special’ photo is the depth map, which is created when we take photo from a phone with two cameras. This depth map shows which part of the photo is ‘closer’ to the camera, and which part is ‘further’ from the camera.
This works just as our eyes work.
When we know which object is near and which object is far, we can construct a 3D understanding of what we see on our brain.
Facebook uses this depth data to construct a 3D Photo, relying on it to gain a 3D view of our photo and make a 3D parallax effect with it.
This map sounds like a easy thing, but in fact it relies on a lot of details and implementations. Big clap to the Facebook team for this awesome feature!
Depth map sample comparison of Apple’s iPhone X and Samsung’s Galaxy Note 9
- iPhone X:
- the left picture is the 3024×3024 pixel native photo, and the right one is the hidden 576×768 pixel depth map (which is 5.25 times smaller than the native photo).
- Lighter color means closer to the camera, while darker color means further from the camera.
- It looks very detailed and I’m impressed with how Apple engineers can gather all these details.
‘Live Focus’ mode on Galaxy Note 9 relies on the same principle as the iPhone X’s Portrait Mode. But its stores depth data differently.
- Samsung Galaxy Note 9:
- the left picture is the 3024×4032 pixel native photo, and the right one is the hidden 756×1008 pixel depth map (which is 4 times smaller than the native photo).
- Darker color means closer to the camera, while lighter color means further from the camera. Which is the total opposite from Apple’s way of coloring depth map.
- The depth map looks detailed. However, it seems to be less detailed compared to the one shot with iPhone X, because this depth map uses less color range (Light grey -> Dark grey) compared to iPhone’s depth map (Black -> White) which in turns gives less depth differences.
3D Photo sample from Apple’s iPhone X and Samsung’s Galaxy Note 9
Even though it appears that 3D photos are only possible from the iPhone models with 2 cameras nowadays, with a little modification, it’s possible to use a photo from another phone model. i.e. , my Samsung Galaxy Note 9.
I modified the photo taken with my Note 9 to be in the same format as the one used by iPhone X, and uploaded them to Facebook. Here are the results:
- iPhone X (1)
- Samsung Galaxy Note 9 (1)
- iPhone X (2)
- Samsung Galaxy Note 9 (2)
Since we can make a “Portrait”-format photo by ourselves now, here’s some of my experiments with my self-made 3D photos 🙂
- 2 of myself in the same picture, taken with iPhone X
- 2 of myself in the same picture, taken with Galaxy Note 9
- 3D photo generated with Unity (1)
- 3D photo generated with Unity (2)
- I’ve gained a lot from my research on Facebook’s 3D photo. From what I see, it’s possible for Android phones to post 3D photo on Facebook in the near future. It’s already possible from my Note 9’s photo with some modification.
- The main issue is that the depth map data taken from most Android phones with 2 camera has no standard. Every brand uses different formats for their depth data, so it may take a while for Facebook to roll out this feature to the another phone model beside Apple’s iPhones
- From what I see, the 3D photo taken with Note 9’s depth looks more natural to me, compared to the iPhone’s
- All in all, I’m looking forward to see this feature officially launched on my Note 9 sometime in the near future!