Search Unity

Reason for custom lightmap parameters resolution clamping

Discussion in 'Global Illumination' started by pojoih, Mar 14, 2015.

  1. pojoih

    pojoih

    Joined:
    Mar 30, 2013
    Posts:
    226
    I've noticed I can only control resolution in custom lightmap parameters from 0.01 - 100.
    Any reason form clamping this? I've got 10km diameter asteroids, 2m cockpit objects and 20m ships and since "Lightmap scale" does not apply to realtime GI this range is not enough to get good illumination on the small objects within reasonable computation time (or it get's stuck with too less RAM).
     
    markomarko and topofsteel like this.
  2. Kuba

    Kuba

    Moderator

    Joined:
    Jan 13, 2009
    Posts:
    416
    The Realtime Resolution and the Baked Resolution in the Lighting panel are clamped to [0.0001; ∞).
    We will make the the resolution in LightmapParameters behave in the same way (in the next or next-next patch release).

    In the meantime you can shift the entire scale by just adjusting the Realtime Resolution in the Lighting window.
     
  3. pojoih

    pojoih

    Joined:
    Mar 30, 2013
    Posts:
    226
    hmm the gap is still not enough for me. 0.01 in Lighting Panel, 0.01 in LightmapParameters for big objects, 100 in Lightmap Parameters for small objects).
    But good to hear this will be patched. Will wait for the next release and stop touching the Lightmap in the meantime.
    Thanks Kuba
     
  4. Kuba

    Kuba

    Moderator

    Joined:
    Jan 13, 2009
    Posts:
    416
    You sure it's not enough? :) It allows you to to have texels 10000 bigger on one object than on the other (LightmapParameters with 100 on one and 0.01 on the other). So in your case you can have 4 texels spanning the 2m-wide cockpit and as few as 2 texels spanning the width of the 10km-big asteroid.
     
  5. pojoih

    pojoih

    Joined:
    Mar 30, 2013
    Posts:
    226
    sorry I meant 0.001 global realtime resolution. 0.01 is already hours of baking time.
    Inside the cockpit there is a widescreen monitor (quad) about 30 cm wide. When I crank up the emission value nothing happens inside the cockpit.
    But when I scale the cockpit 10x bigger everything works fine.That's also my current workaround: Scaling it too big and rescaling/positioning/parenting it at runtime on the player.
    For testing I've tried changing global realtime resolution to 0.01 (first disabling all the big objects) with correct object scale and it gives me the same results as o.oo1 with wrong scale so it seems to be exactly the problem.

    But that's all a matter of comfort and lazyness (and making unity better). Of course I can wait overnight for lightmap baking and the current overscaling works fine as well so no hurry ;).
     
  6. Kuba

    Kuba

    Moderator

    Joined:
    Jan 13, 2009
    Posts:
    416
    To make sure your tiny objects (relative to other objects in the scene) are influencing the rest of the scene when they are highly emissive you should mark them as "Important GI" in the Lighting window > Object tab. From the tooltip:
    "Make all other objects dependent upon this object. Useful for objects that will be strongly emissive to make sure that other objects will be illuminated by it."