I'm looking into using SVG for some of my sprites (2D game), since having perfectly resizable assets that get converted to the desired bitmap scale in-game is appealing. The problem is, I don't see a way to change what scale the resulting imported bitmap has in Godot- is there a way to change that, either in the editor or in code?

Or do I just need to re-export the SVGs at a different DPI from my art program (which feels like missing the point of using SVG to start with)? The SVN Scale section in the Import panel only affects what scale the imported bitmap is, the resolution of the base import is not affected.

It really feels like this is something Godot could handle internally at import time, but I'm not seeing it.

  • xyz replied to this.
  • CodingFerret Unfortunately that looks to be the equivalent of resizing the sprite in the editor, the import resolution of the SVG isn't changed (a scale of 2 results in a larger, but also blurried image)

    I don't think that should happen. If you set scale to say 2, you should get twice the pixel resolution when vectors are rasterized. Just make sure your exported svg actually contains scalable vector data and not just an embeded bitmap. From your description looks like the latter could be the case. If you're using version 4 try to test it with Godot's default svg icon.

    xyz Unfortunately that looks to be the equivalent of resizing the sprite in the editor, the import resolution of the SVG isn't changed (a scale of 2 results in a larger, but also blurried image). So, useful if you, say, resize your images and you want the in-game assets to stay the same size, but it doesn't yield a higher resolution sprite.

      CodingFerret So, useful if you, say, resize your images and you want the in-game assets to stay the same size, but it doesn't yield a higher resolution sprite.

      I guess in this case the possibility of displaying the image in curves would be appropriate. Like in Flash. But I'm not sure Godot can do that.

      CodingFerret Unfortunately that looks to be the equivalent of resizing the sprite in the editor, the import resolution of the SVG isn't changed (a scale of 2 results in a larger, but also blurried image)

      I don't think that should happen. If you set scale to say 2, you should get twice the pixel resolution when vectors are rasterized. Just make sure your exported svg actually contains scalable vector data and not just an embeded bitmap. From your description looks like the latter could be the case. If you're using version 4 try to test it with Godot's default svg icon.

        xyz You are correct, the SVG had exported as embedded bitmaps. Thank you for your help!