Download

(Particles) adding a Fresnel to Refraction having adverse effect on opacity?

I worked on the VFX for a university project, and from the top-down perspective of the game they all looked more or less fine. But coming in closer to get some reel footage, I’ve noticed that this causes one of them to use the entire squared normal map for refraction to some extent, rather than just where the normals actually are. Here’s what I mean:

afc2936d0f0a20f1061a86412eefddc75afeb43e.jpeg
Refraction2.jpg

The particle system spawns two, lightly-opaque refraction sprites with uniform distribution in order to give each explosion some variety. As you can probably see, there’s a distinct square shape rolling out with the refraction. Here’s the material setup:

Refraction3.jpg

What I’m trying to find is if there’s a way to mask out this squared-off bit, so I’m left with only the rounded normals. I’m still very new to materials and the technical art side of things, and still going through tutorials trying to understand what everything actually does. But there’s a few things I’ve tried. Reducing the burst spawn from 2 sprites to just 1 didn’t fix it. I’ve tried plugging in maps like this (that match the normal map) everywhere I can possibly think of, either through multiply nodes or just outright overriding my old links to opacity/alpha. Generally doesn’t change much:
T_Pulse.jpg

I’ve noticed that the Fresnel is the culprit, since removing it leaves just the rounded bubble normals and no squared edges. Unfortunately, removing it also reduces the quality of the effect. So I’m sure the cause of this squared distortion is down to my lack of understanding when it comes to utilising the Fresnel node.

If anybody could shed light on what it is I’m missing, I would be eternally grateful!

You need to transform the normal map from Tangent space to World Space, since Fresnel node assumes input is in World Space.

Whaddup.JPG

Not entirely sure why that is, since it seems more useful to have it in Tangent space like UDK’s was - but then I guess it’s more flexible this way.

It’s default to pixelNormal so just don’t plug anything to it and it works.

That’s interesting… will have to test that out.

Thanks Jamsh, a Vector Transform node seemed to work. Made them look a lot different obviously, but I’m glad to be rid of those corners at least. Looks like this doesn’t work for emitters that have a locked axis module unfortunately?

280d58420b4ecdae92adf3457346fed55adfe0e9.jpeg