+4 votes

Is there by any chance any way of giving the 2D Animated Sprites a Normal Mapping overlay effect to allow realtime shadows to be rendered almost similar to one of the Godot Engine's Demo Projects: 2D Normal Mapping?

in Engine by (204 points)

1 Answer

0 votes

With animation you can keyframe your materials/shaders. So you can click into it, keyframe the normal itself.

With an animation player you would animate your sprite's textures, and then animate it's normal maps that you've created.

by (5,240 points)

Thank you for the information. However, what I had in mind was something that would be possible to do using the AnimatedSprite2D node since it's been updated to support it's own animation, rather than doing it old style using the animation player, but considering that the animation player may be the best option that you suggested, should this be done using spritesheets?

AnimatedSprite won't be able to handle that. From what I've discerned, it was made as a quick way to create simple animations for simple things. Like if you have background props and such. It would be much like making an animated GIF that plays on loop forever and never changes.

It has no special controls for it, other than it's basic parameters.

From what I can tell there aren't any helpers for spritesheets for shader parameters, but you can still use Godot's atlases, so expect a lot of manual work, or having to code something specifically into the shader.

It's up to what works best for you, Godot allows for a variety of approaches.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.