sphere mask refraction

Hello,

I’m trying to create a material that essentially has panning refraction/normal map and is masked off by a sphere mask to get soft edges. However, it does not work. No matter how ‘soft’ I make the mask it still looks like it has 100%
hardness. I’m sure the way I do it is not optimal (obviously) but it’s the only way I can think of at the moment.

Any help would be greatly appreciated.

Thanks,

Alexanderl, I’m having a hard time picturing effect you’re going for. Can you explain further? What does the mesh you’re placing this on look like? Are you able to provide a mocked up visual of what you want the end result to look like?

Hi Krxtopher,

Essentially all I want is something like “heat distortion” that gets masked off on the edges so I don’t have square particles with distortion on them.

I am a newbie to materials/FX and for this one I am following a tutorial. The tutorial is in UDK so I tried to “translate” it to UE4, but I didn’t get it to work- hence I played around a bit but still nothing properly working.

This is the tutorial I try to follow: https://www.youtube.com/watch?v=uHU6iXB4wdw
He starts with the material at 0.45 and finishes at 8.35.

I hope it makes sense, if it doesn’t I will try to explain further.

Many thanks,

Alexander

Alexander, one important difference I see in your version is that you’ve hard-coded the “Opacity” value to 0. In the tutorial he uses the sphere mask for the opacity instead.

Hi,

I tried re-doing so now it’s exactly the same way he did it in the tutorial. The sphere soft mask is working now, however it is still applying refraction where it is masked and as far as I understood from the tutorial it should not be refractive at all in the masked areas :confused:

*EDIT
I did manage to get it working, however it feels far from optimal. You don’t happen to know a more proper way of doing it? Would love to know. (Top left marked are the working ones)

1 Like

Refraction values should be 1 (white) or greater for natural materials (air is 1, glass is 1.33, diamond is 2.42). Right now the values you’re feeding refraction range only from 0 (black) to 1. So as a quick fix, between your final Multiply node and the Refraction pin use an “Add” node to add 1 to the result before it goes to the Refraction pin. This will boost everything up by 1 which I think will give you the effect you want (I’m unable to try it myself at the moment).

There’s more documentation on setting up refraction here. Although it doesn’t describe the falloff effect you’re creating, it might help to know these basics:

Let us know if my suggestion above works.

Haha, just as you posted that comment I edited mine with an update. I tried what you mentioned but it boosted everything including the normal map, but I “streamlined” it a bit, from my previous post. I just inverted the mask and added it together with the other string and voilà it worked, haha.

Thank you very much for your help. I appreciate it a lot!! :slight_smile: