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"

Near-Camera Fade

So seeing this thread get bumped up reminded me to ask this question: in games like the recently released "Deadpool", if the character comes close to the camera, he does not get clipped but rather softly "fades" to transparency, starting with the points on the mesh closest to the camera.

Is there any way to achieve this desired effect in UE4 via some config setting? Or, if barring that, is there some alternative workaround via the material editor for making something like this possible? If not, I'd like to add it as a request.

Product Version: Not Selected
Tags:
more ▼

asked Mar 11 '14 at 03:13 AM in Using UE4

avatar image

ue4-archive ♦♦ STAFF
49.9k 3662 1989 9113

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

2 answers: sort voted first

It's possible to implement the fade in the material by using a translucent material an computing the opacity depending on the pixel to camera distance. This means each material would have to have this built into, also translucent materials don't do proper z sorting and render slower. In order to have this only used for th few objects that click with the camera the engine needs to compile each material in translucent and in opaqe/masked and switch to the one needed. That feature is not in engine and it would be quite some coding effort. Once you have that all kind of new problems can appear: no z for that object means no correct shadow receiving/fog/DOF. Shading differences can result in popping artifacts. A lot of that can be solved with game restrictions, some can be solved with double rendering. For most projects that is too much trouble.

more ▼

answered Mar 11 '14 at 03:13 AM

avatar image

ue4-archive ♦♦ STAFF
49.9k 3662 1989 9113

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

seems rather easy in the material editor. use the PixelDepth node and if it's < SomeValue then lower the alpha as desired

this would work in UDK, and I really doubt the PixelDepth node has been removed

more ▼

answered Mar 11 '14 at 03:13 AM

avatar image

ue4-archive ♦♦ STAFF
49.9k 3662 1989 9113

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 03:13 AM

That solution /might/ work IF the material is translucent. The thing about UDK is that you can't use translucency without getting all kinds of z-depth ugliness. And this persists even through the alpha composite blend mode. Of course, that depth sorting issue seems to have been somewhat resolved in rocket now, at least as far as static meshes are concerned.

I'll test this in rocket, and report back with a definitive answer pertaining to how characters handle translucency now. The only place where this might still be an issue is if I want to put some subsurface scattering on the skin of a character, and I have to choose between translucent and subsurface scattering blend modes.

Thanks Oscar. :)

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 03:13 AM

well you can't really expect a character to fade its transparency if it doesn't have a translucent material in the first place, can you? :)

ideally, I'd say this post should be rephrased to request SSS to be usable with other blend modes

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 03:13 AM

Looks like the problem of z-depth sorting for characters still persists into UE4. I'll file this as a separate bug report.

Attached are what the character looks like when the blend mode is set to translucent. Based on this, doing the camera-dependent fade seems nigh impossible at this point.

Although it does beg the question of how they managed to pull that off in Deadpool. Especially because that game was built on UE3 technology.

Z-Depth Ugliness Z-Depth Ugliness: Two-Sided Material

(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