Remap color ( colour ) gradient depth to black and white ramp


Is there any way to remap a color ( colour ) gradient depth to a black and white ramp?

I need the depth at a greyscale so that I can use it as displacement texture

Hi @LukeWilmot, @jonathansims may have some insights on this!

@LukeWilmot i had to do this also. There isnt an easy answer. I believe I ended up using the raw depth mattes from the kinect, which are already greyscale. Youll have to warp pin them to fit the distortion of the RGB stuff from your DSLR.

the alternative is to ( im talking in Nuke terms here ) reshuffle the RGB mattes into something greyscale.

the results werent great, but i was able to get some depth from them.

@jonathansims - that makes sense. We got ok results from feeding the raw RGB colour mattes into After Effects, then using Colorama operator to remap hue gradient to greyscale. It’s obviously fairly detrimental dropping the 24bit depth (RGB Lut) to 8bit (0-255) greyscale, but it works for getting a quick and dirty tessellation matte for Unity.

I’m hoping Depthkit are going to maybe rewrite their Unity shaders to work with new URP pipeline, as that would preserve the full 24bit RGB depth values in Unity, but this is an ok workaround for testing in the meantime.

@LukeWilmot We are revamping our Unity plugin and look forward to sharing updates with you early next year!