I was working on a platformer and hired an artist to do one of the characters, and grabbed art elsewhere for other things. Now Godot doesn't like me because the art size is too big, I guess? It runs the test program, but after I hit exit, I get errors about images at size 1 being too big. Now I'm starting to wonder how I should finish the project. Has anyone else had this issue? Any recommendations or workarounds
?
Artwork is too large for Godot.
How big is the image?
The background- which is the greenish sky and the distant dirt, alone is 79.1 KB. 2048 X 1536. I have to resize it, but it won't look nearly as good.
That's not too big. I think OpenGL can handle up to 16K textures. But it's non-power of two so you might have to change the compression settings on the texture. Probably Lossy would work.
- Edited
@cybereality said: That's not too big. I think OpenGL can handle up to 16K textures. But it's non-power of two so you might have to change the compression settings on the texture. Probably Lossy would work.
Lossy compression only saves size on disk – it does not reduce video RAM usage. In 2D, there is no way to reduce video memory usage other than using fewer textures or downsizing textures, as VRAM compression should not be used in 2D (it looks really bad).
However, having a single 2048×1536 texture displayed will not cause any issues on a semi-recent mobile device.
Okay, good to know. Even so, a 2K texture is rather small and I don't see how that would be an issue.
I wonder what gives, then?
That's an SVG. Unless you are doing a lot of scaling, or need vector graphics, it is probably better to use a program like Inkscape or Krita (I think GIMP as well) and export as a PNG or JPG.
Oh, good grief. Apparently I actually have a number of them. Thanks. Although, there is only one thing that might have to be SVG. The main character can grow and shrink from stepping on certain things, and he has a small handful of animations. Is there a way to use SVG at all?
GIMP can batch-convert multiple images.
Yeah, I don't have much experience with SVG, but it is supported. It should be fine for a character, but it's not really for backgrounds or large detailed images.
Will try it! Thanks.
- Edited
As far as I can see, when Godot imports SVGs it always converts them into a texture, they don't remain in vector graphics form. The resolution of the texture (if you don't adjust the scale in the import panel) appears to be based on the width and height settings in the svg file.
You could either set a maximum resolution to use (the import panel's Size Limit setting) on the svgs, adjust the scale slider, or take a look inside of the file (open the svg file in a text editor) and look for a bit like this: width="64" height="64" and edit them to smaller values. The default units (if not specified) for width and height in an svg are pixels. The artist may have been working in real units, like that tree might be several meters tall. SVG has 1 inch equals 96 pixels, so saying an object is big will make the conversion generate massive resolutions.
- Edited
Good point.