# Texture Overlay With Animation

I am fairly new to Blender and don't have a very firm grasp on it. I was wondering if anybody knew how to add a .png overlay on a different keyframe.

I had a wood texture on a plane on keyframe 1, and on keyframe 60 there needs to be a black circle in the center of the plane, without a transition. So (at 30fps) the animation begins and two seconds in, a black circle suddenly appears on the plane, in the center.

Assuming your circle is an image with alpha, you can use one MixRGB node to mix the circle into the wood, and another to control the Alpha.

Wood texture courtesy of Pixabay

The routing from the circle image's Alpha output socket is telling the MixRGB node "hey, I've got alpha data - use this to factor the mix". A MixRGB node's upper Color1 input socket will be what gets sent through the Color output socket when Fac is 0.0, and the lower Color2 input socket will be what gets sent to the output when Fac is 1.0.

There are many ways to do this. For example, to mix in the Alpha you could use a Math node set to Multiply instead. A Fac socket is designed to receive a float value between 0.0 and 1.0, and the MixRGB node provides that, so I thought it would make a good example. As in other graphics applications, when we are dealing with alpha values, 0.0 is represented by black, which results in 0% opacity (100% transparency), and 1.0 is represented by white, which results in 100% opacity (0% transparency). (Forgive me if I'm over-explaining, but you mentioned you were "fairly new to Blender" so I'm trying to be thorough.) That's the reason the Color1 input socket is set to black in my example.

## Animation

Note that the keyframing (yellow slider) is on the Value node. You can of course keyframe the Mix slider directly, but this way you allow for the possibility of letting the Value node's automation simultaneously control some other parameter, should you decide to add one at a later point.

If you end up adding several of these, it might be a good idea to start labeling your nodes to make it clear what each is doing:

On the subject of keyframes, to make an abrupt transition you can either make sure the 0.0 value keyframe is the frame immediately before the 1.0 value keyframe, or you can navigate to the Graph Editor, select the parameter you have keyframed, and press T. Then set Keyframe Interpolation to Constant. This will ensure that the transitions are immediate. First there's no circle, then suddenly there's a circle.

## Customization

You might find that you want to reposition or resize your circle at some point. For that you can precede the Image Texture node with a Texture Coordinate node followed by a Mapping node. For an image texture, usually you will use UV as the mapping method. Here I've set the image extrapolation method to "Clip" so that the circle won't repeat if scaled down.

## The procedural approach

Now that you know how to overlay an image with transparency, you might consider going procedural for something as simple as a black circle. With this method there's no need to think about image resolution, it uses less memory than an image, and it's very customizable. Using Object coordinates will place it on the center of the object. Add a Gradient Texture set to Spherical, then route that through a ColorRamp set to Constant interpolation to change the smooth gradient into a flat circle with a hard boundary.