PDA

View Full Version : Bugged PNG Export?


czarekkwasny
06-16-2008, 06:23 AM
Hello folks. I've chosen PNG format by default for rendering output, as I assume it's the most flexible/versatile format providing very good lossless compression, as well as alpha channel support.

The point is XSI writes PNG files in such a way that they are read differently by applications. In some of them the colors are pretty washed out, here's the comparison:

http://czarekkwasny.com/temp/washed_png.jpg

The point is it's not only the Windows Picture Viewer, but also some other applications ie. Flash.

Sarford
06-16-2008, 01:13 PM
That could be a problem of the color profiles. I don't know if XSI adds any color profile information to the rendered images but it is very well possible that most aplications work within a specific profile and convert imported pictures to that profile if they don't find a profile attached to it.

A solution to this is to load your image into Photoshop and add a profile to it. sRGB is a good profile for use on the internet. When you save your image, make sure it also saves the profile data. In general, flash respects the profile data so your picture should look better.

czarekkwasny
06-16-2008, 03:49 PM
Thank you very much for the answer!

I think it's some kind of idea... I read about PNG format and there's some data chunk indicating whether the image is color-profiled or not, this could be a reason then... I don't think there's a solution for my problem except the one you pointed: to convert an image.

At least I know what could be possible reason.

Thanks for the input again!

czarekkwasny
06-16-2008, 04:13 PM
Hidee ho! :)

I digged a little and found this:

http://www.w3.org/Graphics/PNG/all_seven.html

I put 2.0 gamma images into different applications and seems like IrfanView is handling gAMA chunk incorrectly, but on the contrary it's displaying the image as it should be displayed.

The question remains: Is it possible to change default gAMA chunk value XSI uses, so it's being read correctly along applications that support proper handling?

miga
06-17-2008, 09:34 AM
Same happened for me, too (linux).
It's interesting, that if you save the Render Region as PNG it displays the images correctly in my tests (no washed out images).

A temporary solution would be adding a simple_tone_mapping camera lens shader with gama 0.5

Other programs had this problem too:
POV-Ray
The PNG format files generated by POV-Ray overcome the problem of too much or not enough gamma correction by storing the image file gamma (which is 1.0/display_gamma) inside the PNG file when it is generated by POV-Ray. When the PNG file is later displayed by a program that has been set up correctly, it uses this gamma value as well as the current display gamma to correct for the potentially different display gamma used when originally creating the image.
http://www.povray.org/documentation/view/3.6.1/260/

czarekkwasny
06-17-2008, 10:18 AM
Thanks a lot! Actually I was thinking of some kind of xsi related work-around. This one should be helpful! :)

I wonder if this would be right to report the issue to the XSI development team...

GeneCrucean
06-17-2008, 11:13 AM
Thanks a lot! Actually I was thinking of some kind of xsi related work-around. This one should be helpful! :)

I wonder if this would be right to report the issue to the XSI development team...
Report it. They will decide if it's right or wrong.

paulrus
06-17-2008, 11:23 AM
I've found this to be an issue with image previewers only. If you load the PNG into Photoshop or Digital Fusion, it'll look just fine.

PG

czarekkwasny
06-17-2008, 01:45 PM
Thanks GeneCrucean, will do. :)

Paulrus, you are right, however if you visit the page illustrating correct gamma handling (posted above), you'll come to conclusion that these image previewers are actually handling gamma information (doing it correctly, you may do a test for your self), while photoshop just skips it. That's why images are looking good in PS, IrfanView and so on. It's possible XSI is using wrong gamma value, hence my question regarding reporting it as a possible issue.

Thanks for help!

GeneCrucean
06-17-2008, 01:52 PM
http://www.softimage.com/support/xsi/requestForm (http://www.softimage.com/support/xsi/requestForm/)

... You'll need to be logged in but there is the link.

czarekkwasny
06-18-2008, 08:35 AM
Done!

The case got its id: New issue reported - Render to PNG in XSI. [#SISUPP:21233]

Waiting if there are any results.
Thanks!

3DMastermind
06-18-2008, 06:06 PM
Hi Czarek.
I did some test and it seems that there is a problem as you can see here.
ftp://ftp.softimage.com/outgoing/MANNY/images_to_community/png_issue_small.jpg
I will escalate the issue.
It looked washed out in my viewers but it did look correct in my prehistoric version of PS and Image clip viewer.
Thanks for reporting.

StephenBlair
06-18-2008, 06:21 PM
I think that some of the viewers are applying gamma correction to the PNG.

Use imf_disp.exe, it allows you to set the Gamma.
With Gamma = 1.0 (no correction) the image looks fine.
With Gamma = 2.2, you get the washed out look.