How to fade out static meshes (ie. when a npc is killed)?

Hey guys,
I’m wondering if there’s a way to get a static mesh to fade in and out. Exactly like the environments of diablo:

I know how to get it to work in both matinee and in blueprint. But the main problem I’m finding is in the material. If the material is masked then it won’t fade out. It’ll appear and disappear and that’s too harsh. If I set the material to translucent, then the whole material becomes see-through but does fade in and fade out properly.

Anyone have ideas on how to achieve fading of an object?

did you manage to achieve this? I’m trying to do the same.

Yeah I figured it out. I’ll post up the blueprint when I have the chance. But this is pretty much how it works:
Make sure you have two of the same static meshes you want to fade in and out.
Make sure they’re overlapping (you can spawn one of them over the other when you need something to fade out but I just always left them both there overlapping)
One of those objects will have it’s regular material, The other will have a translucency material.
Then I switch out the objects to make it look like it’s seamlessly fading in and out.

I hope that helps. I can get more in detail if you want?

Thanks, got it working doing what your said :slight_smile:
However I can still see through the material during the fade out/in transition, so it’s not perfect.
Apparently it’s impossible to do it using just one mesh with translucent material at the moment: Why is this translucent material not opaque, if opacity = 1? - Rendering - Unreal Engine Forums

Yeah, currently you need 2 separate meshes using 2 different materials.
It should work perfectly fine though. I got mine to fade perfectly. I will be away from the computer for the week. But I’m willing to help with the fading if yours isn’t working properly?
I’m posting my an example of how the fading works for a project I worked on.

http://giant.gfycat.com/DelayedElderlyIbizanhound.gif

Hey, I came across this because I want to fade out everything in a level. So I guess this is simultaneously a question and an answer. How come you arent using dynamic material instances for the materials on your character?

You could set it up in the construction script, make a parameter for opacity, then change the opacity per tick during run time?

Seems like a good solution- I’m just trying to work out if it would work for a whole level or if thats going too far :wink:

The reason I’m not using a material instance is because you need two separate materials to even be able to achieve a fading effect. If you use an opaque material, when changing the opacity it’s linear. The opacity of an opaque material is either there, or not. There’s no translucency to it, thus not being able to get a proper fade. If you use a translucency material then whatever mesh you have it applied to will always be translucent. Translucent materials are never fully opaque (solid).

You can read the above comment I posted on how I was able to achieve the fade. You do need a parameter for the opacity and will need to be able to change it during run time. You just need 2 separate materials and 2 separate meshes to be able to achieve a fading effect.

I hope this helps, feel free to comment back if you have any trouble.

Thanks man. realizing that this approach simply wont work for my current problem. Going to have to do a generalized effect with post process settings or something like that. But your approach will definitely come in handy for fading characters in and out, which I’ll also be doing…

Just found this, did you duplicate everything at the start or just duplicate things as they moved between the player and the camera etc?

Any news on this? Also searching a simple method to fade-out/in a mesh if there is any.

Why do you need two materials?
One static mesh with two materials works as well, does it not?