This is a follow on from the question here:

Animation nodes loop text problem

I am trying to animate the opacity fade of the text object and will use a material's mix shader to set it to transparent BSDF.

The problem I am having is how to trigger this fade-in time in synch with the timing loops set up for the text.

The text element will print (in a typewriter style) for the amount of frames designated by its character length, then hold for a time (designated by its padding), and during this hold time the text should fade out.

I was initially going to approach this problem thusly...:

1) The material output, with a mix shader factor selected, has 21 as its max, which is the equivalent to full opacity. How can we convert this to a 0>1 slider as opposed to a 0>21 scale?

2) How can we trigger it to fade from 1 to 0 starting at the point that the text length is reached? ( possibly use get element list node ouptuts added together to get the total wait time for each element then PLUS the padding time, before the next cycle kicks in)

3) How can we ensure the animation time from 1 to 0 is in sync with the time the text is present on the screen, (perhaps using the padding number here)

...then my brain exploded. Hope you can help!

Blender file here:

Nodes ScreenShot


1 Answer 1


First, you get the length of the current text being displayed and you subtract it from the relative time like so:

Node Tree

This will give you the time starting from when the text got fully displayed. Next, you may subtract another constant to delay the fading effect and divide the result to slow it down. The result is then clamped to the 0-1 range and is used as the factor in a material:

Node Tree

Note that the delay and speed constant are related to your time constant (The value of the divide node after the time info node). So a delay of 5 actually means a delay of 5m where m is the time constant.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.