Search Unity

Lightmap sizes and lightmaps during gameplay

Discussion in 'Global Illumination' started by dragriff, May 23, 2016.

  1. dragriff

    dragriff

    Joined:
    Oct 22, 2015
    Posts:
    39
    Hello, this is probably a very dumb question that I could easily find the answer to somewhere, but no matter how much I googled, I couldn't seem to find it.

    My question is about the size of lightmaps (Mb, Gb, etc)

    I have a fairly small scene, but one with a good amount of separate objects.
    This is how it looks. It is an office space:


    Now, after I baked my lightmaps, with Baked Resolution being 50 and Indirect at 7 (Precomputed Realtime GI being off), the size of my lightmaps came to around 0.52Gb, which is quite a lot.
    The lightmap resolutions were 1024x1024.

    Surely that is not quite right, is it? I can't seem to find any mentions about the sizes, so i have no idea. The scene looks alright to me, but I am worried about how it would perform during gameplay.

    That was my first question. The second question is related - Where are lightmaps stored during Gameplay? Is it VRAM, like a texture? Besides VRAM, is there anything else that gets taxed by lightmaps?

    Sorry if these questions are answered somewhere else, and if they are, please lead me to the right direction.
    Thank you.

    EDIT: Forgot to mention: The reason why there are so many lights is because I was trying to simulate an office space that has a lot of ceiling lights and such. I am aware of how lights can be taxing on the system in realtime, so they are all set to be Baked.
     
    Last edited: May 23, 2016
  2. macdude2

    macdude2

    Joined:
    Sep 22, 2010
    Posts:
    686
    How many light maps are you getting? Each is roughly 5.3mb uncompressed, so you'd have to be getting a ridiculous number of light maps (~100) to get such a size. As far as where they are stored, pretty sure its VRAM. And yes, your gpu gets slightly taxed (a single multiply per pixel I believe), but this, of course, is pretty insignificant.
     
  3. dragriff

    dragriff

    Joined:
    Oct 22, 2015
    Posts:
    39
    It says 52 maps, each 1024x1024.

    I did increase the resolution for a lot of the objects, since I kept getting black artifacts at the edges, which seems to have been fixed by increasing resolution.
    I also set "Default Parameters" to "Default-HighResolution".

    I'm guessing I should go through most of my objects and see about decreasing the sizes and resolutions?

    For a scene this size, do you know what would be the average size of lightmaps, just so I know what to aim for?
     
  4. dragriff

    dragriff

    Joined:
    Oct 22, 2015
    Posts:
    39
    Also, when I test the scene with the Profiler, it showed that my VRAM usage for that scene maxed out at 0.8Gb (that is when I stood in a corner and had most of it in my sight. Is that an acceptable amount, or should I still try to go lower? Because technically, shouldn't most, average GPUs be able to handle that?
     
  5. mbhagat

    mbhagat

    Joined:
    Dec 15, 2013
    Posts:
    49
    There is property called scale in light map
    Edit for individual objects to decrease number of lightmap .
    For small and remote objects it can have lower values based on my experience.