Download

Fake Lighting Material Similar to Godot

[FONT=Trebuchet MS]Good day!

Since orthographic perspective does not cast dynamic shadows in the engine (please do correct me if this gets updated) and I’m working on a 2d game, I’ve stumbled upon a method used by Godot engine where it uses a mask on how it implement lighting for its 2d. I managed to replicate the process by using the modulate blend mode and some math see first image in attachment. The next thing I’m planning, and also seem stuck at, is how can I duplicate the shadow casting method. The plan is to use a volume that when the material hits that volume, the part beyond it stops processing the modulate blending method thus making a fake shadow. The second image represents the sketch of the setup. Hope this thread might help all the 2d devs migrating to unreal engine.

Thanks for the Help!

Update here, found something made by the Devs of the Siege and the Sandfox game (pointed out from another page) where they tweaked at some project setting parameters:

  • Forward shading set to true
  • Min screen radius for lights = 0

The setting will now allow shadows in orthographic perspective to work.