Announcement

Collapse
No announcement yet.

How to block skylight in indoor environment?

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

    How to block skylight in indoor environment?

    Hi,

    Like many people, I have an open world map with some interiors.
    To get DFAO and non pitch black shadows (and a decent day/night cycle system), you have to use a skylight.
    The problem is that skylight is affecting everything, so my interiors are affected by the skylight.

    I know it's a known problem because I've read almost every post about this and there's a lot.
    So here are the advices/workaround I've found:
    - Be sure that cast shadow is checked on the skylight : It is but it doesn't block the skylight, some faces are darker but not the whole room.
    - Use light propagation volume. Maybe I don't understand how to use it but it doesn't block the skylight to me. I activated it using the LPV documentation but my interior rooms are still affected by the skylight.
    - Turn off skylight when you enter a room. Could do the trick but the exteriors shadows are pitch black when you look outside from the opened door/window
    - Pray for Epic to add light channels on skylight. Might be long..

    So from what I've read, there's actualy no solution at all to make an indoor/outdoor map that doesn't look ugly or am I missing something?

    #2
    There is not. You can just use some trick to fake it. We use a baked stationary skylight in our open world, and that's a waste of memory to me... the engine needs an easier solution for that imho.

    Comment


      #3
      You can use specified cubemap (instead of captured), and set it when entering indoor.
      Additionally there is one thing with it - tint. Probably it is possible to set some simply white cubemap texture and modify only it's tint.

      Also, in case you use movable sky light, I think it is handy to use simple sky light component inside player character or camera manager, to set/get it's variables.
      Last edited by redbox; 04-24-2017, 04:49 AM.
      Rocketeer

      my portfolio
      my youtube

      Camera Volumes System
      Procedurally Instanced Meshes
      Simple Portals
      Water Flow For UDK
      Setup Swarm

      Comment


        #4
        Originally posted by redbox View Post
        You can use specified cubemap (instead of captured), and set it when entering indoor.
        Additionally there is one thing with it - tint. Probably it is possible to set some simply white cubemap texture and modify only it's tint.

        Also, in case you use movable sky light, I think it is handy to use simple sky light component inside player character or camera manager, to set/get it's variables.
        If you have a movable skylight, using a postprocess with another cubemap won't replace the skylight.

        Comment


          #5
          Originally posted by ginwakeup View Post
          If you have a movable skylight, using a postprocess with another cubemap won't replace the skylight.
          Yep, I know.
          Btw, you can also create post process component inside camera manager to handle it's properties in one place ))
          Rocketeer

          my portfolio
          my youtube

          Camera Volumes System
          Procedurally Instanced Meshes
          Simple Portals
          Water Flow For UDK
          Setup Swarm

          Comment


            #6
            The problems comes when you have a day/night cycle in your open world and have to update the skylight parameters

            Comment


              #7
              Tim Hobson showed how to light a cave interior in one of the lighting live streams.

              Comment


                #8
                ^^ you mean this one I guess
                https://youtu.be/nm1slxtF_qA - forward to 1:06:41

                it's the postprocess volume solution, but he added a plane with a black color and depthbias to fake the indoor part to look darker when you're outside, and the material fades as you get closer to simulate the transition
                that's such a cheap hack but I guess there's currently not many options aside from that
                Follow me on Twitter!
                Developer of Elium - Prison Escape
                Local Image-Based Lighting for UE4

                Comment


                  #9
                  Originally posted by Chosker View Post
                  ^^ you mean this one I guess
                  https://youtu.be/nm1slxtF_qA - forward to 1:06:41

                  it's the postprocess volume solution, but he added a plane with a black color and depthbias to fake the indoor part to look darker when you're outside, and the material fades as you get closer to simulate the transition
                  that's such a cheap hack but I guess there's currently not many options aside from that
                  I'd also like to know a better way to do this. (I've also seen the stream)

                  Comment


                    #10
                    Originally posted by tapirtoon View Post
                    I'd also like to know a better way to do this. (I've also seen the stream)
                    3 years laters there's still no solution.
                    Skylight is projecting a captured cubemap on every mesh as ambiant (global) lighting so there's no way to stop it.
                    Other games/engine are using light probes, working like reflection capture components but for ambiant lighting instead of reflections.
                    Unless Epic is doing this in UE4 (which means: if they need it for a future game) you simply can't do this without ugly tricks (like using volume which will never fit the geometry of your building).
                    Square Enix did those tricks on Dragon Quest XI (UE4 game) and it looks really bad because when you're outside and walk close enough to the walls of a house, you overlap those volumes and lighting change with indoor lighting even you're outside.

                    Comment


                      #11
                      Actually you can modify the brush on a volume to fit almost anything. You just need to access the edit geometry and you can cut/slice vertices (or I think even import a brush?).

                      You should be able to have a postprocess take effect gradually by creating a postprocess material and parametrazing (scalar) a multiplier that you can then handle by way of timeline, or even tick event.

                      Needless to day this actually simulates or replaces the same effect of the eye adaptation?
                      In reality, you could probably just adjust the max/min values of eye adaptation with a trigger volume and instantly get adjusted scene interiors/exteriors depending on a variety of things.

                      How?
                      well, for one you would need to benchmark your liking.
                      Interior / exterior values for
                      dawn
                      noon
                      sunset
                      Midnight
                      4am - the darkest hour supposedly.
                      back to dawn.

                      After you figure out that works for you depending on what you can create a structure or 2 CSV one for interior one for exterior

                      Then based on the values of the CSV you can make an educated Lerp adjustment to find a value in between or even just softly transition to the desired effect (so that you don't suddenly go blind when non comes up).

                      The ability is there, it just takes some brain power and a lot of prototyping to implement to your liking...
                      that's true even with postprocess and volumes.

                      Comment


                        #12
                        Probably the bst solution is to use manually created localized ambient cubemaps and put them, all in PP material.
                        Butperformance of such material will depend on numbers of that cubemaps.

                        Comment


                          #13
                          the actual proper way would be to use localized IBL probes like in other engines
                          I made an implementation https://forums.unrealengine.com/deve...implementation - but the pull request was rejected by Epic
                          Follow me on Twitter!
                          Developer of Elium - Prison Escape
                          Local Image-Based Lighting for UE4

                          Comment


                            #14
                            Originally posted by Chosker View Post
                            the actual proper way would be to use localized IBL probes like in other engines
                            I made an implementation https://forums.unrealengine.com/deve...implementation - but the pull request was rejected by Epic
                            Your IBL probes work nice, but cause they rely on some default engine probes - they are static. So many people need IBL with dynamic for day/night cycles and so on.
                            Implementing IBL on PP probably can be really good solutions.

                            Comment


                              #15
                              Originally posted by Chosker View Post
                              the actual proper way would be to use localized IBL probes like in other engines
                              I made an implementation https://forums.unrealengine.com/deve...implementation - but the pull request was rejected by Epic
                              Exactly. UE4 need light probes but dynamic, not static. That's what's used in The Witcher 3, light probes almost everywhere and refreshed in realtime so it works with day/night cycles, caves in front of you looks dark, etc.
                              This has been requested for age but we will never it unless Epic really need it. It could have been usefull for Fortine but because its cartoonish style, I guess it was unecessary realistic feature for them.

                              Comment

                              Working...
                              X