You are probably familiar with those funny 3D Photos people are uploading to facebook recently. I've prepared an Unreal Engine plugin that will let you do them yourself in a few simple steps!

Bear in mind - this is not the same thing that Nvidia Ansel does. It's a quite fresh thing on facebook, it is nowhere near 360 panoramas and has a different effect. It's something you used to be able do only with iPhones. Examine the example very closely and you will see the difference.

This is actually very simple to set up yourself. You can check the plugin files and figure out what I did to get the desired result.

Tiny disclaimer

You should probably remove the plugin from your project before publishing the game, just in case something goes wrong. I did it very quickly. I also don't guarantee that it is stable. If it doesn't work or crashes something, just remove it. 😂

Also, it was made with 4.22. Should work with older versions, but I didn't check.

It still requires some proper scene setup because of how those 3D Photos work. Bear in mind that it's not the best idea to have a very big distances in depth. It works better with some close and not too detailed backgrounds.

Credit for showing me how this stuff works go to this person and their post (read the comments)

Steps

  1. Download the plugin from THIS DOWNLOAD LINK
  2. Put it in [YourProjectPath]/Plugins/
  3. Search for the 3DScreenshotActor in the Modes window and drag it to your level

If it doesn't appear - select Show Plugin Content in your View Options

Drag the 3DScreenshotActor from the Facebook3DScreenshot Content to your level

4. You can use Pilot Actor option to position it, so it catches the right frame

5. Click on the actor. In the Details Panel you can set the name of the screenshot files and adjust brightness

6. Your screenshot and the depth map will be put in the Saved folder of your project as two files - [YourProjectPath]/Saved/[ScreenshotName].png and [YourProjectPath]/Saved/[ScreenshotName]_depth.png

Brighness is just passed to the post process, so the lower value, the brighter, sorry for that. You can even go to negative numbers. I know it's counterintuitive, but as I said, it was just a quick thing, took me ~30 minutes to set up.

7. Now simply upload both pictures as a facebook post and the 3D Photo will be generated - you will get the preview before posting, so you can confirm if everything looks fine

8. Profit

Remember to remove the actor from the scene after taking the screenshot. It's not needed anymore.

It doesn't work best with translucency because it's not rendered to the depth buffer. You can work it around by taking the screenshot, then replacing translucent materials for opaque and then taking another screenshot with another name. Next you have to replace the depth from the first screenshot with the depth from the second one (just rename the files accordingly) and voilà! Remember that when you upload, the depth map needs to have the same name as the color map, but with the _depth suffix.

Outro

Hope all is clear and simple enough to use. Let me know if you have any feedback. Have fun!