Animated Decal Material with Opacity not working

Hi

So, I’m struggling with the next problem. I’m creating a Deferred Decal Material, it’s basically a shield hit effect that will be added on top of a shield mesh.

This is my Emissive Color:

http://i.imgur.com/9sbTDU5.gif

This is my Opacity Mask:

http://i.imgur.com/AXb5Etl.gif

This is my basic setup:

http://i.imgur.com/cOILR5K.jpg

And this is the final result I’m getting:

http://i.imgur.com/8TGt8UO.gif

Some weird stuff going on there… Any thoughts?

Hi, marianomdq.

How do you setup your Decal Material.

I make this decal material with flipbook without problem.

Hello J0000J. This is my setup

http://i.imgur.com/DAJoBZX.jpg

I’ve made the emissive color solid for the sake of graph simplicity.

Seems good… It should work with proper parameter values.

World Position is used. How does It look like in your scene, with ImpactPosition is set?

Well, thanks J000J, you have contributed to the solution. The thing was that I was using ImpactPosition as a default (0,0,0) and of course, every time I tried to test the decal on a surface, the value for the center of the sphere was waaay too far. I’ve replaced ImpactPosition with ActorPosition and that’s it, now it works like a charm.

Well, the problem is the following:

The InputParameter “ImpactPosition” default value is (0,0,0). When testing the decal (without injecting some value into the input) the material doesn’t work. That’s because the value of the center of the sphere is always (0,0,0) and is way too far from the world position of the material pixels, therefore the sphere mask radius never reaches its target.

The Solution:

Replacing the “ImpactPosition” InputParameter node by a ActorPosition node fixes the problem right away. Another solution is to inject into the input parameter the current position of the decal, but that forces you to inject through code or BP to have a preview on real time in your game.

For either case, the real-time preview in the MaterialEditor doesn’t show the right effect, it only flashes. I think that’s because it cannot calculate the ActorPosition yet.

http://i.imgur.com/F3Iz0bU.jpg