Godot: A boot splash in JPG format doesn't work anymore.

Created on 18 Dec 2016  路  19Comments  路  Source: godotengine/godot

Operating system or device - Godot version:

  • Fedora: Fedora release 25 (Twenty Five)
  • Kernel: Linux localhost.localdomain 4.8.13-300.fc25.x86_64 #1 SMP Fri Dec 9 14:52:00 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
  • Gogot: v2.1.1.stable.official

Issue description (what happened, and what was expected):

  • What happened: A boot splash in JPG format doesn't work anymore.
  • What was expected: A boot splash in JPG format should work.

Steps to reproduce:

  1. Set up a JPG boot splash.
  2. Play the project.
archived core

Most helpful comment

Does it work in PNG/BMP format or is specific to JPG?

All 19 comments

Does it work in PNG/BMP format or is specific to JPG?

It works in PNG, I didn't try in BMP.

Why would you be using JPG in any other circumstance than:

  1. You WANT grain/color noise (like for horror/dystopian games)
  2. Your image contains many colors that would bloat a PNG (like a rendering or photograph of a complex scene)

?

If you want a simple splash menu (like with a game/company logo, text etc.) JPG is going to have visible artifacts on it especially if it isn't a super high resolution. JPGs don't do large flat areas of color, crisp edges, or gradients very well.

PNG images can also be further losslessly compressed than your image editor probably exports, for instance I use a program called Trimage (uses optipng, pngcrush, and advpng as well as removes EXIF data... don't use on images with partial transparency, though). You can also further reduce size if you reduce the amount of colors beforehand, for instance finding colors that are nearly the same and combining them (especially if they aren't touching each other) and/or reducing the resolution of the image.

Unfortunately there aren't great ways to reduce colors in PNGs aside from directly indexing to 256 colors or using thresholds+layer blend modes+selections in order to manually reduce values/colors without sacrificing detail. You might be able to use a GIMP plugin called cartoonizer but it it really depends on how cluttered/non-crisp your photo is and how much color you need for the end result.

SVG might fix it when it comes to issues with gradients (convert your PNG into an SVG... assuming ), and that's added to milestone 3.0 (issue #4826).

@insomniacUNDERSCORElemon true, but if this issue is true, nonetheless it must be fixed, because it is a bug.

Thanks for the theory but I'm not judging the advantages of one format over another. The FACT is that the editor let me select a JPG image like a splash screen. If the JPG format is not allowed for splash screen this is a bug and must be fixed, equally if it is allowed and doesn't work.

A boot splash in JPG format doesn't work anymore.

Could you explicit the "anymore" part? Did it use to work, and if so in what version?

It worked on Gogot: v2.1.stable.official

I downloaded and tested official Godot 1.1 / 2.0 / 2.1 / 2.1.1 / 2.1.2.
and 2.1.3 / 3.0 alpha custom build.

File filter for boot splash screen have only *.png and *.*
JPG file can be selected with *.* filter.
but I think JPG have not been officially supported for boot splash, even if it worked or not.

This can be closed.

This can be closed.

Can you explain why? :)

From the issue description:

What happened: A boot splash in JPG format doesn't work anymore.
What was expected: A boot splash in JPG format should work.

The first is false, it was never supported, reading volzhs above.
The second is probably also false, since there is no particular reason JPG support should be added for boot splashes. PNG is fine. I mean, the engine only supports PNG everywhere?

So I think this can be closed? The issue could be summarized as "the engine allows you to select any file as boot splash with *.* filter, even JPG files (or .exes, I guess), which don't work as PNG". Thats.. true, but not an issue.

Thanks :)

I used to use a JPG format in one of my projects. Why should I use a heavier format for a splash screen? I can't test it right now but I will...

Why should I use a heavier format for a splash screen?

Since JPEGs are not renowned for their compression quality, it's a much better idea to use a PNG instead. You can optimize PNG images using oxipng.

For what it's worth, most modern games do not use JPEGs anymore; they use GPU-compressed textures (S3TC/ETC2) for 3D, and WebP or PNG for 2D. Godot supports all of these formats.

Well if it works, I don't see any reason to prohibit it. Users can pick what works for them in all awareness. If their splash screen looks bad, it's not the engine's business :)

Yeah, but the point was that it doesn't work, in which case.. well, just use a PNG? There is no reason to support JPG for textures. Edit: Well, seems JPG is supported at least for textures. Mea culpa. :)

There is no reason to support JPG for textures.

JPEGs can be used as textures in Godot games (in 2D and 3D), but not as a splash screen.

Indeed:
spectacle lh2511

The reason why it's not supported is that the splash code comes from the initial initialization of the engine, where JPG support (modules/jpg) is not registered yet in the engine. While PNG support is a core component a.k.a. "driver" (drivers/png).

And yes, incidentally, using JPG as a splash screen is not a good idea as it's lossy -- unless you want to use a photo as splash screen, in which case it's debatable.

Only for records, 2.1 allowed me to use jpeg and it works, al least in the editor. But it doesn't care, the issue was originated by an artist that used to sent me many files in jpeg, "to save space".

testJPEG.zip

Was this page helpful?
0 / 5 - 0 ratings