[RESOLVED] Displacement Map

Hello, Hello,
in addition to the depth map obtained exporting with the Depthkit, the production asks me for a b/w displacement map to apply other effects and so on.
Can anyone tell me how to do this conversion and if it is possible? I need to quickly convert about 10 short videos approximately 2 minutes long.

Unfortunately I haven’t found any good references online.

Thanks!

@Emanuele Can you share more information about the workflow? If the monochrome version of the depth maps only needs to be approximate, you can use Adobe’s Hue vs. Luma curves in the Lumetri filter to convert the hue-encoded depth map into a luminance-encoded version by drawing a diagonal line from top-left to bottom-right using the control points, but this might not be suitable if you need something with higher accuracy.

Hi @CoryAllen,
Thanks for replying, ideally I would need the same depth map accuracy, however if you can be more specific I can give it a try.
If you have other ideas that we can go along let me know!
Thanks

@Emanuele So after some late-night tinkering with LUT’s (mostly for fun to see if I could do it), I made one that mostly converts the hue-encoded depth map to a luminance-encoded map. It’s a 3x3x3 LUT, so the far edges of the depth map get interpolated closer, but most of the map should convert accurately.

  • Copy the LUT below into a text editor and save it as a .CUBE file (e.g. “lut.cube”)
  • Apply the LUT in the video editor of your choice. I used FFMPEG with the command ffmpeg -i depthkit_cpp.mp4 -vf lut3d="lut.cube" depthkit_cpp_luma.mp4
TITLE "Hue to Luma 3x3x3"
LUT_3D_SIZE 3

0 0 0
0.75 0.75 0.75
1 1 1
0.58 0.58 0.58
0.75 0.75 0.75
0.91 0.91 0.91
0.66 0.66 0.66
0.75 0.75 0.75
0.83 0.83 0.83
0.41 0.41 0.41
0.33 0.33 0.33
0.08 0.08 0.08
0.5 0.5 0.5
0.5 0.5 0.5
0.5 0.5 0.5
0.58 0.58 0.58
0.58 0.58 0.58
0.66 0.66 0.66
0.33 0.33 0.33
0.25 0.25 0.25
0.16 0.16 0.16
0.41 0.41 0.41
0.41 0.41 0.41
0.33 0.33 0.33
0.5 0.5 0.5
0.5 0.5 0.5
0.5 0.5 0.5

@Emanuele Did this LUT conversion do what you needed? I am curious to see how well it works for others.

Hi Cory, sorry for the late reply, the conversion you made works very well, it’s not super accurate but usable for some jobs and really very simple to apply. I think it’s a very useful resource that you might consider refining and including in the official documentation as it broadens the depthkit output compatibility with a lot of plugins and editing software. In the coming months we will do more editing tests and I will keep you updated if there is any news. Thanks for your precious help!

1 Like

@Emanuele Glad to hear it!