Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[LIGHTMAP IDEA] Lightmap Layers & Light Groups

Discussion in 'General Discussion' started by Firedan1176, Jul 29, 2016.

  1. Firedan1176

    Firedan1176

    Joined:
    Dec 7, 2013
    Posts:
    48
    I've made a post in the Feedback, if you're interested:
    https://feedback.unity3d.com/suggestions/light-groups-and-lightmap-layers

    Let me make it simple:
    I want to disable a light after being baked. I've heard you can make 2 lightmaps (1 of them it's disabled), and just do a switch-a-roo via code. However, what if I have 20 lights? I wouldn't want to bake 20 lightmaps (Or even 20 factorial, meaning have every possible combination). Time + space.

    In photoshop, you can hide layers with the little eye icon next to the layer. I think lightmaps should be layered like this, too. This is where Light Groups would come into place. Now don't get too ahead--My essential idea is lights will be on different layers and Unity will simply hide a "layer" if you disable a light. However, if you have 50+ lights, That's a lot of layers. So, if there are a lot of lights, then lights can be placed in groups, which essentially will just "merge" lights that are in the same group into one layer. Therefore, if 2 lights are in the same group, you will see 2 lights on that "layer".

    If there's 3 lights (ignoring "groups"), then there would be 4 layers in this Lightmap: 3 would be the light groups, each of which would have Black = Transparency. The final layer is solid black to fill in that transparency.



    Now, tell me what you think about that! Also, let me know if I'm stupid and this is already a thing.
     
  2. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,554
    Use baked realtime lights, adjust light intensity at runtime, and you should see light's influence disappear. This may require a call to DynamicGI class.
     
  3. Firedan1176

    Firedan1176

    Joined:
    Dec 7, 2013
    Posts:
    48
    I'm pretty sure mixed (baked realtime lights) are intended only for using shadows and accurate lighting for non-static objects, however, that doesn't really apply to my post because I'm suggesting layering inside of lightmaps.