Announcement

Collapse
No announcement yet.

Advanced Question: Using multiple Global Illumination Lightmaps during runtime

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Advanced Question: Using multiple Global Illumination Lightmaps during runtime

    Hey all. I've been toying around with the movable Directional lights, and their implications for a full day-night cycle. The thing I'm running into is that if I want Full Global illumination, I can only bake one map. So the GI is only accurate for one time of day, so during the 'night' cycle the indirect lighting is laughably too bright, too warm and simply destroys the SOD. Now, The first response is to disable the GI entirely and work with dynamic light and simple lightmaps only (doom 3 style). The only problem is that my current project requires a lot of naturally lit indoor areas (no electricity, no artificial light sources), making GI and Indirect Lighting a requirement. I know the engine has the ability to store multiple single-channel lightmaps using toggle lights, however these lights are basic 'no-bounce' single-color lights with little use for simulating natural light. Is there a way to tap into the engine's ability to store multiple lightmaps in order to bake in say, 3-4 different 3-channel indirect lighmaps that can be accessed in the same way a point-light togglable can?

    #2
    I hate to bump, But does anyone have an idea? is this more of a programing question?

    Comment


      #3
      Currently, the only solution to this as far as I'm aware is to generate your lightmaps using an external package and an appropriate lighting solver (which could be a pain if you intend to not model everything in said external package). You can sure copy the generated lightmap textures that UDK creates and use them in your own materials, but I don't believe the lightmaps are generated in any way you could manipulate them (more a per light than per object basis).

      Comment


        #4
        Originally posted by ambershee View Post
        Currently, the only solution to this as far as I'm aware is to generate your lightmaps using an external package and an appropriate lighting solver (which could be a pain if you intend to not model everything in said external package). You can sure copy the generated lightmap textures that UDK creates and use them in your own materials, but I don't believe the lightmaps are generated in any way you could manipulate them (more a per light than per object basis).
        What I was thinking is to bake a GI map, export the lightmap and break it into three single-channel textures and then hack the togglable lights to reference one of these different lightmap textures, in such a way that you have three toglable lights for each three-channel GI map. But there is no option for designating which lights correspond to which lightmap: its all in native code. So, back to the drawing board it seems...

        Comment


          #5
          Did you ever come up with a solution for this problem, KazeoHin? I'm currently trying to store light information for different time periods. I was hoping to bake the lighting onto the meshes and terrain 4 times (Morning, Day, Dusk and Night) and then just choose which lightmap to load at runtime via level streaming or some other method.

          Comment


            #6
            what about a light function on the light that the brightness can be changed via matinee as a material instance constant.

            Comment


              #7
              It's not the light brightness per se. For example, I have street lights which are inactive during the mid-day build but active at the dusk and night build. However, if I build the night build with the street lights, then open the mid-day build, the meshes have the lighting information from the street lamps built in as the lighting information is stored in the package.

              The only way around this I can see is to have 4 packages of the same meshes, one for each time of day.

              Comment


                #8
                Because of all the problems mentioned here, and a few others not mentioned, I decided that I cannot implement a day/night cycle in my game at all. UDK simply does not handle the transition from interior to exterior areas very well, but mainly, there's too much of a difference between how lighting is handled on statics and dynamics and speedtree doesn't work with it either.

                Unless we can store and access lightmaps as textures to toggle or blend with material instances, we can't have day/night with GI. It's just not feasable. The solution is to build GI at the night time setting and let the lights illuminate it for day time, but balancing it will be painful to say the least.

                What you could do, that I cannot, is stream the interiors as separate maps. I can't do this because my world is literally one interior area leading to the exterior with entirely too much exterior visibility and vice versa. It's a single house with windows.

                It is my personal opinion that a day/night cycle is reserved for exterior only levels. If somebody comes up with a good solution, please reveal it because it IS something I desperately wish to include in my game. For now, screw it.

                Comment


                  #9
                  Like I said before, you'd just have to do it manually in a 3d application with a decent light solver, then use cunning materials to interpolate between them. I don't think there's any other way.

                  Comment

                  Working...
                  X