Can anyone tell me how to simply fade out a material? It should stay for 1 second, then fade out completely during the next 2.5 seconds.
I tried to use time as a input, connect it to the alpha of linear interpolation, A to the sample texture’s opacity (is this simply the alpha value?) and B to 0. I then connected the output of linear interpolation to the material’s opacity. But that doesn’t change anything.
I also couldn’t find a ‘fade-out’ node or something and couldn’t find any helpful ressources about that, just the usual shader rocket science.
Many thanks. But for some reason it’s not allowed to use a timeline inside of a function. I also tried to manipulate a scalar parameter via blueprint (had to create a dynamic material instance for this) but the parameter just keeps it’s default value instead.
But there is a new problem: The reference to the last decal gets overwritten each time the graph’s event gets fired. So only the LAST created footstep will fade out.
So it would make sense to extract the fade out process into a function with a call-by-value parameter for the decal reference. But that’s not possible because UE4 doesn’t allow to use a timeline inside a function…
All this would be MUCH easier if UE4 just would create a dynamic material instance automatically in the background if you set a material’s parameter the first time. It not very intuitive at the moment.
Thanks. But you still have to make that for each footprint otherwise they would all fade out at once.
So each footprint needs to be in a BP, in each BP it needs to create that own material instance and then it needs to change it every tick for each.
Lots happening then for something relatively simple. Maybe when it just transfers the current game time over to the material instance instead of updating it each tick, the material could handle the fade out by subtracting the game time parameter with the material time node. Would be hard to animate any curve though but at least the every tick update wouldn’t be needed anymore.
What should I say? You’re right. Simply fading things in and out seems to be very much work in UE4 for some reason. Sames goes for outlines. Seems like rocket science to me.
In my case I made the footprint a own BP, spawned an instance for every step but kept a reference to it. When the next footstep is spawned, I call the fade-out-and-destroy-method in the former instance before overwriting the reference.
You could bypass the need for timelines altogether by doing “Time - TimeOfStep” inside of the material.
That way all you need to do is set “Time of Step” on the initial creation and then the fade can be calculated from the material itself. You would multiply/clamp to get that into a 0-1 range. In this way you can cheaply time fade a bunch of materials without paying the cost of ticking them all.
To get time matching the time in the material editor you need to use “get real time in in seconds”.
Unfortunately all these methods don’t really work for me because I had to alter every single material in every element slot for every mesh, every decal etc. which is just pure overkill.
It would be really, really great if there was a simple fade-out/fade-in node for actors. It’s just a common operation and it’s really way, way to clunky in the the current version of UE4.
Same goes for simple outlines which are pure rocket science ATM.
I’m having this exact problem now lol. Apparently epic takes an extremely long time to fix things. It doesn’t make any sense that you need to modify materials individually to get basic effects such as transparency.