John Bigboote Posted April 19, 2019 Posted April 19, 2019 Hey- anyone noticed the 'depth images' that are all the rage on Facebook right now? Here is a instructional sheet (not mine) I found regarding how to do it, and of course my first thought is... we can do this in A:M really easily with the depth map render! I am out the door for the weekend or I would whip one up... anyone else that wants to be the 1st- HAVE AT!!! The Facebook depth effect is an image that as you scroll over it... on your phone or desktop, appears to have a multi-plane that is driven by your scroll. The image is built by Facebook as you load-up 2 images... your RGB color image and a depth greyscale image. Quote
Hash Fellow robcat2075 Posted April 19, 2019 Hash Fellow Posted April 19, 2019 Edit: see better A:M process in next post If you know how to extract the depth map from an OpenEXR render and scale it into a PNG you are on your way already. A perhaps more intuitive way is to temporarily set all the objects in your shot to full 100% ambient intensity white, no specularity. Set your camera background to black, turn fog ON, and set the fog near and far distances to contain the nearest and farthest objects in your scene. You should get a grayscale image approximation of a depth map. Quote
Hash Fellow robcat2075 Posted April 19, 2019 Hash Fellow Posted April 19, 2019 Here is a clear process, using the OpenEXR format. Note that the screen capture compression makes the grayscale depth buffer look very banded. The actual render will be smooth. Note, also, that my choice of only 640x640 for resolution was a weak one. Although the final image is seen rather small on Facebook, a higher resolution depth map seems to make the Facebook 3D process work better and make fewer mistakes about near v. far. Thank you , Matt for finding this new FaceBook feature! Quote
Hash Fellow robcat2075 Posted April 20, 2019 Hash Fellow Posted April 20, 2019 I'll also note that you do need to have a solid modeled background in your image. Even one just big patch to cover the background will be enough. The default camera background is not able to create a proper depth map result. Quote
John Bigboote Posted April 20, 2019 Author Posted April 20, 2019 Thanks for the tutorial, Rob- good to know you can do this ALL right from A:M without a pitstop in Pshop/Gimp. You are correct in assuming most people will just see this on their phone, and these things are REALLY EYE-CATCHING as you scroll-thru FB and the depth parallax happens. Quote
John Bigboote Posted April 22, 2019 Author Posted April 22, 2019 FUN! I just grabbed a random photo (of my fav band the Stones) and painted my own depth map image following the near-is-white and far-is-black rule and the results are pretty eye-catching! Of course- I can't show it here, you have to see it on my Facebook page- what fun! Quote
Hash Fellow robcat2075 Posted April 22, 2019 Hash Fellow Posted April 22, 2019 That' works well! Here's a link to Matt's Page... https://www.facebook.com/matt.campbell.5203?__tn__=%2CdlC-R&eid=ARCVQm9OHeHsTgouzsYpmxphjpTiGQIyi6rSTMfSP647hHTaGznBrim92pmUtq8tz-oeXtDgII-W8FAA&hc_ref=ARRVRNLv9ZZDKXXnPMhz9Fja_WOjOPGmlaHEn3osliFdSGYVyQpID6A34-Nau6tbwIs Quote
largento Posted April 23, 2019 Posted April 23, 2019 That's really cool! I gave it a go with and old cover to one of our graphic novels. You could easily spend many hours working on it. They definitely get your attention when your scrolling. Quote
Hash Fellow robcat2075 Posted April 23, 2019 Hash Fellow Posted April 23, 2019 The photo snapshot versions that we see on Facebook are done with the new cell phones that have two camera lenses. Internally it is taking a conventional stereo photo but then creating a depth map from that to apply the photo to. The process must be pretty smart since not every pixel of one view is going to have an easily identifiable counter part in the other. i wonder if there is a way to get that depth map? For displacement mapping purposes. There are some tutorials on the web for creating depth maps from stereo photos but I haven't investigated it. Quote
largento Posted April 23, 2019 Posted April 23, 2019 Yeah, that's how I first did it was with my iPhone. It's hit or miss, though. Some would figure it out, but if it was too complicated, you ended up with weirdness. In order to get Facebook to recognize it as a 3D photo, you had to use "portrait mode," which is what the iPhone uses to allow you adjust lighting and focus settings on a photo after it's taken. Presumably the phone is generating a depth map to accomplish this. Quote
Hash Fellow robcat2075 Posted April 23, 2019 Hash Fellow Posted April 23, 2019 Could getting the depth map be as simple as finding a file with "*_depth.png" on your phone? If that is what we are saving for our CG creations, that must be what the phone is saving as a file also? Quote
largento Posted April 24, 2019 Posted April 24, 2019 Not quite that simple. Apparently if you have a later OS than I have and the latest version of Photoshop, you can import the image from your phone (like importing images from your camera) and the depth map is in its own channel. I've also seen an application that uses a command line to write them to a file. Apple bought a company in 2015 that developed this process for using the two lenses to build a depth map. Assuming it still works the same way, it actually creates only 9 layers of depth and it obviously works better in some conditions than others. The image seems to be a much lower resolution one than the actual image, which isn't ideal. There are iPhone apps that seem to let you isolate the depth map, but the two free ones I tried failed to work. I gather the iPhone X and XR are much better than the 8+ I have. Quote
Hash Fellow robcat2075 Posted April 24, 2019 Hash Fellow Posted April 24, 2019 Anyone with lots of free time.. I'd be curious to know if any of these schemes are productive... depth map from stereo photos I dimly recall reading that some of the digital cameras used for motion pictures now are recording a depth map channel which allows them to create and alter the 3D in post rather than have to get it right on the set with a dual camera rig. Quote
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.