Real time shadow and lightmap in the mobile

I’m developing a mobile game using Unreal Engine 4.8.
If I set DirectionalLight as Movable to make realtime shadow for Characters, it applies to Static Mesh as wel.

I want to use a light map for Static Mesh only and use realtime shadow for characters. Is it possible?

Hi!

No it is impossible. Main problem is a light not can filtering static and dynamic objects. And dynamic shadows are calculated for all objects in the scene.

So you means… there is no way to use dynamic light in mobile device with reasonable memory usage?

Yep. Because it is limitation of mobile systems.

Hi, if this is a limitation for mobile systems, could you please explain why on this game they HAVE dynamic shadows only on characters???

Thanks

Right now that is a limitation of Mobile systems. If you’re using a Directional light that is stationary (meaning that it will use dynamic lighting within a range and static at further distances) you cannot set the static objects to only use static lighting. That part is not setup in the engine. This was bugged at one point but that’s the way it’s supposed to work and there is no intention of changing it.

Right now, you can only have a single directional light that uses any dynamic lighting. At some point in the future dynamic lighting for point and spot lights will be implemented, but there hasn’t been anything announced yet that I’m aware of.

As for the game you’ve linked, there is nothing said about it being used in Unreal Engine 4, there is nothing said about what engine is being used. The video is also over an hour long. It’s hard to answer questions when it’s showing what looks like a finished game that may have had it’s own engine, it’s own programmers who may have implemented features that are not in other engines yet, or by default. The thing is that Mobile is hard to develop for because it’s inherently more limited than desktops. It requires more performance optimizations that can’t just be handled with a flick of a switch. There really isn’t just an easy answer for a very broad question like that. :confused:

The shadows you want, like the video metallario posted, are possible in mobile using the Modulated shadows.

  • Place a stationary Directional Light in your scene.
  • Enable Modulated shadows for that light.
  • Build lighting.

Now, your movable actors have real time shadows and your static ones don’t (only the baked shadows). And, just like in Taichi Panda, the movable shadow will be visible even over the static shadows. But it’s a small price to pay imo. Some PS2 games were like that, if I remember correctly.

I’m using UE 4.12 preview 3 for that. But Modulated Shadows have been around since 4.9.