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"

Depth Mask Shaders?

I've been trying to figure out how to implement a Depth Mask Shader in Unreal Engine 4 for like two days now. I'm coming form unity where it was pretty much just ticking a flag in a shader script and applying that.

Would anyone know how I can create one in UE4? If it involves code, that's fine too, but I can't find any good documentation on what to do in code to enable this, either.

In case it's called something else here, this is what I'm referring to: http://wiki.unity3d.com/index.php?title=DepthMask

Thanks in advance!

Edit: Just to give context, I'm attempting to use a Depth Shader Mask to allow me to write the output of a second camera onto the surface of a mesh. I know about the Scene Capture 2D object, but it doesn't suit my needs exactly.

Product Version: Not Selected
Tags:
more ▼

asked Mar 23 '14 at 10:58 PM in Using UE4

avatar image

JMoore5268
161 4 7 10

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

1 answer: sort voted first

DepthFade node inside the material editor is what you are looking for i suppose.

more ▼

answered Mar 23 '14 at 11:06 PM

avatar image

Jacky
16.7k 671 167 674

avatar image JMoore5268 Mar 23 '14 at 11:40 PM

Thank you for the response. I've seen that feature, but it doesn't really do what I need it to do. I've added some context to my original question to hopefully clarify.

avatar image Jacky Mar 24 '14 at 12:05 AM

What exactly are you trying to make? It would help if you can be a little more specific since I have never used Unity so i dont know how exactly that shader works(i only took a guess depending on the link you showed) and why Scene Capture 2D wont do the job.

avatar image JMoore5268 Mar 24 '14 at 12:17 AM

My actual use case is described in my forum post here: https://forums.unrealengine.com/showthread.php?739-DepthMasks-and-Portals

I'm open to other suggestions, but I'm trying to translate my work from Unity into Unreal so I'm trying to stick to my old ways of doing things. I had this working nearly perfectly in the Unity engine using Depth Mask shaders.

avatar image Jacky Mar 24 '14 at 12:34 AM

Now i see. That's beyond me, however. :\ I've seen a ton of people coming here from Unity though so hopefully one of them or someone with more experience with the engine will stop by soon!

(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