Facebook has a really cool feature that lets you create a 3D photo. It was previously limited to iPhone users user portrait mode, in which the phone creates a depth map channel embedded in the image. But now, Facebook has improved the feature to allow anyone to upload a depth map and an image. This opens up all sorts of possibilities, and this tutorial will show you exactly how to create a depth map from native SketchUp tools and upload to Facebook as a 3D photo.
Uploading 3D Photo to Facebook
Before learning how to create a depth map with SketchUp, let’s take a look at how to upload a 3D photo to Facebook.
- Create source image
Take an image, or an export from SketchUp or rendering program. Should be either png or jpg.
- Create depth map image
Create a depth map image, using grayscale to convey depth in the image. Darker colors are far away, lighten colors are close to the camera.
- Rename Depth Map
Add
_depth
after the filename of the depth map image. So if your source image is namedimage.png
, your depth map should be namedimage_depth.png
. - Upload to Facebook
Simply drag the image and depth map image into a new Facebook post. Facebook will then generate a 3D photo from the two images.
Watch the video, or continue below
Creating a depth map with SketchUp
The most important part of a Facebook 3D photo is the depth map, and creating one in SketchUp is very easy! You can use ANY version of SketchUp. SketchUp Free, SketchUp Make, SketchUp Pro, or SketchUp Shop.
The trick is to use FOG, but set it to black.
Black Fog
You can find the Fog panel by going to Window > Default Tray > Fog.
By default, fog will use the background color, but you’ll want to uncheck that box, and select black. (You don’t have to use black. A dark gray will make the entire 3D effect more subtle.)
White faces, no edges
We’ll fine tune the fog in just a second, but before we do, let’s make some adjustments to the style settings.
- In the Styles panel select the Default styles folder from the drop-down menu, then activate Hidden Line Style. This will give us a good basis to start from because it sets all faces to Hidden Line Mode (White, with no shading.)
- Click on the Edit tab, then the Edges button. Un-check all edge settings.
TIP: You might want to save your new style so you can recall it, and save it in a scene.
Adjust fog range
Now, you’ll want to go back to the Fog panel to adjust the sliders. You should adjust each slider so that all of the faces have some range of color between black and white. You don’t want pure white, or pure black, because then those areas will appear flat.
Export Depth Map
Once you’ve got the fog dialed in, you might want to save a scene so you can go back to it.
To export, go to File > Export > 2D Graphic. Make sure you click on Options, and uncheck Transparent Background. (Otherwise, your background will not be black!)
Exporting image
With your depth map created, go ahead and change your style to something you like, and turn the fog off. Export an image from that view as well. Make sure you don’t orbit the camera or anything, it needs to be from the same perspective.
Add _depth
to the end of the depth map image filename.
Drag and drop both into Facebook.
Get creative! Go beyond simply creating 3D photos of your models. Try making a massing model using Match Photo. You could even try manually creating a depth map inside Photoshop.