Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

B13 directional lightmap changes

Discussion in 'Unity 5 Pre-order Beta' started by Gwl, Nov 14, 2014.

  1. Gwl

    Gwl

    Joined:
    Feb 10, 2013
    Posts:
    13
    Some questions regarding the current directional lightmap pipeline in B13..

    1) Why not support specularity in a way Unity 4 did? We don't like the 2x overhead "directional specular" causes for both storage and processing power in mobile because the indirect lighting is stored separately. Quick testing with custom shader shows that you can still get good enough specular even when using the new "diffuse bumps only" directional mode (shader based on legacy stuff, no PBS). Like the B9 "combined" mode did. At least for us having only diffuse bumpmapping is useless.

    2) Are surface shaders (no PBS) going to be updated to support lightmaps properly? Currently you need to hack the tangent-to-world etc. stuff yourself there, basically duplicating the work and wasting too much interpolators. If yes, relating to 1, could you consider keeping the way to do specular in custom shaders even with "directional diffuse bumps" mode. Of course we could always ditch surface shaders completely and write fully custom ones but would rather avoid that.
     
    chrismarch likes this.
  2. Kubold

    Kubold

    Joined:
    May 10, 2012
    Posts:
    359
    ...actually, right now, if the light baking takes as long as it does... none of it will matter :(
    1 terrain, 800 trees, 15 static meshes (Manufactura K4 buildings) - 9h of baking (on lowest settings possible). In Unity 4 - 12 minutes of baking.

    Can't really work like this :(
     
  3. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Hi! Terrains with lowest possible resolution should bake much faster than this. Are you sure you have set the lowest possible resolution on both baked and realtime GI?
    Please use the bugreporter to send us your project so we can take a look.
     
  4. robert

    robert

    Moderator

    Joined:
    Dec 21, 2008
    Posts:
    265
    @Gwl

    1) Unity 4 was using a very old style of directional lightmaps, which allowed for very imprecise specular. Light direction could never be at a graze angle - it was pulled to perpendicular directions. If you're aiming for the look of "random highlights here and there", then reflection probes are better for that - possibly combined with plain directional lightmaps.

    The B9 combined-style directional lightmaps with specular are not an option. There's no reliable way to handle incorrect directions at shadow edges, and you get very obvious specular lines in penumbra out of nowhere. Of course that's also possible with the current Directional with Specular lightmaps, but much less likely.

    2) Sounds like a bug, that should just work. Could you possibly report the bug and attach your scene or just the shader? That will allow us to let you know when it's fixed.
     
  5. Gwl

    Gwl

    Joined:
    Feb 10, 2013
    Posts:
    13
    Reported as #649658. Didn't attach anything as it's reproducible with internal legacy shaders - looks like the decoding just hasn't been updated for Enlighten there.
     
  6. robert

    robert

    Moderator

    Joined:
    Dec 21, 2008
    Posts:
    265
    Ok, thank you.