Hi.👋
Today we are going to see how to convert a 2D photo to 3D in After Effects.
🟣 The goal is to first get the Depth map file of the photos and turn it 3D with the Displacement map effect.
1️⃣ Step 1: Get the Depth map file
If you have seen the tutorials on the internet, most of them use Photoshop and After Effects to draw depth map on photo and use it as a Depth map file to make the image 3D.
This is a good method, but it requires a lot of care and time.
There is another way to get the Depth map file with StereoPhoto Maker program. The bad thing about this program is that it is a Japanese software and does not have English tutorial to install.
But I found a virtual software called MiDaS that can easily get the Depth map file with its artificial intelligence. The good thing about this program is that it does not need to be installed and you just need to log in to Google Colab with your Google account to run the program.
▼ MiDaS program
➤ [ Ссылка ]
▼ Code used in program
fig = plt.imshow(output)
plt.axis('off')
fig.axes.get_xaxis().set_visible(False)
fig.axes.get_yaxis().set_visible(False)
plt.savefig('depthmap.png', bbox_inches='tight', pad_inches = 0)
2️⃣ Step 2: Match the Depth map file size with the photo
Open the photo file with photoshop (or other photo editing program), bring the Depth map file into the photo, increase the image size and save the file.
3️⃣ Step 3: Convert 2D photo to 3D
Insert the photo and Depth map file into the composition.
Apply the following effects to the Depth map file:
⚙️ Gaussian Blur
⚙️ Black & White
⚙️ Invert
The Depth map file does not require pre-compose.
Apply the following effect on the photo:
⚙️ Displacement Map
In this effect, change "Displacement Map Layer" variable on the Depth map layer and Effects & Masks.
-------------------------------------------------- ------------------
▼ Financial support for Sharpgraphy ❤️
➤ [ Ссылка ]
-------------------------------------------------- ------------------
Instagram
➤ [ Ссылка ]
Telegram Channel
➤ [ Ссылка ]
-------------------------------------------------- ------------------
0:00 Turn 2D Photos to 3D with After Effects
0:31 Get 3D depth map with MiDaS
2:29 Match the depth map file size with the photo
2:47 Convert 2D photo to 3D with after effects
4:29 Result
![](https://s2.save4k.ru/pic/3oNn8wH4WrE/maxresdefault.jpg)