Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: helios on December 11, 2006, 05:59:02 PM

Title: Image quality
Post by: helios on December 11, 2006, 05:59:02 PM
Hi,

I am having problems with scene png quality. The png is really fine, the quality is as I would it to be, but when I run the game, it´s not that good. It´s like there is an "image export quality" that I am missing.

Is there anything like that? Any other idea why it should be happening?

Thanks,
Helios
Title: Re: Image quality
Post by: Mnemonic on December 11, 2006, 06:11:36 PM
Hmm? Can you post some screenshot of what you mean? WME doesn't modify your images (other than scaling them when needed). The only known issue with PNG files is that the engine cannot read the gamma correction information some programs are saving, therefore some images may display lighter/darker than in the image editing program.
Title: Re: Image quality
Post by: SoundGuy on December 11, 2006, 07:56:39 PM
Are you running your game in 16bit and not 32bit ?

Title: Re: Image quality
Post by: jlinam on December 11, 2006, 10:43:05 PM
...The only known issue with PNG files is that the engine cannot read the gamma correction information some programs are saving, therefore some images may display lighter/darker than in the image editing program.

I'm curious to know: which graphics programs have had this issue? Is it just with .png's?

Thanks

PS - Sorry if this subject has been previously covered. I searched the forum for .png and found some info re: various programs having transparency issues,but nothing regarding gamma
Title: Re: Image quality
Post by: Mnemonic on December 11, 2006, 11:19:48 PM
I'm curious to know: which graphics programs have had this issue? Is it just with .png's?
If I remember correctly this issue was found with Photoshop 8. Photoshop CS2 and Paint Shop Pro don't use the gamma correction tag (maybe odnorf will correct me).
The gamma correction tag can be removed using some PNG optimizer, such as this one (http://brh.numbera.com/software/pnggauntlet/).
And, yes, it only affects PNG files. It's caused by using an old version of libpng which cannot read the gamma info. There are other programs affected by this issue, for example Internet Explorer.
Title: Re: Image quality
Post by: jlinam on December 12, 2006, 12:18:09 AM
That's useful information. Thanks!
Title: Re: Image quality
Post by: helios on December 12, 2006, 01:28:41 PM
Hi Mnemonic,

I tried with jpg and it worked better, but I had some hard time with images that have shadows and need transparency. In the documentation I found this: "JPG images are only suitable for images without any transparent areas, i.e. you can use them to store solid background images, but DO NOT use them for sprites or other partially transparent graphics. It won't work." Anyway I tried and did not succeed.

So, my new question is, what are the tips for having maximum quality in images with effects like blurs, trasparency, shadows and gradient? What file format give more quality (having less limitations) and in what resolution (the game can handle)? As an example, Project Joe has good quality images with thos effects.


And, the images are created in Flash, so exported from there. And I´ll check that png software you told about :)


Soundguy, I am running under 32 bits. :)

Thanks,
Helios
Title: Re: Image quality
Post by: Mnemonic on December 12, 2006, 01:39:32 PM
I'd still like to see some screenshot, because I can't imagine what kind of problems with PNG you might possibly have. PNG format uses lossless compression, so the quality is always the same (unlike JPG).
Title: Re: Image quality
Post by: helios on December 12, 2006, 02:18:10 PM
Ok, here it is:

