Depth Passes

Hi All,
A depth pass question. What’s people’s preferred method when given a depth pass to use. I always have a real bugger of a time trying to get good results.
How are you all normalising the pass prior to use. The passes I’m given have a camera fall off of 100000000 and that’s where the fun begins.

Any advise would be greatly appreciated.
Marcus

That is probably a direct world scale Zdepth pass. Where depth values represent real world units. I believe a few of the nodes that take Depth data can account for this… including Physical Defocus.
I you want to normalize this to a 0-1 range divide 1 by Depth (1.0/Zdepth)

This could be a very useful start. Thank you.

That nugget of maths from @milanesa seems like a sound idea.

I do not automatically go straight for the maths.

I use a 2D histogram node and adjust the range according to the histogram.

2 Likes

100 Mil… I hope your pass is 32 bit float

1 Like

It’s sounds like a scaling issue on import… a large scene imported with a mm to meter scene scale or something.

Not that this directly relates to the question, but once you have your values if you’re finding that you get banding when setting your range, you might want to check out a shader I wrote: K_NormalizeChannel.

The issue I was having is that there’s no node in Flame that will operate in 32bits when adjusting values which, depending on the situation, would result in some nasty banding. This will solve that but it has to be the first operation after the clip itself other than a MUX.

Thanks everyone. I’ve also found a what seems like great video from Grant in Flame 2018 that highlights a few gotchas that might help.

As usual it’s these answers from you all that gets these issues solved. Thank-you

1 Like