I’m a Unity3D User In Rendering , Light and Shader And I Used UDK and Unreal Engine 4.
In Unity we have nice tools for lighting but one thing makes a problem .
In UDK and Unreal Engine I saw Dynamic Shadows And Static Shadows blend together perfectly !
I can’t understand what is unreal method .
- It just bake Skylight and GI with lightmass and direct light are dynamic ?
- It makes a mask from shadows and multiply it with Real time shadows and next mask it on lights ?
- I could make it in unity just for direct light and I feel my way is wrong .
- How UDK blend Lightmaps shader with Dynamic Shaders ? Make A ID for every light ?
This is really big challenge for us , Please some one explain it for me .
http://shaderforge.userecho.com/s/attachments/10417/22752/870683/ac4fc5761aa6d5f3d391f589d007170c.jpg
http://shaderforge.userecho.com/s/attachments/10417/22752/870683/c008d0132204d9f3aca8555f2ac94138.jpg
It’s explained here: https://docs.unrealengine.com/latest/INT/Engine/Rendering/LightingAndShadows/LightMobility/StationaryLights/index.html
The stationary lights are actually real-time lights with pre-baked shadows. Since you cannot have more than four overlapping stationary lights, I assume UE4 renders the baked shadow masks into a RGBA buffer (one light per channel) that is used to mask the real-time lights during deferred rendering. Per-object shadows are probably draw into the same buffer (each shadow being drawn into the channel corresponding to the light that’s casting it).
The first time I saw this technique was in the first Bioshock, which wasn’t even UE3, but a UE “2.5” with custom lighting.
Thanks pedro_clericuzzi ,
It was quite clear !
Just one thing … is this limit on Unreal Engine 4 ?
Yes, the documentation states you can’t have more than four overlapping stationary lights. There’s even a visualization in the editor that shows light overlap. Of course, you can have as many stationary lights on a level as you want, just be careful about not letting them overlap.