Search Unity

When is Mixed mode lighting going to be fixed?

Discussion in 'Global Illumination' started by djarcas, Jun 10, 2015.

  1. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,570
    It is unfortunate that light probe code isn't exposed to developer. Otherwise it could be possible to write a replacement for standard shader, sans the bugs.

    The issue is something like that ideally needs support on engine level.
     
  2. CPP_Meister

    CPP_Meister

    Joined:
    Sep 10, 2015
    Posts:
    8
    While doing some experiments with lightmaps under Unity 5.4.0b12, I discovered there's still a hope with directional specular. Look at the attachement : mixed shadows are there, but they are like vanished by the enlightened part of the lightmap... It's clearly visible with low quality lightmaps, realtime shadows appears at the edge of the static shadows.
     

    Attached Files:

  3. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,570
    Sorry, but that's not what it is supposed to look like... I could post unreal 4 screen for comparison.
     
  4. CPP_Meister

    CPP_Meister

    Joined:
    Sep 10, 2015
    Posts:
    8
    I'm just saying it's not 100% broken. I thought they just disabled the realtime shadows for directional specular mode, but it seems that they're "just" wrongly drawn. It could be a shader problem... I'm just trying to understand... :oops:
     
  5. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    What matters is when will it work fully ?
     
  6. CPP_Meister

    CPP_Meister

    Joined:
    Sep 10, 2015
    Posts:
    8
    Adam-Bailey likes this.
  7. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    I think i will go full baked for mobile and full real time lights for PC games using some custom lights occlusion system like Ghost Of a Tale game.
    http://www.ghostofatale.com/
     
    shkar-noori likes this.
  8. reddotgames

    reddotgames

    Joined:
    Apr 5, 2011
    Posts:
    707
    Still not working properly in b17 ....

    only with directional light I can get some effect but those are shadow on shadow. No realtime shadows from spot or point on static surfaces (mixed mode light).
     
  9. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,832
    I don't believe mixed mode is supposed to work for spot or point lights. Only directional lights.
    It isn't clear if it will ever be supported for point or spot lights. No one knows because Unity refuses to communicate with people using Unity regarding this issue.
     
  10. reddotgames

    reddotgames

    Joined:
    Apr 5, 2011
    Posts:
    707
    It would be nice to inform us what is going on - so we can start working on another solution for our shadows. We have indoor scene with only point/spot lights + emmisives.
     
  11. CPP_Meister

    CPP_Meister

    Joined:
    Sep 10, 2015
    Posts:
    8

    Attached Files:

  12. lightassassin

    lightassassin

    Joined:
    Mar 29, 2013
    Posts:
    45
    Appears to be a side effect of the forward renderer not blending shadows correctly. If you check the "Known issues" part of the release notes there is a line about objects being rendered in Forward with Mixed Mode lighting enabled.

    Adding to that part, if you bake GI lighting only and have the light as real time using real time shadows in forward, the shadows are very dark, and have to be adjusted but this also effects the lightmap intensity for some reason.

    There are already bug reports for these things, I even did a bug report for mixed mode not working across Deferred and Forward back in the 5.0 beta. I even found a new bug related where in forward the objects no longer receive real time shadows if lightprobes are enabled. Not even sure it is new, so will have to test across a couple versions.

    Lightprobes are broken if direct lighting is added... which is a known issue... at this point baked lighting is a complete mess :(
     
  13. GenOli

    GenOli

    Joined:
    Apr 21, 2013
    Posts:
    139
    There I was hoping to have Directional+Spec levels/Realtime shadow for characters, looks like it's back to GLES 2.0 for me :confused:
     
  14. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    So is Mixed mode working in 5.4 Beta ?
    Or should we drop this feature and wait for something better like real time GI aka CryEngine Svogi ?
     
  15. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,570
    Seeing that this thread was made almost one year ago and at that time the feature has been broken for many months, I believe it is unreasonable to expect mixed mode lighting to be ever fixed.
     
    AcidArrow likes this.
  16. Thomas-Mountainborn

    Thomas-Mountainborn

    Joined:
    Jun 11, 2015
    Posts:
    501
    I believe Unity is well aware that mixed lighting, and the lighting system in general, is too important to be ignored. It is very disheartening that so little has been done thus far, at least as far as we can tell, but it will come in time, I'm sure. Though I know that is of little comfort to those waiting for the feature now. Some more open communication on the matter by Unity would be most welcome.
     
  17. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Then SVOGI or similar solution for outdoors ?
     
  18. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,570
    At this point I'm starting to doubt that.

    No. The point of mixed mode lighting is to allow use of realtime shadows WHILE still being able to use baked lightmaps. It is a feature that was in very old games. SVOGI and other realtime GI solutions do not address that problem. At all.
     
  19. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    I agree, we could have great levels lightmaps and combine with real time characters lightening. That's sad it won't happen.
    Anyway for the game "Ghost of a Tale" the author juts used real time lightening with it's own light culling system, i think it's one way to go.
     
  20. CPP_Meister

    CPP_Meister

    Joined:
    Sep 10, 2015
    Posts:
    8
    neginfinity likes this.
  21. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,570
  22. niflying

    niflying

    Joined:
    Jul 11, 2012
    Posts:
    108
  23. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    so i guess mixed lightmap will skip 5.4 isn't?
    dangit :/
     
  24. niflying

    niflying

    Joined:
    Jul 11, 2012
    Posts:
    108
    Still has this issue in 5.4.0f1
     
  25. artur-leao

    artur-leao

    Joined:
    Feb 3, 2015
    Posts:
    66
    Still broken in 5.4.0f2 :(
     
  26. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Since Unity's not answered this, I figure I might as well go out on a limb and state that mixed mode will pretty much only work in forward (if it does) and you'll have to wait for implementation in 5.x

    Unity didn't consider this ever broken in 5x btw - it just wasn't there, as a feature. I read that comment from Unity staff on these forums somewhere.
     
  27. artur-leao

    artur-leao

    Joined:
    Feb 3, 2015
    Posts:
    66
    I'm with forward rendering, doesnt work, neither with deferred. I got dynamic objects casting shadows on static objects, the problem is that the static geometry doesn't occlude the shadows from the dynamic geometry (meaning, a dynamic flag cast shadow in a static wall AND on the floor behind it, like there was no wall whatsoever)
     
  28. artur-leao

    artur-leao

    Joined:
    Feb 3, 2015
    Posts:
    66
    Small example of the above, flag shadow should be clipped by the mid section object (ceiling) and its not, you can still see the tip of the shadow on the wall below the ceiling.
     

    Attached Files:

  29. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,570
    Hippo, there's no reason to think this will work in ANY rendering path, forward or deferred.

    To properly blend shadows, you need multi-layer lightmaps, where lighting information for each individual light can be extracted from the lightmap. If you can't extract shadow data for individual lights, you can't properly blend dynamic shadows with it.

    And judging by behavior of baked lighting in unity, there's no such information in unity lightmaps. So, it simply can't work.

    It is kinda amazing that unity forgot about a "must have" feature and have been ignoring it for over a year, but that's just how it is.
     
  30. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    They didn't forget it, they simply didn't do it (yet).
     
  31. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    To make it simple : Mixed mode will not happen in Unity.
     
  32. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    or just considered it's not exist
     
  33. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,570
    I wouldn't be so sure.

    There's a non-zero possibility that unity technologies will implement it in a century or two.
     
  34. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    so mixed mode lighting basically trapped in valve time. . .
     
    shkar-noori likes this.
  35. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    This is sad, if you want large open worlds in VR@90 FPS baked lighting is the only way
     
  36. artur-leao

    artur-leao

    Joined:
    Feb 3, 2015
    Posts:
    66
    That's the thing, I just had to explain to my client he will have to deal with lower FPS (and possible some motion sickness) because Mixed lighting does not work properly......
     
  37. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,832
    The question I have is "why not"?
    Is it because of the limitations of Enlighten, or the internals of Unity, or resources, etc.
    I also assumed that mixed mode was never going to be implemented, simply because Unity stopped responding to inquiries and the fact that no one could answer the question of whether or not it was going to be implemented for spot / point lights.
    Also, Unity completely removed it from the Roadmap. It used to be on the roadmap for 5.3, then they completely removed it.
    So I kind of gave up waiting for it to happen.
    I don't know much of anything of lightbaking, but I don't see how it could even be possible for a dynamic object to receive a baked shadow without a complete overhaul of lighting system.
    As of 5.2.3, light biases are still not working correctly for point lights.
     
  38. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    This part giving me a deja vu, i feel like i'm already asking the same question before, just don't remember where and when.
    Edit : now i remember, i was asking it in the new forum before the rollback
     
  39. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,570
    It is about static object properly receiving shadow from a dynamic object mixed-mode light in such way that the dynamic shadow will properly blend with static one precomputed shadow from that light. See "stationary" lights in unreal engine.

    As for dynamic object receiving static shadow, that's what lightprobes are for (although resolution of that shadow will be quite low and the shadow will be blurred).
     
  40. Polkatuba

    Polkatuba

    Joined:
    Oct 31, 2014
    Posts:
    79
    I apologize if I have missed some some vital info, but basically this would imply that an essential core feature that has been part of unity for years has been silently removed and swept under carpet?

    Two questions will arise:

    1. The engine got more limited and less competitive compared to other engines. Are everyone perfectly ok with that?
    2. Do you think they (the Unity) could get away with it as a feasible business plan?
     
  41. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,570
    AFAIK, it was always broken in version 5, starting with version 5.0. I never used unity 4, so I don't know if it ever worked before that.

    Okay or not, what exactly can you do about that?

    Yes. They would get plenty of income from 2d games or from games with fully-dynamic lighting.
     
    zenGarden likes this.
  42. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    And some games like Pamela are still beautifull without mixed lightening mode.
     
  43. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,570
    The point of mixed-mode is having better performance (while retaining ability to blend shadows), not "being more beautiful".
     
  44. Polkatuba

    Polkatuba

    Joined:
    Oct 31, 2014
    Posts:
    79
    Many who are not ok with that would consider changing engine. To me, personally, to purposefully cripple Unity because they can't get something working properly sounds really bad business. But of course I'm not expert of this, so it may as well be the opposite some strange way...

    In my opinion Unity pursues to become a high tech engine, based on the efforts they have put into presentations like the Adam demo. In that light it would seem very strange decision to drop mixed mode support. I doubt many serious game dev studios would see that a favorable point when choosing an engine.
     
  45. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,791
    What's baffling is why the option's there, from the beginning. If the lights in the dropdown never had mixed mode as an option there would be far less complaining. People would still ask for it (or a feature like it), but it would just be another enlighten shortcoming instead of a broken feature.
     
  46. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I know right? I had a right moan about that. But I guess it's just a stub as it was available in 4.
     
  47. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,832
    Did "mixed mode" work when Unity was using Beast?
     
    shkar-noori likes this.
  48. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Beast doesn't have mixed mode, they use dual lightmap
     
  49. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    We do need some kind of shadows for dynamic objects in a baked scene. Can't they just rip off the HL2 way of doing it?
     
  50. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    ArachnidAnimal likes this.