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"

Is it possible to sample custom depth in UI Material?

I have been trying to sample custom depth in User Interface Material Domain. I have assigned the material as translucency and tried various combinations of Sample Scene Texture and pixel depth to no avail. I am starting to wonder whether its possible at all to sample the custom depth in anything other than Post Process?

The general idea is to get the UI to render behind the main character but on top of everything else in order have no clip with walls.

Best Regards Vincent

Product Version: UE 4.9
more ▼

asked Oct 22 '15 at 07:09 AM in Rendering

avatar image

36 1 4 6

avatar image Vincent.UltraUltra Oct 30 '15 at 02:37 PM

No one has any idea?

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

2 answers: sort voted first

Hello again!

Through an accident I discovered that a UI Material can sample from Custom Stencil when drawn in HUD event! Thus you could get that the material is occluded only by the player.

But when using widgets its still not possible to sample Custom Depth in UI material.

The current working idea is to move everything from widget to HUD with draw simple. If there is another way, I would be very eager to hear about it. :)

more ▼

answered Nov 20 '15 at 10:11 AM

avatar image

36 1 4 6

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

Hello -

UI Materials and the UI specifically cannot read from Scene Depth at all. It is rendered outside of the world Scene Depth passes.

Eric Ketchum

more ▼

answered Nov 10 '15 at 09:02 PM

avatar image

Lovecraft_K ♦♦ STAFF
36.8k 702 256 733

avatar image Vincent.UltraUltra Nov 11 '15 at 08:41 AM

Thank you for your help Eric, on the off chance that you see this again.. Is there another way to in anyway occlude UI material? If its rendered outside of SceneDepth passes, can the depth be saved between frames to be used for occlusion? Thank you again.

(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