Search Unity

Mixed Mode Fixes and Lighting window preview 1 - Try it!

Discussion in 'Graphics Experimental Previews' started by willgoldstone, Aug 9, 2016.

  1. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    712
    Hi all,

    We've been working on fixing the issues around mixed lighting for a while now and think that we've reached a point where we can share a build with the community. With this build we are also adding a revised Lighting window, which includes a lighting lister we call the Light Explorer.

    Overview

    Goals of this experimental build:

    • Fix what’s referred to as “mixed mode” approaches to lighting (baked lightmaps + realtime shadows/lighting).

    • Offer long range baked shadows support.

    • Offer a set of well-defined lighting solutions targeting different use cases and hardware.

    • Improve lighting authoring.

    Key details:
    • Dynamic lights remain unchanged, two modes for these exist in the Lighting window.

    • Mixed mode lights are now named “Static”. Five light modes are being offered for them, see the new Lighting window for options to globally pick one.

    • Baked lights are unchanged and now called “static cheap lights”, this is a single mode by definition.

    How to get the beta builds

    These builds are based off of 5.4.0f3 - the release version of Unity 5.4. However they are EXPERIMENTAL builds so we do not recommend you use them in production.

    Windows: https://oc.unity3d.com/index.php/s/CoKHRyPCgYWokyw

    Mac: https://oc.unity3d.com/index.php/s/c8FBUIR3NSdkxSy



    Documentation

    Please read the Documentation on these features in PDF form which you can download from the link below:

    https://www.dropbox.com/s/eg3ym2ldyl7ec6g/LightingModesUserManual-preview1.pdf?dl=0


    Feedback

    The type of feedback that we're looking for:
    • Do the modes provided cover your lighting needs, or are we still missing something?

    • How is the usability of the new lighting window? Does everything work?

    • Is there any important information missing in the UI?

    • Is there anything else that's broken?


    Known Issues

    We have some known issues and parts of the UI that are work in progress. Note that we will do our best to update this part of the post as you report stuff to us! -

    Runtime/Tools

    • In some light modes gamma color space mode looks broken.
      → Please test in linear color space for now

    • Standard shader: Exceeded allowed instruction count in shader model 2.0.

    • “Directional Specular” lightmap mode is broken.

    • Visual disparity of normal maps between modes

    • Using subtractive with high intensity lights produces some weird artifacts

    UI
    • Lighting Explorer: We should not be able to set Area lights to dynamic.

    • Lighting Explorer: GUI performance is bad whenever a lot of lights are used (temporary workaround: close the Lighting Explorer while in Play Mode).

    • Mac : Font size issue on retina display

    • Subtractive mode : Only one directional light should be in the Scene and it should be static -> display a warning when this is not the case.

    We are looking forward to your feedback and appreciate your help!
     
    CDDelta, iamthwee and moure like this.
  2. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    THANK YOU!!! FINALLY! gonna try ASAP!.... or after Directional Specular is fixed...
     
  3. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    Works for me. Please note that I'm only interested in masked lights and nothing else.

    baking.png

    Few minor things, though.

    Calling lights static and static cheap is a bit confusing, would be nice to have something similar to unreal terminology, where "static" is fully baked, and a light that allows shadow blending is "stationary".

    Point light masked soft shadow was strongly pixelated.

    IF shadowmask is limited, say, to only 4 lights for any given point in scene (it appears to be), there should be some sort of visual warning in situation when a light couldn't be baked into shadowmask.
     

    Attached Files:

  4. djarcas

    djarcas

    Joined:
    Nov 15, 2012
    Posts:
    154
    I'm going to cautiously say that this is (so far) excellent. I've popped together a quick scene to test one of the two situations that I've been unable to do until now; that of distant baked lighting/shadows and close-up realtime lighting/shadows. No issues located!

    Baking lighting is still painfully slow, even at 1 texel/unit, final gather off, compression off, ambient occlusion off, and baked GI 1/unit - any clues as to speeding this up for test rendering would be greatly appreciated!

    I'm going to have a look at the second commonly used layout in a while - that of a high-quality baked scene with a handful of dynamic actors in it. I need to wait for this bake to finish first tho!

    Also, it appears that you broke one of the Legacy shaders :
    Shader error in 'Legacy Shaders/Transparent/Bumped Specular': invalid subscript '_ShadowCoord' at line 102 (on d3d11)

    Compiling Vertex program with SPOT FOG_EXP2
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING
     
  5. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    For fast global previews only, i use 0.5 or less for the texel/unit and similar number for indirect resolution, this can speed up your lightmapping somewhat.
     
  6. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,813
    I am actually impressed with how comprehensive the list of modes is. Awesome.

    It seems to be. I will admit that on first glance, the lighting -> settings window is a bit overwhelming with all the descriptions, but I got used to is quick enough. My only "real" complaint, is the lighting explorer demands too much width and the fields don't scale, while it doesn't need to.

    The other complaint is as @neginfinity said, static cheap is an awkward term. Maybe change it to Fully Baked, which is what it is.

    EDIT: Also, for what is worth, I approve of the removal of the lightning -> Object tab and everything being moved in the mesh renderer component.

    I see that's in the known issues list but... Please fix the gamma issues. The way things are set up right now it's even more obvious than before.
    inten.jpg
     
    Last edited: Aug 9, 2016
  7. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    I think "baked", "dynamic" and "masked" would work for lights would work I think.

    I'm concerned about limits of masked lights, though. It looks like their masks are stored as one light per channel in shadow mask texture, but that texture can only have 4 channel max. So it is unclear what happens when number of lights goes above this limit. I assume that they're silently switched to dynamic or something like that. Would be nice to have some visual warning when this happens.
     
  8. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,813
    I actually, I think it silently switches some to fully baked.

    Some feedback on what happens exactly would be nice, I agree.
     
  9. superpig

    superpig

    Quis aedificabit ipsos aedificatores? Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,184
    From the documentation:

    And also:
    Take a look at the doc linked in the top post for full details :)
     
  10. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,813
    Okay, now I feel like an idiot! :p And I did read the manual n' all... (well, maybe skimmed is more accurate)
     
  11. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    I think fallback to baked is not a good idea, because it will not produce desired result, and it will be easy to miss the issue. It should either fallback to dynamic, or fallback type should be configurable.

    Also, it would be nice to have obvious indication that light couldn't be baked properly. Different light icon with a warning sign, for example.
     
  12. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,813
    The “Show Shadow Mask overlap” mode in scene view marks the lights that had to fallback as red.
     
  13. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    That's not enough. I think it should be instantly visible in scene view even in default lighting mode. Basically, see how it works with Unreal's stationary lights.

    If you have to switch display modes to check for the problem, then one day you'll forget to switch and miss the problem.
     
  14. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,813
    Fair enough. An indicator that something didn't go as planned would be useful in the scene view as well. It could also be marked in the lighting explorer somehow.

    But the existence of "Show Shadow Mask overlap" mode makes the feature usable, at the very least.
     
  15. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,445
    I was thinking about our use cases here, basically we have time of day. So I'm thinking that a shadow mask, or the shadow can update in a staggered performant manner?

    As we have TOD, the idea is that we use dynamic regularly updated shadows close to view, but in the distance, it updates very slowly. Perhaps I should forget mixing things like this and instead just optimise as hard as I can in merging geo for normal realtime shadows to be cheaper further out.

    Any thoughts regarding this scenario being optimised are very welcome.
     
  16. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,813
    Since time of day means a moving directional light I don't see how anything here applies, since almost everything is about lights that don't move.

    You could use some of this stuff for local lights or interior lights though, but that has to be evaluated on a case by case basis?
     
  17. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,372
    sorry if i missed this from known issues,
    is lightprobe display are broken, i mean i can't see any baked/result of the lightprobe?
    Edit : My bad, i didn't notice the lightprobe viz settings in the bottom

    The occlusion lightprobe for deferred mode is tricky, is there any plan to improve this? the way it behave in forward path are perfect though, just need to get the same behaviour in deferred
     
    Last edited: Aug 10, 2016
  18. xDavidLeon

    xDavidLeon

    Joined:
    Jun 9, 2014
    Posts:
    80
    Quick question: Should this work on a console (PS4/Xbox One) build?
     
  19. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    4,671
    I think that if you want time of day you shouldn't use baked lights.

    Completely unrelated to this topic, we have work going on to expose more of the high level renderer controls to C#. With this you could for example update the shadow cascades for far away objects at a lower frequency than the one up close.
    So the right solution imo would be: enlighten + future features giving control over updating shadows incrementally.

    So basically i don't think this use case part of what we are trying to solve with this build specifically.
     
    hippocoder likes this.
  20. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    4,671
    "I think "baked", "dynamic" and "masked" would work for lights would work I think."

    "Calling lights static and static cheap is a bit confusing, would be nice to have something similar to unreal terminology, where "static" is fully baked, and a light that allows shadow blending is "stationary".

    So in regards to naming the basic idea is that static cheap really discourages using it, which is what the goal of the name was. Static cheap is something I believe has very few use cases. For almost all modes you would always use either dynamic or static. Static cheap is the fastest to render but also means that your lights completely lose all specular high-lights & the light color / falloff is much less crisp.

    The only use case i can imagine is for areas where you have lots of lights in an area and some of them you deem very unimportant. Or very far away geometry that only affect surfaces with very little specularity.

    So we are looking for a name that is accurate but discourages clicking on it as a "default".
     
  21. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    4,671
    Currently we have not provided any consoles builds of it, but the features are fully compatible with PS4/xbox one.
     
    shkar-noori likes this.
  22. moco2k

    moco2k

    Joined:
    Apr 29, 2015
    Posts:
    289
    Personally, I would not consider a name like 'static cheap' as discouraging. My first thought would be: cheap = cheap in terms of performance = nice!

    Anyway, if there is a clear description so that a user exactly knows what he gets by choosing a particular option (without misunderstanding potentials as with the old broken mixed mode), everything should be fine.
     
    Last edited: Aug 10, 2016
    landon912 likes this.
  23. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,813
    I don't think that works for me though. Static cheap sounds to me like "Sort of like the static lights, but faster!". Also, why would you discourage people from using it?

    It will be the fastest at run time and it will look the best if no dynamic objects intersect it (smooth soft shadows and proper penumbras). A lot of us like our high density baked lightmaps, even though enlighten (and Unity in general, from what you're saying? I hope not) seems to despise them.

    Renaming it to "Fully Baked" would be the best for me. It's what it is. It's self-explanatory and it's completely neutral.

    (In the end, the name itself is not a very significant issue, it's just a name. they only "real" issue would be creating some confusion when people will ask something about the lights on the forums and we will have two types with very similar names. I can easily imagine the following situation ton the forums

    -To fix your issue, set your light to Static.

    /sets to Static Cheap (because... close enough?)
    -I did it and it's still not working!

    In short, in a world where phrases like these exist : "If your animation is an animator animation put it in the mecanim state machine and edit it in the animation window, but don't put it in the animation component, because those need animation animations and not animator animations", makes me think we don't need any more features with very similar names ;)
    )
     
    Last edited: Aug 10, 2016
    mh114 likes this.
  24. Owers

    Owers

    Joined:
    Jul 7, 2012
    Posts:
    35
    This is fantastic so far, more than I expected and certainly worth the wait. I look forward to trying this with my current project. I'm curious to see how performant these mode are compared to each other, I'm assuming the lighting modes are ordered by cost (most expensive at the top, more performant at the bottom)?

    As for Static Cheap, maybe consider calling it Legacy Static since the result is closer to Beast lightmapping and it works best with legacy shaders since they don't have any PBR attributes. Most developers would avoid anything marked 'legacy' by instinct.
     
  25. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    Uh, does that mean that static cheap will not work with directional specular baking mode (or whatever it is called)? Unless there's some sort of misunderstanding, IIRC, starting with version 5.0 unity had additional lightmap mode, which allowed approximated specular highlights while light were fully static.

    In this case terminology is even more confusing.

    Basically, I would be interested to have a light that is fully dynamic, a light that is baked but can still cast dynamic shadows (masked) and the light that is fully baked and does not support dynamic shadows at all, and I would want multiple tools at my disposal, without being "encouraged" to use any of them. I want multiple tools at my disposal, and not an "advice" on which ones I am "supposed" to use. For example, it won't be possible to create the whole with masked lights because only 4 of them can overlap at any single point.

    I'd expect baking lights having or not having specular highlights to be a completely separate setting in lighting tab.
     
  26. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    4,671
    Our plan is to deprecate & remove "directional specular lightmap" mode. I think that given the features exposed in this branch this mode now has zero valid use cases.

    Our conclusion is that it is it has many artifacts in specular highlights. Especially when there are many lights contributing. It works in some simple use cases on very simple geometry but does not really work on more complex geometry. It is currently not a robust solutiona and can not be made a robust solution. Our conclusion is that it is not an artifact of the baking but generally an unsolvable problem with compressing the data into just 2 textures.

    If you have a lot of specular surfaces and can't afford realtime shadows, then one of the shadow masks mode is the right one, and gives you 100% accurate analytical specular reflections. Indirect lighting is still baked into the lightmap and indirect specularity comes from reflection probes / SSRR.

    This setup is physically accurate, has no duplicate light contributions and has accurate falloffs and specular contribution.
     
  27. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,372
    just let me know If this already known bug:
    - Lightmap sometimes missing from scene view or not refreshed (Getting only ambient light), resave the scene the lightmap are back
    - Lightmap also missing after reopening the project (Getting ambient light only), need to rebake the lighting to get the lightmap back, resave not work this time.
    - Spammed with this error randomly
    Code (csharp):
    1.  
    2. NullReferenceException: Object reference not set to an instance of an object
    3. UnityEditor.LightingWindowLightingTab.OnDisable () (at C:/buildslave/unity/build/Editor/Mono/SceneModeWindows/LightingWindowLightingTab.cs:96)
    4. UnityEditor.LightingWindow.OnDisable () (at C:/buildslave/unity/build/Editor/Mono/SceneModeWindows/LightingWindow.cs:79)
    5.  
    - Lighting explorer taking too many spaces
    - what is the purpose of Weight display option for LightProbe visualization? i can't see any differences.
    - also i still cannot make the probe occlusion to work properly in deferred to make it looks like in forward :/

    Question :
    not sure if this practical, maybe you can also add shadowmask resolution option into the settings tab, could be usefull to reduce the textures size.(or we just do it manually from import settings)

    @Joachim_Ante Any plan to adding baked/static shadow that casting/projected into dynamic objects or transparent object?

    and again i get it that this is still wip and preview, i'm just mostly curious :)
     
    Last edited: Aug 10, 2016
  28. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    So, to summarize....

    1. Directional specular mode is going to be deprecated.
    2. No realtime specular on baked lights.
    3. Specular on masked lights.

    Is that about right?

    Also... are there any planned changes in regards of Enlighten being used for realtime GI?
     
  29. monkzoren

    monkzoren

    Joined:
    Nov 5, 2014
    Posts:
    101
    It does not require complex geometry to fail - http://forum.unity3d.com/threads/directional-specular-baking-issue.424616/#post-2745309
    why does the shadows affect the normal direction of the surface?
    I get that this new approach is better to use, but it would be nice with some more explanation around why Directional Specular wont work. Its been a part of unity 5, and i bet many developers are using it, with or without bugs.
     
  30. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    4,671
    Correct.

    Correct. For realtime GI we are happy with what enlighten provides.

    For Static baked lightmaps we are working on our own incremental path tracer which will be released as preview on the forum very soon as well, it will over time replace enlighten being used as a static lightmap baking solution, making enlighten be used only for realtime GI.
     
    Ostwind, Thomas-Pasieka and AcidArrow like this.
  31. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    6,434
    So...potentially faster incremental lightmapper + enlighten still available for realtime GI + lights with shadow masks.

    I like where this is going.

    The only questions is when those features are going to be officially released in "non-experimental" form.

    Aside from that it will probably cover all my lighting/shadowmapping needs.
     
    AcidArrow likes this.
  32. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    +1
    Will this solution will stay valid for multi terrain scenes and be quick enought with the new ray tracer ? How many RAM will this use for lighytmaps ? When you make change on one tile terrain can we rebake only this tile ?

    We seen it working at Unite, i think we'll be able to beta test it in the next days or week.
     
    Last edited: Aug 10, 2016
  33. djarcas

    djarcas

    Joined:
    Nov 15, 2012
    Posts:
    154
    Is there any sort of ETA on what 'very soon' means? If this is going to be substantially faster (and, y'know, backgrounded and threaded whilst I'm working), then I would prefer to save myself many MANY hours of staring at 7/11 "Light Transport"
     
  34. djarcas

    djarcas

    Joined:
    Nov 15, 2012
    Posts:
    154
    I don't seem to be able to find any way of scaling objects in the lightmap any more. I don't really need my hedgerows at high resolution, but the track in a racing game is more important. Is this missing or just hidden somewhere obscure?
     
  35. vandreev

    vandreev

    Unity Technologies

    Joined:
    Mar 2, 2016
    Posts:
    4
    The contents of the Object tab in the Lighting window got moved to the corresponding Inspector windows as part of general UI cleanup, since we felt that it doesn't make a huge amount of sense to split up object settings between two windows.

    If you take a look at the Lighting section in the Mesh Renderer Inspector, it now contains what the Object tab used to contain for mesh renderers, in particular the "Scale in Lightmap" setting.
     
    djarcas likes this.
  36. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,445
    Seems like a perfect move because the shadows, not the GI were the main problems with baking. I was always happy with enlighten even with lowest settings (realtime). It gives me all the lush colour bounce I need, but the shadows (frankly both realtime and offline) are poor and need much love.
     
  37. djarcas

    djarcas

    Joined:
    Nov 15, 2012
    Posts:
    154
    Fixed! I chose Atlas size 4096, but the textures Unity created were set to Max Size 2048.

    Is there some obvious fix for this...?

    upload_2016-8-10_19-0-26.png

    It's hard to see from the pic, but those are just flat planes, and there really shouldn't be any shadowing going on at all there. I suspect this isn't a new issue, but I don't recall it ever looking this bad previously.
     
    Last edited: Aug 10, 2016
  38. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    I think you have some problem with normals of your 3D Tiles or shading like smooth or flat faces shading.
     
  39. Thomas-Pasieka

    Thomas-Pasieka

    Moderator

    Joined:
    Sep 19, 2005
    Posts:
    2,112
    This right there is what I am waiting for. My client is increasingly getting tired of me having to explain that baking lightmaps takes forever with even modest settings. Is there an estimate on when the incremental path tracer is going to be available for testing?

    Thomas
     
    Ostwind, AcidArrow and Pawige like this.
  40. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,019
    Carrying forward some Q&A from the beta list:

    1) We really need to be able to switch during runtime between different modes. (We tie the shadow mode to quality levels, so we have Deferred with Dual Lightmaps for higher quality levels, and Baked+Realtime Shadows only on PC and NPCs for lower levels.) It looks like maybe I can switch between Distance Shadowmask and Shadowmask after baking (though not at runtime, at least not in the editor). Is that what I'd want, to restrict realtime shadows only to dynamic objects, and all static objects (at any distance) use baked? If so, can we switch between those during runtime?

    Uygar's reply: Distance shadowmask mode should behave like shadowmask mode if the Shadow Distance is set to 0. As this is already a quality setting switching modes in this case would not be necessary.

    But that would prevent realtime shadows on the PC and nearby NPCs, wouldn't it? So it wouldn't be equivalent to Far Lightmaps + Realtime shadows on dynamic objects within shadow range.

    2) Lightmaps are not visible in Scene View -- see screenshot. Directional Light is marked Static and Shadows are enabled on the light.

    3) Terrain tree shadows aren't baked onto terrain.

    Uygar's reply: Baking of tree shadows on terrain should work. Depending on the lightmap resolution on the terrain this might be hard to see, though.

    Glad to hear that! They weren't working in my project, so I created a new project...and they do work there! So now I'm trying to figure out why they don't work in my actual project. Everything looks correct (static flag on terrain, tree has Generate lightmap UVs is checked on import settings)....any suggestion for what else to look for?
     

    Attached Files:

    Last edited: Aug 11, 2016
  41. SuperUltraHyper

    SuperUltraHyper

    Joined:
    Sep 7, 2015
    Posts:
    86
    This appears to be light bleeding across UV seems from nearby unused light map pixels (that are black / unlit / the gap between UVs). The only solution I have found is to manually open the lightmap and extend the UV's edge seems manually so that edge pixels don't transition to black. Instead the edge color should extend until it reaches an adjacent edge pixel color. Painful to do but works for me.

    Anyone else have a better solution? Would be appreciated!!
     
  42. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,320
    I'm confused. I want fully baked lighting with shadows for characters/dynamic objects. Basically, my direct lighting should always be baked. I assume there no way to generate shadows this way and I'll have to rely on hacky projected shadows as usual? I thought mixed would fix this.

    The mode I seem to want is Subtractive but with all lights, but not only for 1 Directional light. Will this ever be an option?

    With Shadowmask mode, they still have dynamic direct lighting at a distance, and are moveable, even though they're "static". You're also losing all of the AO when the light shines on it.

    Unfortunately, I can't really test the performance of Shadowmask mode because the new settings don't work with existing scenes.
     
    Last edited: Aug 11, 2016
    moco2k likes this.
  43. Funny-Face

    Funny-Face

    Joined:
    Nov 6, 2013
    Posts:
    17
    First of all - great work! But I would use another type of static light - static shadowmap. I mean any realtime-shadow light generates a shadowmap once (at start or by API) and use this shadowmap due further updates (by distance or API).

    Use case:
    I have a city with one directional light - the sun. Some characters goes through that city - and I want my characters to recieve a robust shadows. And dynamic shadows by my characters is not important (it's ok they have no robust shadows, or any shadows at all)
     
  44. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    4,671
    For now you can use "distance shadow mask" mode for this.

    From the pdf doc linked above:
    Indirect lighting is baked into lightmaps & Light Probes. All direct lighting & shadows are completely realtime. Beyond
    shadow distance this mode uses shadowmasks for static objects, Light Probe shadows for dynamic objects. Great for
    outdoor rendering, allows you to use a short realtime shadow distance, while retaining baked shadows far away.


    Control over updating at which frequencies shadowmaps are updated is something else and we will get some work done on that in the near future too but nothing to share yet.
     
    Pawige likes this.
  45. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    4,671
    Why do you want fully baked lighting? Using shadowmask for a light you will get higher quality looking lighting, that composes correctly with dynamic shadow casters up close.

    The bounce lighting is still baked. Overall our expectation is that for your use case shadow mask mode will get you the best results.

    Can you try it and report back if there is any actual issues in your scene with it?
     
  46. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    4,671
    Can you file a bug with a project including the scene that produces this issue? Please post the case number here when you have filed the bug.
     
  47. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,372
    I think he asking about hybrid lighting, baked shadow for DynamicObject from StaticObject and realtime shadow for StaticObject from Dynamic Object. :D
     
  48. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,320
    I want fully baked because it's a F2P competitive shooter aiming for 120fps on computers from 2010. I'm using Forward rendering with blob shadows, but would prefer realtime for characters, because blobs don't work well on anything but a floor.

    In Shadowmask mode I've had issues with some lights not applying. I'll experiment more to figure out what's happening and show some screenshots.
     
  49. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,372
    report :
    Sometimes when the baking process reach Baking Resources phase, it using a very high memory and cpu usage, then those usage are stuck there even after the baking process completed. Need to restart unity to flush the CPU and memory usage. Never get this problem with stable release
     
  50. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    260
    Well, UE4 can actually cast baked shadowmaps on movable geometry. What about this feature in unity? Are we getting it or are we stuck with light probes? And, yeah, Shadowmask modes mentions "Shadows from static objects on dynamic objects => lightprobes with shadowmaps". Can someone explain what are those lightprobes with shadowmaps?
     
    Last edited: Aug 13, 2016
    zenGarden likes this.