Jump to content

invert depth map


Recommended Posts

Hi,

Again i'm lost with some "simple"? math. How i can invert a depthmap after rendering? I'm not shure if "invert" is the right term.

The lowest value should become the highest values and vice versa. Something like a LUT?...

Thank you

Lucas

Link to comment
Share on other sites

if you just want it decreasing with depth instead of increasing just use -1*depthmap

if you want to see normalized (0-1) range then you can use equivalent of fit() function like fit(depthmap, 0, maxdepth, 0, 1)

if you want to see normalized (0-1) range but inverted then it would be fit(depthmap, 0, maxdepth, 1, 0)

if you want to keep the range just flip the values then fit(depthmap, 0, maxdepth, maxdepth, 0)

so in COPs you can directly use Fit VOP within VOP COP2 Filter, maybe even ramp afterwards if that's only for LUT purposes

for equivalent to fit() in nuke you can use Grade node (where black point and white point are source range and will be mapped to 0,1 respectively)

all depends what kind of output you expect, and where you are compositing that, many tools work with real numbers not normalized ones

  • Like 1
Link to comment
Share on other sites

in that case it would be Grade node

blackpoint: 9

whitepoint: 13

lift: 13

gain: 9

in this case you will still see the image as white of course, but the values will be correct

Edited by anim
Link to comment
Share on other sites

Join the conversation

You can post now and register later. 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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...