Animated Decal Material with Opacity not working
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:
This is my Opacity Mask:
This is my basic setup:
And this is the final result I'm getting:
Some weird stuff going on there.. Any thoughts?
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.
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.
answered Jun 07 '17 at 07:25 PM
How do you setup your Decal Material.
I make this decal material with flipbook without problem.
answered Jun 06 '17 at 10:03 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here