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"

Is it possible to make things invisible with a post process?

I'm trying to make a chromatic aberration effect that only affects things that are beyond a certain distance from the camera. I've got the chromatic aberration working, and the objects within the range aren't aberrating, but when the background aberrates, it's grabbing the pixels of the object within the range and distort them, ruining. What I need to do is make the objects within my range invisible so that the effect can get what's behind the and distort that before I make the objects visible again. So is it possible to set the opacity of things based on a 0 to 1 image in a post process? I know that if it is, I'll have the effect I'm after.

The pictures below show my blueprint, the depth image I'm working with, and result of the post-process as it is now.

Product Version: UE 4.21
Tags:
more ▼

asked Feb 21 '19 at 02:17 AM in Rendering

avatar image

Lord Puj
6 1 2 2

avatar image S-ed Feb 21 '19 at 09:19 AM

As I can see on the image, foreground is not affected by the aberration, only the area around it.alt text

avatar image Lord Puj Feb 21 '19 at 12:25 PM

Right. The thing is, I don't want things within the range to affect the aberration of things outside it. The reason I want to make the foreground invisible is so the background can be distorted as if there's nothing in front of it, and then I can layer the foreground elements on top, having not affected the background.

avatar image S-ed Feb 21 '19 at 01:33 PM

You have a render pass (an image), so you only can get and modify data within it. It's like Photoshop filters. You could cut out the foreground and fill that area with some color and then use the Chromatic filter, but it still will be awkward looking image. It's not like foreground is affecting background, it's just background have to work with the same pixels, there are no information what's behind the character.

You may read how that was made for DOF, and make own C++/HLSL implementation:

https://epicgames.app.box.com/s/s86j70iamxvsuu6j35pilypficznec04

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

1 answer: sort voted first

In addition to sampling scene texture at offset location, sample scene depth and compare it with pixel depth. Reject the sample, if depth difference is great.

more ▼

answered Feb 21 '19 at 08:33 PM

avatar image

Deathrey
7.8k 130 31 293

avatar image Lord Puj Feb 22 '19 at 08:19 PM

Sorry, I'm a bit unclear on what you mean. What would that do?

(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