When should I use Static lighting, and when should I use Stationary? Witch has petter quality etc. Thanks.
Stationary is for lights that don’t need to be moved around but still need animation like changing color/intensity. Static is for lights that never change. You can have as many static lights as you want, they just increase lightmass render times, but you can only have 4 stationary lights overlapping.
Ok, thank you
Is there a quality difference between static and stationary though? Stationary seems to be as is, while static is different once built and doesn’t seem to be as nice. Unless I’m doing something wrong.
I know right? The look of Static is horrible once you switch from Stationary (and no additional tweaking is made). I would expect for a Static light that does not need further computation, to mantain or increase its quality based on the fact that we know what the precalculated values of shading are. It is not the case. It is perhaps then that the static light represents more than a state of the light, but a combination of settings to lower processing power and hence affecting the look of light quality.
The main difference I know is that static lights don’t have dynamic shadows and don’t have any kind of specular reflection. They don’t look as good, but I guess they’re a little more optimized. It’s not really worth the tradeoff 99% of the time in my opinion. If someone else knows more, I’d like to hear it.
Static lighting does have specular, it’s rendered into a directional map
So UE4 using lightmapping to bake out light information (indirect lighting, brightness, etc.) into texture maps whenever you hit “Build Lighting”. A lot of game engines use this approach and have been doing so for years because it’s one of the best ways to light realtime games in terms of performance. All of these lighting calculations don’t have to be done in realtime while you play the game. This is part of the offline rendering process, and in fact is a method used to render lighting in all the movies you watch nowadays too.
The reason static lights look “bad” is because their light contribution is completely 100% baked, or offline rendering. So here’s the pros and cons of static lights:
Pros:
- practically no limits; you can place as many as you want, they will not affect game performance- they will only affect light baking times, which is acceptable since that’s done during development
- best lights to use for highest performance and frame rate of your game (so if you want 60 FPS online multiplayer, static lights are your friend)
- very little to manage (i.e. no limit on cone angles overlapping, no stress about having too many of them casting shadows within player line of sight, etc.)
- don’t need to worry about technical caveats, so a junior artist or lighter can go to town without a senior or lead having to worry about coming in a ripping the entire level’s light rig apart because there’s 1,000 dynamic lights in a hallway
Cons: - highest performance means lowest art quality; these are the worst quality lights you can use- BUT if you manage lightmap texel density well and have well laid out lightmap UV’s on static meshes, if CAN look really good)
- baked shadow maps, so you don’t get the nice dynamic shadows from stationary or dynamic lights
- since these are baked lights, you can’t change anything about them at run time (i.e. can’t change color, intensity, shadows, anything…)
- this isn’t really a con to me, but I see a lot of people bring this up on the forums all the time: when working in UE4 editor, placing static lights doesn’t preview accurately to artists, so after you place them with the editor preview lighting and bake, you get completely different visual results. This isn’t a bug, but a limitation of the pipeline. Since static lights have to be prerendered before you can see what they look like in-game, the only way to get an accurate preview is to build your lighting all the time and see the results (while rendering at preview mode of course so it renders as fast as possible). However, as you place more and more static lights, your preview build times will slightly increase more and more. Once you’re really experienced at lighting in production with static lights (regardless of engine), you already know in your head how the lighting will most likely look when building your light rigs. Again, this is usually only a major con for new lighting artists or less experienced lighters.
Stationary Lights:
Pros:
- they look great because they cast dynamic shadow maps in the scene
- they can be fitted with material functions and IES light profiles. these are special effects that can add a lot of artistic depth and realism to your scene
- since they are dynamic, you can change their visual parameters at run time (i.e. you can change their color and intensity)
- since they’re not solely dynamic, they can cast indirect illumination i.e. global illumination just like a static light, giving them the best of both worlds
- cheaper to render than dully dynamic lights, making them better to use for performance
Cons: - can’t be moved at runtime like fully dynamic lights; you can’t move or rotate them!
- hard limits; i.e. you can’t have more than 4 stationary lights overlap and touch the same mesh, if you do then the engine will automatically take the offending lights and convert them to fully dynamic lights- killing your performance!
- lot more expensive to render than static lights
- require more technical knowledge to use than static lights (inexperienced lighters may blow out a level’s performance by accident)
Dynamic lights:
Pros:
- fully dynamic lighting; meaning you can do anything at run time- move, rotate, change color, intensity, radius, etc. This makes them perfect for using as a player’s flashlight in a horror game, etc.
- dynamic shadows
- can use material functions, etc.
- the preview you see in the editor is one to one with what the final lighting looks like, no need to bake and get different results like with static lights
- not limited to 4 overlapping lights; place as many as you like if you’re planning on playing this on an IBM quantum super computer running 10x GTX 1080’s
Cons: - most expensive lights to render in UE4; these will hurt performance and frame rate the most
- again, easy for a junior lighter to accidentally kill performance by placing too many of these
- no indirect lighting contribution, so you won’t get global illumination from these lights
Not to shamelessly plug it in, but I did make an indepth tutorial on lighting in UE4 where I explain a ton of this and more, plus I show techniques I use for lighting games in production. You can find it on Gumroad at the moment, but I’ll be throwing these up on Vimeo as well when I get some free time:
https://gum.co/YjLxM
Let me know if you have any questions about lighting!
I’ve noticed that my scene look better with stationary lights than static lights, especially concerning metals. I found this on answerhub. I wonder if it’s still the case today in 2016 tho…
Static vs stationary specularity Static lights lose colored specular on metallic materials, stationary lights work fine - Rendering - Unreal Engine Forums
*This is a known limitation to the use of physical-based materials. The Static Lights are diffuse based only and will not take or contribute to a specular element like the Metallic and Roughness inputs. It is not on the roadmap currently to add an additional specular component to the static lights in the foreseeable future.
Thank You
Eric Ketchum*
Environments will always look better with stationary or dynamic lights; they are simply higher quality. This goes for most engines.