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"

Use opacity mask to hide 'occluded' pixels too


I have designed a material which drives the opacity of a material (actually using the Opacity Mask slot) using an algorithm which involves the camera's forward vector.

This material works fine, but now when surfaces are being masked out there are other parts of the object behind that surface which are being rendered, and I don't want them to be!

So basically, parts of the object which would have been occluded by the rendered surface are now visible, despite the material shader setting the Opacity Mask to 0 for the pixel on top.

I'm assuming there will be a way to solve this using a custom depth buffer so that the Opacity Mask material works only on the 'closest' pixels but I was hoping there may be a material expression to make this task easier and cheaper?

Basically what I need to do is either have an object's pixel fully opaque or transparent based on the output for the closest (depth wise) pixel. If that calculates to transparent (Opacity Mask=0) then I don't want to render any part of that object behind it.

Probably sounds quite confusing! but I'm hoping someone out there will know what i mean and have a solution...?

Product Version: UE 4.18
more ▼

asked Feb 24 '18 at 05:23 PM in Rendering

avatar image

6 1 3 9

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

0 answers: sort voted first
Be the first one to answer this question
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