Screenshot Scene Depth bug

I’m expecting the screen depth to be a gradient, but get the following result when doing a high-res screenshot.

Hey rotwang,

This is the expected result when viewing the Scene Depth. The grey scaled lines you are seeing are from the BP_Sky_Sphere mesh and the distances related to the the curved faces of the mesh itself. The differences in shade indicate the distances close or far away.

This is also helpful when breaking up the scene when you are viewing a large level with the Sky sphere so you can determine what is in the distance.

View Modes - Buffer Visualizations

For further insight on the Buffer Visualizations, take a look at the documentation I have provided, and let me know if you have other questions.

Thank you,

I want the depth of the sky to be infinite, is there a way to achieve this? Thanks.

What are you trying to achieve by making the sky infinite? The Scene depth defaults to a gradient falloff from closest (black) to furthest (white) automatically? In this case, furthest will eventually fade into the distance as if it were an infinite plane

In any case, if you want to create your own custom scene depth, you will need to do this via a post process volume blendable. You can use the forum post below to get an idea of how it is done.

Thank you,

Hi, Andrew:

I am working on computer vision algorithms to automatically estimate the depth of a scene from RGB image. So I hope the depth of the sky can be infinite, the same as the real world.

I use the SceneDepth of BufferVisualization to get the depth. I still don’t understand why the SceneDepth of the SkySphere is in this stripe pattern and sometimes white, sometimes black. I carefully read your answer and the links you provided, but still can not understand.

Thanks.

The Normalization equation provided by the documentation is not necessarily accurate, but the principle of normalization still can be applied. The multiplication by 0.0001 and the frac is what creates that stripped pattern you see in Scene Depth Visualization because otherwise it would be a solid gradient from 0 to 2^24-1 which to most people looks like a bunch of whiteness. Multiplying Scene Depth by a Fractional Number (0.0001) is the same as Dividing by a whole number (1000) and they both limit what the range of the depth sampled.

The frac is useful only in the visualization because it will help users see the depth based the divided amount. So x0.0001 is saying, make a gradient from 0 to 1000 units in Scene Depth, and anything after 1000 units will be 1. The frac then essentially tells the gradient to repeat because it is only taking fractional values.

Thank you,

There is one Scene Depth that is most important (out of all those 0.0001 fractions of the 2^24-1).

And that is the Depth from the camera to the BP_SkySphere.

Honestly we can’t use this buffer for anything here while making architectural animations out of Unreal. If there could be a setting somewhere in Project settings → Rendering then that would be awesome. Also I am quite sure that when you render out a movie the Z-depth could easily be in HDR.