Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

In Dying Light multiplayer you see each other's flashlights complete with dynamic shadows and all

Discussion in 'General Discussion' started by TwiiK, Jan 31, 2015.

  1. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,730
    And it causes no performance hit. Not a single fps.

    How is that possible?

    The only other game I know which does this is Interstellar Marines (made with Unity), but in that game seeing another person's flashlight causes a massive performance hit, just like I would expect.

    However, in Dying Light my friend can shine his flashlight on 50 zombies and objects and I can see them all cast dynamic shadows on my screen and I can even enable my own flashlight at the same time and there's no performance hit at all.

    Mind blown? Can anyone shed some light (heh, pun) on this for me? :)
     
  2. 0tacun

    0tacun

    Joined:
    Jun 23, 2013
    Posts:
    245
    Dying Light is developed with the Chrome Engine 6 which uses deferred shading (http://en.m.wikipedia.org/wiki/Chrome_Engine).

    Deferred shading renders the whole scene once and applies lighting in a second pass. In traditional forward rendering every object needs to be redrawn as many times as the amount of lights the object receives thus increasing drawcalls and rendering overhead.

    The downside of deferred shading is that it has issues to render transparency. But this can be solved by using screen door transparency or drawing this object in forward mode.
     
  3. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,730
    Yeah, but I thought we had that in Unity as well? All my games are made with deferred: http://docs.unity3d.com/Manual/RenderTech-DeferredLighting.html
     
  4. 0tacun

    0tacun

    Joined:
    Jun 23, 2013
    Posts:
    245
    I think there is a difference between Deferred Lighting and Deffered Shading, but I could be wrong. Currently Unity uses a "Light prepass" but I heard rumors that they will switch with Unity 5 to a full deferred shading system.

    Furthermore I think Unity's implementation is pretty old and I would not compare it to a system used by an AAA title which is pretty optimized and up-to-date for the task.
     
  5. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,730
    Okay, thanks for the replies.

    The effect in Dying Light is amazing at least. Being able to turn on your flashlight, light up something and tell your friend to look at it is insanely immersive.