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

Hey ,

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

Due to previous statements about UE5 just being a large update to the UE is it possible that with the numerous large updates coming with 4.16 (audio rewrite Niagra etc) that 4.16 is just the code name for UE5.
Sincerely, Themanwithideas whose sole purpose in life is starting rumors of the nefarious nature.
P.S. Since some may consider this spam are there any plans to put the roadmap updates on a monthly basis instead of what it is now. If not maybe a description for each of the items listed on it could be in order. Because some leave us guessing as to their function. As an example “FTT bloom/streaks”.

Heya! This’ll be my second time watching a live stream! Thanks for pronouncing my name correctly last week! I must say, that’s incredible. I’ve only ever seen that done in Overwatch competitive and only rarely :smiley:

Anyway, my question is, I’d like to second Luos’ post about seems. Here’s some example pics from my own noob content in 4.12:

With FOV set to a low, zoomed-in value, the light works correctly! Nice shapes on the walls and pillars, the seems are good to go right out the box.

When I zoom out, however, I can see the light seep in through the corners, but only the corners of these meshes. I have the walls all set to “Two Sided” and they block the light fine, but the ceiling is a normal static mesh.

P.S. that’s glass windows I made ?? :slight_smile: lol help us obi wan kenobi, you’re our only hope…

Also stuff like open world reflections, and how to make Unreal Engine look as super beautiful as possible with a few checkboxes would be nice (anything like bloom, DOF, ambient occlusion, anything like that).

Thanks so much!!

Hi!

is a living god! I’m hoping to see a walk through on dynamically lighting an open world environment. Including changing time of day. I can never get all the pieces to work well together. Post process, lighting, fog, sky sphere, shadowing, looking at the same scene from different distances. Something is always looking bad. Bringing that together cohesively is something I would like to see. Thanks!

Nope. I am but a mere mortal. Nothing special about the lighting information I know that couldn’t be learned with a lot of practice and experience.

You’ve got some good requests here but I think there out of the purview of what is possible within this stream to show off really. This stream will largely cover strategies and techniques that some/most may not know about, but not full systems around Dynamic lighting. Lighting is a beast of a topic anyway and so much more than a single stream’s hour. There’s always room for future streams, though! :slight_smile:

How do you keep shadows of small objects from disappearing when you move away from them? (EDIT: Nevermind, got answered.)

Thanks for who watched Live and will watch later.

I’ve got a pretty busy rest of my day here, but I’ve got a ton of questions from thread here that I didn’t get time to answer. I’ll work on that tomorrow and I’ll likely be making the project that I had public as well so that if any of those referenced that you can have a look if you need.

Thanks again!

Hi ,

I missed the webinar. Is there a way to watch it again? Thanks that would be awesome.

Once we get it on YouTube we’ll link here as well in the OP. :slight_smile:

Edit:

It’s also on the recent videos list on the Twitch channel as well here: Twitch

Hi ,

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.

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.

,

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!

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 should use all the tools they have to bring it all together.

Hi ,

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.

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

Amazing, thanks a million !

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.

Hey,

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: Reflections Captures in Unreal Engine | Unreal Engine 5.3 Documentation

You also have the option of using Planar Reflections now that are dynamic. You can read about those here: Planar Reflections in Unreal Engine | Unreal Engine 5.3 Documentation

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.


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/how-disc-jam-reached-60-fps-on-intel-processor-graphics-using-unreal-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. Performance Guidelines for Mobile Devices in Unreal Engine | Unreal Engine 5.3 Documentation


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.


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’m not sure these will be indepth but I’ll give you something. How about that? :slight_smile:

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.

https://wiki.unrealengine.com/LightingTroubleshootingGuide#Shadow_Seams.2FShading_Differences_with_Indirect_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!

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.


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-engine-4-lighting-workflow-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!!!), 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. Lets make Lightmass EPIC (and understandable) - Architectural and Design Visualization - Epic Developer Community Forums


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!

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.

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.


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.

Platteaux and Brian Karis did a stream around Rendering Hair/Eyes and Lighting a character (Sparrow) from Paragon that was really good. 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.


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