Closed squimmy closed 1 year ago
I have also encountered this issue.
As a workaround, I suppose you can use the Sprite + AnimationPlayer workflow instead of an AnimatedSprite. It requires more work to setup, but it's technically a more powerful approach.
I began doing that but my sprite sheets have sizes that's a power of two (like 512x512, 1024x1024 etc) and there's blank space padded at the bottom or spacing between rows of sprites. The slicing algorithm does not seem to handle that afaik, which is topic for another issue. I was hoping to use the simpler and easier to use AnimatedSprite for static (but animated) objects like trees, torches etc as it seems perfect for that.
In my project it is working like a charm. Maybe the issue can be closed now?
@pietrodito can you please provide some insight how it is working like a charm for you?
The "fixed" project includes a custom shader. This seems like a good workaround, but I don't think I'd consider the issue fixed unless the intended behaviour is for normal maps to do nothing by default.
Yes, still a problem.
Is this still reproducible in the latest 4.x builds?
Add an Animation to the SpriteFrames for an Animated sprite, and add another Animation with a normal map using the same name with
_normal
appended.
In 4.0, support for normal and specular maps in AnimatedSprite2D
(via _normal
and _specular
) has been removed in #43052 in favor of CanvasTexture
.
But I don't know if this issue remained in one form or another in 4.0 and in 3.x.
so there's no way to use normal/specular maps with an animated sprite at all anymore then, aside from using an animation player with a sprite2D instead?
so there's no way to use normal/specular maps with an animated sprite at all anymore
In 4.x you can use CanvasTexture
with AnimatedSprite2D
.
Ah ok I see, so you just add the frames from a CanvasTexture resource in the SpriteFrames editor
I tested it. In 4.1 this seems to work correctly. In 3.5.2 there are differences between the newly created scene in the editor and the running project:
However, after restarting the editor, the differences disappear:
Fixed by #80406.
Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.
Godot version:
Godot_v3.2.3-stable_win64
OS/device including version:
Windows 10, OpenGL ES 3.0 Renderer: GeForce GTX 970/PCIe/SSE2
Issue description:
When adding a normal map to an AnimatedSprite, the normal map does not always take effect as expected. It seems to work in the editor, but not when the scene is run. Issue https://github.com/godotengine/godot/issues/38509 includes a comment saying this feature "doesn't work", but I don't know if the issue was subsequently resolved, since the documentation was updated to suggest that it should be working.
Steps to reproduce: Add an Animation to the SpriteFrames for an Animated sprite, and add another Animation with a normal map using the same name with
_normal
appended. The expected behaviour (the normal map affects lighting) can be seen in the editor, but is not seen when the scene is run. Opening an existing project with normal maps already added also exhibits the same problem.Minimal reproduction project:
2D Lighting.zip
The normal map animation (
spin_normal
) doesn't take effect in the editor unless thespin
animation is either removed and re-added or renamed to something else and the renamed back tospin
. the normal map also doesn't take effect when the scene is run.