• 2D
  • Using svg as Sprites issues and investigation

If any of you are aspiring or contemplating to use vector arts, I hope this thread helps in your decision-making. If any of you have used vector arts beforehand, your input is much appreciated.

So for this game project, I'm using vector arts for my game sprites, putting all svg files in my project folder so that I can edit them on the go. However, as I progress through, I noticed that the youtube videos I have been watching alongside doing my project loads slower. Is this a sign that Godot is at its limit and/or I should turn back from using svg?

On my task manager, I observed that by opening this project, Godot consumes about 5% of CPU and 43% of GPU. Are there other factors to consider here?

I understand that Godot uses nanosvg to rasterize my svg files, but how often does it do that to end up with such high usage?

Before returning to png, I want to see whether optimizing svg files would help first. Admittedly, none of them were originally optimal as I usually edit them on the spot. I'm also using shaders on my vector sprites.

[UPDATED] So I cross-refereed with my other projects and noticed that the only other project with GPU usage more than 0% is the one involving shaders (~4%), not the one that also use vector arts, though it currently does not use much. If that's the case, then perhaps the problem lies in using too much shaders all along?

Well shaders, yes. But shaders on SVGs might well be the worse case scenario here, not that I've confirmed that, just a hunch.

I'm also using TileMaps on top of vector arts and shaders; under the TileMap node, I applied the shader as its Material. Does that affect performance as well?

In 3.2 there should be support for batch rendering in 2D, maybe that doesn't support the vector objects, but since they should be rasterized on import I'm inclined to say that is probably not it.

@Megalomaniak said: In 3.2 there should be support for batch rendering in 2D, maybe that doesn't support the vector objects, but since they should be rasterized on import I'm inclined to say that is probably not it.

Batching is only available in 3.2.2 onwards, and you must use the GLES2 renderer to benefit from it.