Search Unity

Does the lighting engine care about image format?

Discussion in 'Global Illumination' started by newjerseyrunner, Oct 5, 2018.

  1. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    I’ve noticed that when I build my game a larger amount of the package is lightmap images. I have a utility that chains a number of image programs like pngcrush and tinypng together and I can cut about 40% of the package size out.

    I’m worried though that maybe there is a quirk in the GI system or something that I should be aware of though. For example, PNG can have a lot of metadata, which my scrips strip out. Are there things used or does the GI system not care about anything other than that it’s a png?
     
  2. JenniferNordwall

    JenniferNordwall

    Unity Technologies

    Joined:
    Sep 19, 2016
    Posts:
    160
    Hi

    First I would like to know what kind of compression you are using, and if you are using crunch compression. Please have a look at our import settings. https://docs.unity3d.com/Manual/class-TextureImporter.html and check out `Use crunch compression`.

    And I have worked around a lot in the code that generates and imports our lightmaps, and from what I can tell, our baked lightmaps don't really depend on meta data to be able to be loaded in. We do have some import settings, but I'm curious to see how it works in the runtime if this is removed. But please, try our compression methods first.

    Let me know if you have any more questions!

    Cheers,

    Jennifer Nordwall
    Lighting Team, Unity