x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

sceneDepth vignetting

Hi,

We are using UE4.16 for a science project and need to extract sceneDepth, however it seems sceneDepth exhibits some vignetting on the edges of the screen.

I've reproduced this problem in a clean project based on the Flying template. The only modifications I made are: - I created a post process material as shown in the screenshot - I applied this material to a Post Process Volume.

Material screenshot: alt text

Then I've positioned a camera facing a wall perpendicularly, created a screenshot and then rotated it (without any translational) movement and made another screenshot. The distance between the camera and any point on the wall should, therefore, be the same in both screenshots.

Real render of the screen (for representation): alt text

However, I've measured the color values of the same spot on the wall and they are quite different. As my depth material is from white to black (with white meaning close and black meaning far), the color of the same spot is much darker when it's at the edge of the screen. alt text alt text

To make this problem more apparent I imported the screenshots to Photoshop and increased contrast.

Can anyone please confirm this is the case with sceneDepth node and any possible solution?

Thanks!

Product Version: UE 4.16
Tags:
more ▼

asked Jan 11 '18 at 07:23 AM in Rendering

avatar image

mitjaprelovsek
84 1 2 11

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Scene depth is not a distance between camera and pixel. It is Z axis coordinate of the pixel in view space. Thus, what you are describing is correct behavior.

more ▼

answered Jan 11 '18 at 10:32 AM

avatar image

Deathrey
7.6k 129 29 289

avatar image mitjaprelovsek Jan 11 '18 at 12:59 PM

Oh ok, so in order to get that distance, I should render Scene Depth in World Units buffer, right? From what I was able to test, the color values are independent of the camera rotation.

avatar image Deathrey Jan 11 '18 at 03:49 PM

You can calculate distance between absolute world position and world space camera position.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question