[R&D] Matterport OBJ meets Facebook 3D Photos8361
59439 3 3
|Tosolini private msg quote post Address this user|
Facebook's new 3d photo format utilizes an extra layer of information- a depth map. Newer iPhones capture depth information by running an algorithm when dual-camera shots are taken, saving the file as a "3d photo" that includes a photo and depth layer. A depth map is a black and white version of an image, where darker objects are closer to the camera, and light objects farther.
The iPhone’s photo effect can be achieved without the camera by using Unity3d. Here is how this Matterport shot can be achieved- we will be using Unity fog to simulate a depth map:
1. Import a Matterport model into Unity by dragging the entire .obj folder into the hierarchy. Under import options, select "Use External Materials" (Legacy) to allow material editing. This creates a new folder named "materials." Select all of these and set the shader to "Unlit Texture"
2. Set the scene camera / model to the desired viewing angle. Add any additional 3d objects to the scene
3. In the "Game" window, create a custom resolution and set it to 3024 x 4032 pixels (the resolution of an iPhone portrait mode photo)
4. Download a screen capture asset like Render Monster (free on the Asset Store: https://assetstore.unity.com/packages/tools/utilities/render-monster-82563) and add the script to the scene camera
5. Hit the play button and take the first screenshot (standard photo layer)
6. Set all scene materials to "Unlit Color," and set the color to black. Set the camera clear flag to "solid color," and the color to white.
7. Open the "Lighting" window and check the box to activate Unity fog. Set the falloff to linear, and the color to white. Adjust the start and end distances until the closest objects to the camera are nearly black, and the background is white.
8. Hit the play button and take the second screenshot (depth layer)
9. Copy these two images to a newer iPhone model and purchase the Depth Cam - Depth Editor app on the App Store ($3.99) (https://itunes.apple.com/us/app/depth-cam-depth-editor/id1261191886?mt=8). Using this app, select the standard photo layer, and then use the "import depth map" function to import the black & white layer. Finally, save as a "3D photo"
10. Now, on an iOS device, start a "Facebook 3D" post and select the finalized image.
This method can be applied to any 3d scene and model within Unity3d. The high-level workflow is to capture the intended image, switch materials and turn on fog to mock up a depth map, and then combine them with an app on the iPhone to mimic the correct format.
Special thanks to our VR designer Michael Gelon for compiling this tutorial.
Paolo Tosolini, Founder
Tosolini Productions LLC
Business storytelling through emerging technologies
http://tosolini.com – email@example.com - (425) 985-7886
|Post 1 IP flag post|
|DanSmigrod private msg quote post Address this user|
Thank you for sharing this "how to" Matterport OBJ to Facebook 3D Photos.
Tosolini Productions is always doing amazing things for visual storytelling.
Again, thanks for always sharing your innovations with the WGAN Forum Community.
|Post 2 IP flag post|