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"

Scene Texture Depth?

I'm trying to set up a postprocess material that uses the scene depth, but the scene depth node doesn't seem to be outputting the depth. When I plug it directly in to the output to see what's going on, it seems to just be outputting a uniform white (output value 1?) for the entire screen regardless of depth. At first I thought that maybe the values were just all above 1, but I tried multiplying the result by a fraction and it really does seem to be completely uniform. Why is this and how can I access the per pixel scene depth?

Product Version: Not Selected
Tags:
more ▼

asked Jul 03 '14 at 05:32 PM in Rendering

avatar image

Steyr
11 2 4 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Hi Steyr -

Scene Depth is correct but it has to be used in a comparative fashion so you want to look at it divide by some value to give you a range in which to compare a value. Look here for **more information**.

If you let me know exact the effect you are going for I can try to help you work out the comparison.

Thank You

Eric Ketchum

more ▼

answered Jul 03 '14 at 08:23 PM

avatar image

Lovecraft_K ♦♦ STAFF
36.8k 702 260 736

avatar image Reactant Aug 13 '14 at 06:04 PM

could i divide scene depth by pixel depth to get the distance from water surface to the ground beneath it

avatar image Lovecraft_K ♦♦ STAFF Aug 13 '14 at 09:49 PM

Hey Reactant -

Take a look at the informational page in documentation above. Yes, you could but you will need to set the limits of the pixel and scene depth being tested. (Look at the divide nodes in the Material examples).

Thank You

Eric Ketchum

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

The question might be old, but the problem is still valid.

Your guess is indeed correct: When using SceneTexture:SceneDepth you need to divide the Color Output by a "distance" value. And it should be quite high e.g. 2000. Additionally you probably need to boost the contrast of the result the way you like...

Graph Example for a simple Depth Post Process

depth.png (40.4 kB)
more ▼

answered Nov 11 '17 at 04:13 PM

avatar image

annuschka
11 1 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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