Adding custom textures (such as normal map) to 2D Animated Sprite?

Using 4.2

In the SpriteFrames tab, I can add frames for my 2D animation, but I have a couple of textures to go along with each frame that are getting using in a custom shader. I see nowhere in the editor where I can add these to coexist alongside my frames in the SpriteFrames tab.

You’ll need to use a CanvasTexture for that and use that new resource as the sprites in your animation.

2 Likes

This is correct, but I didn’t understand what you meant initially, and it took me about 30 minutes of guess and check to finally see what you mean. Because I’m worried that other beginners like me will not understand it, I’m going to rephrase it here.

When you load your frame images into the SpriteFrame tab, you are probably loading plain images, which, in Godot is one type of texture. You can optionally load a “CanvasTexture”, which is a different type of texture that contains the sort of things that a shader would use to calculate lighting, such as normal, diffuse, etc.

To make a CanvasTexture, you will need to go to your FileSystem and make a new file, select the option to make a new resource, and then make a CanvasTexture. You will need to make one for each frame in the animation. When that is done, simply put the CanvasTextures in the area where the frames go in the SpriteFrames tab.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.