Fade out object with many materials without use of material transparency

Hello there.
I know this has been discussed here several times but I still cannot find clear answer:
Is it possible to fade in/out the whole complex object with many materials used?
All advices here lead to some material shader solutions and that is not handy, fade out would have to be done for all materials used. Imagine joined model of a human with 30 materials - it should smoothly dissapear from the scene. Sure I can do two renders (with and without human) and fade it in post… but i would love so much if there was some “proper” solution since this need happens often in my work.
Thx a lot.

Good morning, @ondrej.sevcik! I’m not sure which exact material solutions have been suggested, but the method described in the below video seems to be the best way I’ve been able to find to do what you are asking. Understandably, you are between rendering twice with and without your object and adding an attribute node to each material to control alpha at the object level. I’m not sure if you are using Cycles or Eevee, but if you are using Cycles and you don’t want issues with your back faces showing through as your object fades, you’ll want to roll your own backface culling shader like this:

Here’s the video explaining the custom object attribute used for object-level alpha control:

Let us know if you still need assistance and have a great day!


Hello and thanks for your reply. I am using evee since cycles are painfully slow. Anyway what I understand is that the only way to fade out object with many materials is to fade out every material - one by one, right?

Well, I assume you are keyframing your fade, so ideally you want to be able to keyframe one property and control the entire object. The method in the video creates a custom attribute at the object level that allows you to keyframe just one slider to control the alpha for the entire object. You just have to do the initial legwork of connecting the attribute node to the alpha socket for each material you want to fade.

Then, in the Object properties, you keyframe your custom alpha attribute for the entire object et voilà!

If you are using Eevee, you don’t have to worry about the backface culling shader I demoed above - just the Backface culling checkbox under the Material Settings (also shown in the video).

I might be able to record a short video of the full technique if you think it would be helpful. Let me know.

1 Like

The custom object property is definitely good to know. However, you still have to mess around with your materials. Currently doing some motion graphics and this is really annoying.

I don’t want to create copies of materials since I use the same material on multiple objects and want to be able to tinker with them later on. But then I also use multiple materials per object. Haven’t found a good solution yet for this simple task.

And there are also other posts referring to the same question/issue (and many YT videos showing the mix shader approach).

You can create a value node. Make it as group without input. And plug the value wherever you want( opacity or mix factor of a transparency shader). And use this group in each material.
Animate the value inside the group.
Anyway… it’s an old post.
But could be usefull… this is a Faq.

What I’d suggest doing, is creating a small nodegroup that you put in front of all the materials. Then what you do in your custom node group will apply to all the other node groups that you put in front of all your different materials, as long as you dont expose the edited value to the outside of the node group.

Seem to be the same thing

Thanks, that’s a good solution if you just have one object with multiple materials. However, what about many objects (where each one has multiple materials) and you want to fade them out individually. I see no other option than to copy the materials and to use your approach on each object.

My use case is as follows: I have rendered LaTeX math equations and text embedded as mesh in my scene. I put different parts of the text or math expression in different objects to ease animating them. However, parts of one mesh might be colored differently, e.g. normal text white and then something highlighted in yellow. So I assigned the yellow material to the respective part of the mesh.

Now I try to fade a whole line, i.e. one mesh that has multiple materials assigned to it. I can do that perfectly fine with the group node method you described. But now this affects all my other meshes as well that have the “white” and “yellow” material assigned.

I could go ahead and create copies of the materials, which right now just consist of a simple emission shader. But I might want to add some custom effects, e.g. add a bit of glow that is pulsating etc. And I’d have to do this for every material then. And a scene might contain quite a few text meshes, so the copying of the respective nodes would be very annoying.

Inside transport for the moment… but could be on the flight’s material assignments, with geonode,when the object is in another object.
Something like mat id slot switch if they are ordered the same way each time for example to reach the animatable ones. White material 0 blue 1 yellow 2…
Effect white 0+3 , blue 1+3, yellow 2+3… to reach the animatable ones

Sorry, I don’t think I can follow you.

Ok, so after digging around a bit more, I finally found a solution. Inside your material, use the Object Info node and connect the alpha output to the fac input of the mix shader which has as inputs your solid material and a transparency BSDF. In my case (using Eeevee), I just plug the alpha value to the strength of my emission shader.

Then you can have the same material for multiple objects and control their opacity individually inside the “Object properties” panel on the right side. Go to “Viewport display”, then “Color” and change the “Alpha” value there. You can animate it too which is exactly what I needed.

1 Like