The scene in the game (while running)
(http://www.heliospb.net/catedral_gameCapture.png)


The png loaded to the scene.
(http://www.heliospb.net/catedral_cenario.png)

Thanks,
Helios
Title: Re: Image quality
Post by: Mnemonic on December 12, 2006, 02:53:48 PM
Umm, am I supposed to see any difference? Because I don't think I do :)
Title: Re: Image quality
Post by: metamorphium on December 12, 2006, 04:38:56 PM
Mnemonic: there's a horse missing on the second image! ;)

the second has IMo higher gama correction value.
Title: Re: Image quality
Post by: McCoy on December 12, 2006, 06:05:37 PM
I only notice a very slight brightness difference between the two. And it could be due to the gamma correction stuff Mnemonic already mentioned.

About sharpness, they both look exactly the same to my glassed eye.
Title: Re: Image quality
Post by: adonf on December 12, 2006, 06:27:05 PM
In Mozilla the images are exactly the same, but with Internet Explorer one is slightly brighter. Not a lot but still noticeable.
Title: Re: Image quality
Post by: odnorf on December 12, 2006, 06:35:43 PM
The two images you posted are exactly the same! The first one (the captured one) has a gamma tag but probably your screen capture program added that or you gpu drivers. That's what causing the slight brightness difference. If that's what you are meaning with "quality problems" then try to check your gpu drivers.
Title: Re: Image quality
Post by: helios on December 12, 2006, 06:42:47 PM
Metamorphium, you´re correct.
It´s really small difference, and I´ll send your replies to my project designer, who said the shadows in the ground have less quality and asked me about it.

Ok, thanks all for the help!
:)
Title: Re: Image quality
Post by: odnorf on December 12, 2006, 06:48:49 PM
There is no difference at the ground shadows. Except the gAMMA tag and the horse shadow the two images are pixel to pixel identical.
Title: Re: Image quality
Post by: helios on December 12, 2006, 06:55:26 PM
So it´s not only me who sees it (or don´t see).
But it was good to write, cause I didn´t know about gamma correction problem.
Thanks
Title: Re: Image quality
Post by: helios on December 17, 2006, 02:55:45 PM
Hello again,

I am using the same topic cause the problem here is the same and now visible, and a bit frustrating.

The problem is when I export an image with light. As it looses itself on dark, the vector is made with gradient. Ok, nothing wrong, but when I import to WME, the circle ends is visible, you can see where it finishes, it´s like the gradient comes from 100% to 15% and then to 0%.

I will post 3 images. One from Project Joe, an example of a game that uses this effect with success, and my image, having both exported png and the png inside WME.

It´s not a huge problem, but it´s frustating, mostly when I see another game made with WME that hasn´t the same one.

Project Joe capture:
(http://www.heliospb.net/projectJoe.png)

Png exported from Flash:
(http://www.heliospb.net/png_imported_to_wme.png)

Same png improted to WME:
(http://www.heliospb.net/during_game.png)


After posting it, and checking the images, I noticed that the end of the circle in my game is not so easy to see here, cause of the white area around, but in game with the whole scene is far easier to be seen, and catches attention:

(http://www.heliospb.net/during_game_2.png)


Thanks,
Helios
Title: Re: Image quality
Post by: Mnemonic on December 17, 2006, 03:45:28 PM
That Joe animation linked above uses an alpha channel (it's a 32-bit image, the transparency is achieved by an alpha channel), your image is 24 bit with no alpha channel.
Title: Re: Image quality
Post by: helios on December 17, 2006, 03:56:32 PM
Mnemonic,

My image is 24 bits, ok, but with alpha channel. When exporting in Flash I use this, other that that, the image background could not be transparent (it´s imported above the scene background image, so anything other than the object and it´s light, have to be transparent, or I could have an white (or any other color) area above the background).

Title: Re: Image quality
Post by: Mnemonic on December 17, 2006, 04:23:08 PM
What are your exporting options? Can you save the image with full 8-bit alpha channel? That would solve this problem, as far as I can tell.
Title: Re: Image quality
Post by: helios on December 17, 2006, 04:51:26 PM
Sad but no. I can only export 8-bit, 24-bit and 24-bit with alpha. I tried to force it, opening the 24 with alpha exported by Flash inside Photoshop, and from there export 8-bit with alpha, but it didn´t work.

Do you know some vector software where I could export 32-bit with alpha channel?
Title: Re: Image quality
Post by: helios on December 17, 2006, 07:10:33 PM
Mnemonic, I just exported a 32-bit with alpha channel image, from a software that exports directly from Flash, but the result is just the same.

This software I just used is "Flashants SWF2Video Pro", used to export from Flash even to TV.

So I think that this 32-bit question is not the solution.

Do you, or anyone, knows who created Project Joe? If I had no working examples, could think of this as a limitation of WME, but it´s not the case, since we have a good example that uses it many times. I "just" need to know how.  ;D Cause this circle around the light is ugly!  :-[

Title: Re: Image quality
Post by: McCoy on December 19, 2006, 10:22:09 AM
Maybe it's just a problem of the original flash image and it doesn't matter how you export...

Project Joe's graphics were done in Photoshop. Try to make a quick test in photoshop of the same image, and export it as 32bit PNG. Then check if the same problem arise. If not, then I think it's a Flash problem, at the way it internally sabes and handle the data, not at exporter level.
Title: Re: Image quality
Post by: Jerrot on December 28, 2006, 12:09:00 AM
Maybe it's just a problem of the original flash image and it doesn't matter how you export...

I agree with McCoy, obviously the alpha channel DOES work already, but - with my eyes only - I guess that the gradient in the original doesn't fade out completely to 100% transparency at its borders.
Title: Re: Image quality
Post by: Mnemonic on December 28, 2006, 04:04:06 PM
Well I did some tweaking and it should work better in the next release.
Title: Re: Image quality
Post by: helios on January 04, 2007, 01:27:59 PM
Hey,

My problems with png quality are gone! The solution, I´ve installed the 1.7 beta2 version of WME.

That´s it for now,
Thanks for all the help.