Announcement

Collapse
No announcement yet.

Training Livestream - Lighting Techniques and Guides - Jan 24 - Live From Epic HQ!

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

    #31
    Originally posted by William K View Post
    Hi Tim,

    Thanks for the stream, I was hoping you'll get more time but i guess that is what it is. If you get the opportunity could you please let me know your thoughts on the following?

    You did talk about the cascades, while i do understand what they do in general I was wondering if you could clarify a few things for us:

    1 - In a situation where the camera moves further from the character, could it be a workflow to somehow link up the dynamic moving shadows parameter of the light to Auto adjust with camera distance in order to keep best possible shadow map detail/cascade onto the character which is moving away?

    2 - As my previous question cinematic or far shadow chackboxes (don't remember which one exactly right now, sorry away from workstation) seem to override the cascades or the detailed self shadowing from them when you get closer to the skeletal object? is this a normal behavior of that parameter or perhaps i'm doing something wrong.

    Thanks.
    Yeah an hour was short and had to get through a lot. Felt like I skipped over some things while moving through it,but that's just the nature of it when going through it all.

    1. Programmatically I suppose, but not that I'm aware of with any feature currently in the Engine. AFAIK you don't get any control over this in BP's either.
    2. I don't think it's Far Shadows as those have a default value of 300k units from the camera. Cinematic from the few times I used it only appears to work for actors that have it enabled and if the light has it enabled. not intended for all actors to use it because it's meant to not worry about capturing things in the shadow depth that aren't needed. I think it's intended for spot and point lights over directional lights, but I've not used it enough. I'll try it some tomorrow though and see what I can find out. from the description it seems like that's the way it should work though.
    Tim Hobson | Learning Resources | Epic Games
    UE4 Documentation

    Comment


      #32
      Originally posted by RennJan View Post
      Hey Tim,

      Can you bake lightmaps to a paper 2d tilemap?

      I'm using paper 2D for GGJ and would love to know how/if it works?

      Cheers
      Renn
      It can but with some limitations as i don't think there is any intended purpose it to be used this way!

      With the sprites you have the option to change the base sprite material. The one that is on by default is using an UNLIT material. If you select this and then in the bottom right corner change the view options to show Engine Content. Then you can search for the same material but it will say LIT in it instead.

      This allowed me to actually set a light and have it baked, but because I don't think it's intended for lightmap baking I didn't find any way to set the lightmap resolution so I think depending on the sprites actual size actually just set the resolution to that. I could be wrong on that part though. It's just my takeaway when I tried it.
      Tim Hobson | Learning Resources | Epic Games
      UE4 Documentation

      Comment


        #33
        Originally posted by Tim Hobson View Post
        Yeah an hour was short and had to get through a lot. Felt like I skipped over some things while moving through it,but that's just the nature of it when going through it all.

        1. Programmatically I suppose, but not that I'm aware of with any feature currently in the Engine. AFAIK you don't get any control over this in BP's either.
        2. I don't think it's Far Shadows as those have a default value of 300k units from the camera. Cinematic from the few times I used it only appears to work for actors that have it enabled and if the light has it enabled. not intended for all actors to use it because it's meant to not worry about capturing things in the shadow depth that aren't needed. I think it's intended for spot and point lights over directional lights, but I've not used it enough. I'll try it some tomorrow though and see what I can find out. from the description it seems like that's the way it should work though.
        Tim,

        Thank you for your reply.

        1 - That's unfortunate.
        2 - I believe i mixed this one up. But thanks to your stream i understood how far shadows are working because i wasn't aware of checking that box for the key light as well. The low resolution issue i was talking about was in fact happening by enabling "inset shadows" on the character and not the "cast cinematic shadow" as stated above (sorry my bad) because i read that it helps with high quality shadowing but it seems to do the opposite so i still don't understand it.

        Thanks again any tips from you are always appreciated!

        Comment


          #34
          Originally posted by motorsep View Post
          Sounds like a good subject!

          Would be nice to see lighting scenarios hands-on how-to (having maybe 6 scenarios total, e.g. morning, sunny noon, cloudy noon, evening, night with and without moon light, and switching between them; persistent level should have multiple streamed sub-levels, for a good measure ).

          Also, could you please go over real-time lighting culling/clipping (if anything) and how to work with lighting in real-time randomly generated levels for desktop and mobile VR to maximize performance and yet having decent look ?

          Also maybe touch on lighting for ArchViz and how to achieve realism for indoors and outdoors using only baked lighting?

          Thanks beforehand
          Lighting scenarios.

          This actually isn't the intended functionality for them. What you're suggesting is transitional lightmaps but lighting scenarios provide a way to have different lighting for the same map while using the same geometry. Transitional lightmaps would do the same but the idea behind these is for only one to be used at a time and swapped out at level changes or just as a separate lighting for the same level. Since all the lighting information get stored in a single build data file that could be a hitch in the load when they are switched, which makes them not usable for that type of feature. At least not with the current implementation. That could change in the future, though, but no plans currently that I'm aware of.

          This next question is really broad and cannot be summed up in a single post or even example. it's just not possible. As far as things to watch out for though:

          - Static Lighting is best for VR, but not open worlds or randomly generated levels.
          - Keep a check on your LM resolutions and texture memory. use the Statistics window I showed during the stream. keep in mind your target platform and performance over pretty is better in a lot of cases. Personally I'm more accepting of a few things that don't look perfect over bad performance or mechanics of gameplay!
          - Mobile VR is much more limited than Desktop. Know the limitations and advantages of each platform and develop for those.

          one idea I did have about randomly generated levels using at the very least the indirect lighting cache was to have a large shadow casting surface in a sub-level that you use to build lighting for. Since it's a randomly generated level you may not know the entire layout BUT you would have a general idea of the play area that would be used. So with this method you get a hidden mesh that generates the lighting samples and can get some indirect lighting for these generated areas. This would probably work better for mobile where lighting is more limited than on desktop where dynamic lighting is not as big a concern. Just a thought I had but nothing I've tried practically.

          ArchViz:

          - Static Lighting is king here with good GI bakes.
          - Good UV layouts for lightmaps!
          - Good use of post process with Bloom, Color Grading, Auto Exposure control.

          Kind of broad but these are areas that I think should be focused on. Grab a reference image and try your best to recreate it. Post Process is often under used in lighting situations to get everything else by just using lightmass. That's a definitely wrong approach and everyone should use all the tools they have to bring it all together.
          Tim Hobson | Learning Resources | Epic Games
          UE4 Documentation

          Comment


            #35
            Hi Tim,

            Sort of answering my own question above regarding "Dynamic inset shadows". So if I check this on my character and then i go ahead and check the tickbox of the directional light to use this feature, it is basically in logic sort of what i need, as in the shadows (both self and cast) stay consistent on the character even though the camera moves far and out of cascades (as indicated in the doc) however it seems that the resolution of those shadows or "the dynamic moving shadow distance" of the inset feature seems locked to a lower res one? which is why it seems that it is of lower quality than a manually adjusted moving distance without the inset feature on.

            Is there a way to adjust the inset shadow quality?

            Sorry if i'm bombarding you with questions but i thought its an opportune moment to do so : ).

            Thanks again.

            Comment


              #36
              This was great. Packed with loads of tips. Looking forward to going over it again and taking notes. Thanks a lot.

              Comment


                #37
                Originally posted by Tim Hobson View Post
                Once we get it on YouTube we'll link here as well in the OP.

                Edit:

                It's also on the recent videos list on the Twitch channel as well here: https://www.twitch.tv/unrealengine/v/117043318
                Amazing, thanks a million Tim!

                Comment


                  #38
                  Originally posted by Tim Hobson View Post
                  Lighting scenarios.

                  This actually isn't the intended functionality for them. What you're suggesting is transitional lightmaps but lighting scenarios provide a way to have different lighting for the same map while using the same geometry. Transitional lightmaps would do the same but the idea behind these is for only one to be used at a time and swapped out at level changes or just as a separate lighting for the same level. Since all the lighting information get stored in a single build data file that could be a hitch in the load when they are switched, which makes them not usable for that type of feature. At least not with the current implementation. That could change in the future, though, but no plans currently that I'm aware of.
                  Thanks for the input!

                  What I mean is exactly that - no smooth transition between scenarios. Imagine you walk around and it's "morning". Then after some time you go inside of a building, screen fades (or not) and lighting scenario switched to "day", then screen fades out of black and when you go outside, it's a day light. Rinse/repeat for however many lighting scenarios the level has. Since it's not a smooth transition, player won't "see" the hitch. And if scenarios can be async streamed, there should be minimal hitch when loading.

                  Comment


                    #39
                    Originally posted by Artboom91 View Post
                    Hey Tim,

                    I have a question, I may be overthinking the science of lighting but how do you control the light bounce, reflection and refraction specially in a big open world scene?

                    Many Thanks

                    Andrew Booth 3D
                    Hey Andrew,

                    To control the bounce of light, as in the number of bounces, you can do this from the World Settings > Lightmass > Num of Bounces. Default is set to 3.

                    For reflection, just making good use of reflection captures and using the Reflection Environment visualization mode from the Viewport view modes can help you there. Also our documentation for how you should use reflections in your scene is helpful as well that you can find here: https://docs.unrealengine.com/latest...onEnvironment/

                    You also have the option of using Planar Reflections now that are dynamic. You can read about those here: https://docs.unrealengine.com/latest...arReflections/

                    As for Refraction, with 4.13 wew have a new Refraction mode for larger surfaces like water without getting that offset that's reading from offscreen. It's called Pixel Normal Offset. You can find this in your Material properties under the Refraction tab.

                    Here is a comparison of the Index of Refraction (default) that works well for smaller objects and Pixel Normal Offset that works well for these larger flat surfaces.

                    Click image for larger version

Name:	Refraction.png
Views:	1
Size:	634.0 KB
ID:	1122050


                    ______________________________________________________________________________________

                    Originally posted by ChiliLime View Post
                    Hey Tim! Will you touch Mobile and VR topics? One thing bothers me at the moment - LDR gives unpredictable lighting on Mobile. I know in LDR scene light is normalized in gamma space, but could you talk a bit about it? How to predict LDR lighting?

                    For Mobile with LDR and HDR there are some differences for sure. I'm not sure that I'd be the best person to ask about consistency between the two because some of that comes down to using art techniques to get the same results or close to with HDR. I think this blog from UnrealEngine.com recently about Disc Jam's lighting on Low and High end renderer is really good overview of what they achieved and some things they did to overcome this. It's well worth a read! https://www.unrealengine.com/blog/ho...nreal-engine-4

                    Also our docs here, which you may have already read, cover the differences for LDR and HDR on mobile if you or anyone else is not familiar. https://docs.unrealengine.com/latest...e/Performance/

                    ____________________________________________________________________________________

                    Originally posted by apaza610 View Post
                    Please guidance on how to use Lightmass for Tiled landscapes would be awesome, cause baking everything creates big file sizes.....
                    World composition and tiled landscapes in general are not ideal for baked lighting. The reason being, as you pointed out, is large file sizes! I'm not aware of any large open worlds that have ever used baked lighting because at that point your texture memory and draw calls for these will far outweigh using dynamic lighting that is optimized and refined for your world.

                    ____________________________________________________________________________________


                    Originally posted by ERuts View Post
                    Hey Tim,

                    Could you include some basic lightning knowledge? For instance, after reading, viewing and studying several lightning documentations, tutorials, etc. I still find myself encountering issues with some of the most basic stuff. For instance take a look at a issue of me here: https://answers.unrealengine.com/que...nownledge.html
                    For something like this, I wouldn't use a point light. They are more expensive than a spot light! This is where some faking can really come in handy to get the same effect at a lower cost. It looks like you've placed the spot light inside your bulb and then you get the light shining from inside geometry causing your artifacts.

                    The way I would fake it and likely some other people too! Use a Spot light below the bulb. Adjust your radius and attenuation to fit your needs. Use an inner radius smaller than your outter so that you get some night highlighting with more light focus directly below the light. The interior of your Light will still be darkened because it's getting anything but bounce light at this point so there is where some faking comes in. If this isn't already it's own material element, make it one in your modeling program. The material that you have assigned here should have it's brightness driven by an emissive color. Use your diffuse texture/color plugged into a multiply that has a constant value between 0 (no emissive) and X (higher gets brighter!) that then plugs into your Emissive Input. What this allows is for you to control that inner lights material and adjust according to your needs. If it's something that needs to be turned on and off you can easily use Material Parameter Collection and control it via Blueprints so that it's adjusted with your lights intensity.


                    I really would love to hear some tips and tricks about problems that might occur and go in-depth why its happening and how to solve it. I am talking about issues with mobility changes, and its relative performance impact.
                    I'm not sure these will be indepth but I'll give you something. How about that?

                    Mobility changes:
                    This matters depending on what the end goal is. If it's using the actors as Static then you have the cost of build time, texture draw calls, and texture memory. Some of this impact is dependent upon how large the lightmap textures are so you need to budget for the target platform and known your memory limiations and monitor texture memory accordingly! If it's Movable then we're talking about how many lights are affecting it at a given time and if these lights are also movable then you're going to get more expensive because that's the nature of dynamic lighting! It again comes down to knowing your target platform and profiling the scene for what works best. Lowering dynamic shadow quality is a way to make these dynamic shadows less expensive, but then you have lower quality shadowing.

                    Seems, light bleeding (And not about the basic stuff such as quality of UV's, I encountered problems with a square object with perfect UV's and light still bleeds), using child actors within blueprints and its mobility hierarchy, emissive baking, choosing between increasing lightmap resolutions for baked lighting and stationary lighting with decreased lightmap resolutions regarding performance, how to use lightning in a VR setting for optimal performance etc.
                    https://wiki.unrealengine.com/Lighti...irect_Lighting

                    I've got more things listed here than I covered in the stream, but largely avoiding seams with your modular assets comes down to designing your levels in a way that doesn't over modularize and using tricks/other geometry to mask these seams that you would notice otherwise. Game development is often a bunch of smoke and mirrors!

                    Choosing between increasing lightmap resolutions for baked lighting and stationary lighting with decreased lightmap resolutions regarding performance?
                    The only time this situation you describe would be really useful would be for a Stationary Directional Light, but NOT for Stationary Spot or Point lights. I'll explain that part in a second.

                    Stationary Directional Light - the Cascaded Shadow Maps have dynamic shadowing for all actors based on the dynamic shadow distnace you use starting out. Anything beyond that that is a Static Actor will have baked lighting. Depending on the CSM dynamic shadow distance you choose you would definitely want to keep that lightmap resolution lower for these other static actors. There's no reason for them to have some really high value if you're never going to see that quality and you'll just be wasting texture memory. Granted lightmap textures use mipmapping as well so it won't be like the full cost of the texture but still no sense in wasting where you don't have to.

                    Stationary Point/Spot lights - Unlike the directional light not every actor within the radius of these lights will be lit dynamically. Everything is lit statically with baked lighting with exception of any movable actors! So this means that your lightmap resolutions here play a bigger role and if you need nicer baked shadowing you would use a higher lightmap resolution.

                    _________________________________________________________________________________________

                    Originally posted by daraburke View Post
                    Hi Tim,
                    Any tips on optimizing for interior Arch Viz scenes would be great.
                    I'd love to hear about some best practice methods to achieve high quality GI bakes besides simply ramping up the lightmap resolutions.
                    Hi Dara,

                    For ArchVis there is a subset of the community that always seems to suggest going to the BaseLightmass.ini file and making a ton of tweak. I'm in disagreement with this 100%. Just about any setting you would need to adjust is actually exposed to the World Settings > Lightmass.

                    If you've not seen this blog, I think it's a good place to start. https://ue4arch.com/ue4archs-unreal-...rkflow-part-1/

                    So with Archvis being the beast that it is, you have a set of different standards to adhere to for your quality and what you want. Typically these may not be playable scenes and in some cases they will be. Some of the things below will greatly increase your build times but can have an impact on performance.

                    - Higher Lightmap resolutions tend to work best here. You need the high quality bakes, but could be some trade off when using a smaller scale in the next setting I mention that allows you to work with lower lightmap resolutions. It's not anything I've tested in a lot of practice but worth looking into for archvis needs
                    - World Setting > Lightmass > Static Lighting Level Scale. (NOT FOR EVERYONE!!!), Ideally this setting is better used in practical cases where your scale of your levels are using something other than CM and you don't need the higher quality of lightmaps. Think like a flying game or racing game where you're passing these things by so quickly it just doesn't matter. However, ArchVis tends to go the other way and use a lower value to get higher quality bakes. This will significantly (NO JOKE!) increase your build times.
                    - Indirect Lighting Quality. Increase this to get better results, but due to artifacts you may need to lower the Indirect lIghting Smoothness. I don't have any specific numbers here. So I can really only suggest to try out some test scenes and see what works best for you!
                    - Compressed Lightmaps - You can disable this and it can help remove some compression artifacts, BUT it will increase your texture memory size on disc by up to 4x! For ArchVis situations where you just need a render and not something that is playable this may work better for your needs. If the level needs to be playable you'll need to worry about your texture budget for the project and you may have longer load times that may take a moment for all the lightmaps to stream in properly. Otherwise you get this muddy looking lighitng when you load straight into the level where it hasn't fully loaded everything.

                    I didn't cover them yesterday but did mention them briefly. There isn't any documentation on them currently, though. Lightmass Portals. You can drag these in from the Modes panel. Place these in your open areas where light can pour in. These work with Lightmass Importance Volumes that tell the lighting where an opening is and to focus more lighting photons there. This is a long thread but DanielW added Lightmass Portals and improved Lightmass because of this thread. https://forums.unrealengine.com/show...nderstandable)

                    __________________________________________________________________________________________

                    Originally posted by 1k0nX View Post
                    I also want to add my voice in wanting to see VR-specific lighting techniques and strategies. Thanks for doing this.

                    VR Specific things:

                    - Dynamic Lighting is expensive! Use Static Lighting where you can. Fake effects when you can, even lighting! We did this with Bullet Train where the lighting passing through the trains windows were just a material trick. I think RyanB covered this in a training stream about Bullet Train's rendering tricks a while back!
                    - Keep an eye on your texture memory usage and profile often!
                    - We now have Forward Rendering. It has has some performance gains for RoboRecall but don't expect to just migrate a project and it be automatically better. You will have to optimize for your benefits, but to some degree I think you should see some performance gain regardless out the gate. Just no promises!


                    ________________________________________________________________________________________

                    Originally posted by TheLion36 View Post
                    Hey Tim,
                    I've noticed that most existing examples and tutorials for lighting seem to be aimed mostly at lighting rooms and environments for first/third-person views, but I always find it hard to light things like a topdown/isometric view or something like a simple top-down view of a 3D puzzle board or similar, so I would appreciate some tips/information on that.
                    If you're using the Orthographic View mode for the Camera be aware that not all SM5 fatures are supported. I rarely use Orthographic so i don't know to what extent specifically lighting features are supported/unsupported currently. I don't know that I have any real specific tips for topdown games that can't be applied from first/third person necessarily. I would probably use more material tricks thought since you're limited on view angle and don't need to worry about some things, I guess. Sorry I don't have anything more specific really.

                    Also ambient lighting doesn't seem to be very straightforward in the engine and whenever I've tried setting it up, it resulted in a loss of color, as if the whole scene was viewed through a fog, so some guidance on that would also be greatly appreciated!
                    Not entirely sure what you're getting at here. If you have an example with screenshot that would probably be more helpful. Maybe make an answerHub post and link it back here so it doesn't get lost in this thread. Overall though just generally speaking you can use post process for ambient occlusion adjustments, you have some options in the skylight depending on the mobility you're using, and you have the option of using baked in ambient occlusion via lightmass which is controlled via the World Settings > Lightmass.

                    ____________________________________________________________________________________________


                    Originally posted by joessu View Post
                    Hey Tim,

                    Looking forward to the video. Just curious if you could touch on "product" lighting scenarios. That is, where you aren't necessarily doing an exterior or interior scene, but specific lighting to an object (whether it be a weapon or car or item).

                    Thanks! look forward to it!

                    -Joe
                    Hi Joe,

                    A really good stream we did for Enterprise a while back with Francois talked about some of these that we used on the McLaren Project. With that we didn't really use anything out of the realm of our normal lighting techniques and methods. We added the Dual-Normals option for materials as an opt-in feature in the Project settings.

                    Jerome Platteaux and Brian Karis did a stream around Rendering Hair/Eyes and Lighting a character (Sparrow) from Paragon that was really good. Jerome is an awesome lighting artist and very quickly recreated the lighting techniques he used for the character reveal trailers when Paragon was announced.

                    Lighting Channels is also a good way to get some nice rim lighting for your products without affecting the rest of the scene. I know this isn't much but maybe it'll help.

                    ________________________________________________________________________________________
                    Tim Hobson | Learning Resources | Epic Games
                    UE4 Documentation

                    Comment


                      #40
                      @Tim : i have to check that first , but basically i think that you have made my day with that Index of Refraction thing

                      Comment


                        #41
                        Thanks for the very informative stream Tim. You mentioned a game that you said had great lighting ... do you have a link for it please?

                        Thanks!

                        Comment


                          #42
                          Originally posted by MajorFailure View Post
                          Thanks for the very informative stream Tim. You mentioned a game that you said had great lighting ... do you have a link for it please?

                          Thanks!
                          The Park. Well worth a purchase at 12.99!

                          http://store.steampowered.com/app/402020/

                          I don't really get to play a lot of games but this one stands out in my mind for some great nighttime atmospheric lighting. The eye-adapation was spot on too! There are plenty of other games that look good as well that I've not yet personally played like Gears of War 4 looks amazing in the videos.

                          Ofcourse I don't want to leave out Epic's own games like Paragon and Fortnite have some really good lighting as well, especially Paragon when you start moving into this PBR and photo realistic design when using precomputed lighting and dynamic lighting techniques. Capsule Shadows are used for the characters there so that we get the soft shadowing for our characters where there isn't any direct lighting.

                          For Fortnite this is a good example of dynamic lighting techniques since it's got some randomly generated levels where precomputed lighting doesn't make sense. We also use Distance Field lighting techniques in this one with CSM shadowing. They're good for checking out and seeing how to discern these types of techniques from the videos or by playing the games. Also it's stylized so you get a different approach to lighting that than you would something that is more realistic like Paragon.

                          Anyways, enough of my going on here. Check them all out and I think you'll be plesantly surprised with lighting in any of these games!
                          Tim Hobson | Learning Resources | Epic Games
                          UE4 Documentation

                          Comment


                            #43
                            Originally posted by Tim Hobson View Post
                            The Park. Well worth a purchase at 12.99!

                            http://store.steampowered.com/app/402020/

                            ...
                            Great, thanks Tim, will check it out

                            Comment


                              #44
                              Hey guys, it's me or this stream is not on your youtube channel? Twitch works really bad for past streams in my country. Another thing, I'm kinda disappointed about how the "modular assets light seams!" have been addressed, I hope in the future you will find a way to group or tag meshes that have to look contiguos. For those who can't follow the guidelines provided, because they are not useful in their situation, I suggest to follow these simple rules:
                              Snap your UV isle to a "target lightmap resolution -1" grid like 63x63; https://www.youtube.com/watch?v=iw7rRU8VmU8
                              Lower as much as possible "static lighting level scale" even to 0,1; you can leave the indirect lighting quality alone cause it will only accentuate the problem;
                              About leaking from underneath a wall be sure to align walls to the lightmap pixels borders (clearly the floor's LM pixels should be wider than your walls) and if you can remove skylight and use reflection panels instead. Making a floor plane the same size as your interior is a good advice where applicable.
                              Last edited by JohnDoe0; 01-30-2017, 01:12 PM.

                              Comment


                                #45
                                hi,
                                i was wondering the same thing about youtube availability

                                i have downloaded the stream from twitch but the quality is really bad beacause there is a gap between image and sound .

                                That said, i don't understand why epic use twitch for their live streaming instead of youtube . i must probably missing something .

                                for me youtube is much faster and easy to use than twitch .

                                Comment

                                Working...
                                X