Search Unity

[RELEASED] Magic Lightmap Switcher - Storing, Switching and Blending Lightmaps in Real-Time

Discussion in 'Assets and Asset Store' started by Eugene-B, Apr 7, 2021.

  1. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    photo_2021-04-07_22-52-11.jpg

    Hello everyone!

    Thread moved from Work In Progress forum

    Magic Lightmap Switcher is a Unity editor extension that will allow you to store baked lightmap data and then switch between its instantly or interpolate smoothly.

    The following data is involved in switching and blending:
    • Lightmaps
    • Lightprobes
    • Reflection probes
    • Light sources settings
    • Skybox texture
    • Scene fog settings
    • Any custom data such as post-processing settings, Volume component settings in SRP, or variable values of any of your script‌
    System features:
    • Switching and blending all available baked data in the scene at runtime
    • Using shaders and multithreading for system operation, which allows you to maintain high performance
    • Support for multiple lighting scenarios for one scene
    • Automatic baking and storing process of lightmaps in turn order‌
    Custom shaders:

    The asset will work with any custom shader, unless that shader uses its own GI functionality. If your shader calls on Unity's built-in functions to render lightmaps, reflection probes, lighting from light probes, and etc., then you don't need to worry. Everything will work by default.

    For those using custom lighting features. Write to the developer on any support channel. It's pretty easy to add blending and switching support to your shaders.

    Integration:
    Tested with assets:





    Things to do:
    • Preset manager (added in v1.2)
    • HDRP and URP support (implemented in a separate version)
    • Eliminate possible light leaks while blending lightmaps
    • Supports Panoramic and 6-sided skybox shaders
    • Support for Bakery Lightmapped Prefabs
    • Support for Bakery RNM and SH maps (added in v1.34)
    • Blending and switching support for Bakery Volumes (if at all possible and efficient)
    • Own lightmapped prefabs (for non-Bakery users)
    • API for easy modification of custom shaders
    • Enviro support
    I would be grateful for any comments. Good luck to everyone with your projects!

    Asset Store Lite Version (Built-In RP Only)
    Asset Store Pro Version (Built-In + URP + HDRP)
    Discord Server

    Magic Lightmap Switcher Manual
     
    Last edited: Jul 5, 2021
    AntonioModer likes this.
  2. AntonioModer

    AntonioModer

    Joined:
    Jul 29, 2014
    Posts:
    41
    HDRP version will be in this updated asset or in separate asset ?
     
  3. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    SRP (URP + HDRP) will be in a separate asset. As it requires a lot of work and support
     
    ftejada, Mark_01 and AntonioModer like this.
  4. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    642
    Looks interesting but... am I being blind? Is there an asset store link? (it's released?)
     
    Eugene-B likes this.
  5. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
  6. AntonioModer

    AntonioModer

    Joined:
    Jul 29, 2014
    Posts:
    41
    @Eugene-B , please make standalone demo with test scene for this asset :)
    This will be useful for determining performance
     
  7. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    Yes, definitely. Once done with SRP support. Such a demonstration was, by the way. But for earlier versions of the plugin. :)
     
  8. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    Version 1.2 has been sent to the store. Will be available within 2 days.

    Bug Fixes:
    • An error related to paths conflict due to which the interface does not work correctly.
    • Shader restoring is not possible on systems with limited user permissions.
    • An issue has been encountered where the notification that all lightmaps have been successfully stored will pop up indefinitely if you cancel the bake and store process.
    • An issue was found that is causing errors while building the project.
    • Reflections work with errors in deferred rendering. Implemented support for system operation without support for deferred reflections.
    Improvements:
    • Added preset manager. Now you can manage all scene presets from one place and edit them quickly.
    • Added a new manager option. Clear Default Data Folder - Allows you to choose whether to delete duplicate lightmap data in the default folder.
    • Added tooltips to manager options. To see this, hold the mouse cursor over the option name.
     
    Last edited: Apr 20, 2021
    AntonioModer likes this.
  9. SlothicG

    SlothicG

    Joined:
    Jul 2, 2012
    Posts:
    47
    Waiting for URP, super excited for it! :)
     
    Eugene-B likes this.
  10. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    URP support has ended. Tested on 3 verified versions 7.5.3, 10.3.2, 11.0.0 for engines of versions 2019.4.21f1, 2020.3.1f1 and 2021.1.4f1. This may also work for intermediate versions, however, this needs to be verified.
     
    AntonioModer and ftejada like this.
  11. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    Version 1.3 (buil-in) has been sent to the store.

    Bug Fixes:

    • An issue was found that is causing errors while building the project.
    • Fixed a bug that prevented adding multiple fields to the Custom Blendable.
    Improvements:
    • The Custom Blendable module has been completely rewritten.
    • Color fields are now recognized by Custom Blendable.
     
  12. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    A message to all potential buyers.

    Do not use the plugin review submission form as a bug report submission form. Instead, use any of the specified communication channels. In most cases, the developer responds within a few minutes.
     
    Last edited: May 3, 2021
    AntonioModer likes this.
  13. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    Update 1.31 has been sent to the store.

    Bug Fixes:
    • Changed code to work around the situation when the range of a light source of type Area increased infinitely.
    • Fixed a bug that prevented editing scene lighting settings when the preset manager window was active.
    • Fixed a bug that caused spam in the console when adding multiple empty objects to the blending queue.
    Improvements:
    • Added the ability to select a scenario in which the data after re-baking will be overwritten.
    • Added a warning in the console and in the interface that is shown when an error is detected in the blending queue data.
     
  14. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    Testing of the SRP support package (URP + HDRP) begins. Hope it doesn't take too long.
     
    Inspeinre likes this.
  15. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    Update 1.32 has been sent to the store.

    Bug Fixes:
    • An error that caused blending to stop if the object has "scaleInLightmap = 0" or "lightmapIndex = -1".
    • Texture format error for Android platform.
    • Light references are lost after reloading the editor.
    • A bug due to which, when creating a new preset, data in all existing presets is overwritten.
    • A bug that caused the rotation values of the light to reset to zero during the first edit.
    Improvements:
    • Ability to move the plugin to any project folder.
    • Ability to specify the path to store data in the "Resources" folder.
     
  16. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    So, after much thought, I came to a solution. Since I was able to get HDRP to work in Deferred mode, albeit without support for blended reflection probes for now, I will release URP + HDRP support as one package, however I will mark it as version 0.9 and as a beta version until Deferred support will not be fully implemented. In addition, the Built-In version will be considered the LITE version, and the URP + HDRP package will also include Built-In and will be considered the PRO version. Thus, users who have already purchased the Buil-In package will be able to upgrade to the PRO version with a discount. For the rest, the package will be shipped at full price (I think $50 would be fair for the current version), it should be noted that the price will be increased when all planned features are implemented.

    Now I am engaged in combining the changes of the latest version of Built-Int (1.32) with the second package. When this is done, I will run some tests on a complex project (eg ArchViz), show the result and then send the package to the store. Good luck for me!
     
  17. Jade_Curtiss

    Jade_Curtiss

    Joined:
    Jul 20, 2013
    Posts:
    20
    Any news about URP?:)
     
  18. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    If all goes well, I will ship this to the store today. :)
     
    buFFalo94 and Inspeinre like this.
  19. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    So two news.

    The 1.33 update for the Built-In version has just become available in the store.

    Bug Fixes:
    • Fixed a bug due to which reflections were incorrect for all bakes in the queue, except for the first.
    Improvements:
    • Changed blending mechanics to support batching.
    • Added the ability to save the state of objects in presets. (enablend/disabled)
    • Optimized lightmap blending code to eliminate unnecessary computations.

    AND

    The Built-In + SRP version has been sent to the store and will be available in a few days.
     
    Jade_Curtiss likes this.
  20. Jade_Curtiss

    Jade_Curtiss

    Joined:
    Jul 20, 2013
    Posts:
    20
    Awesome! Cannot wait to try URP version and integrate to my project with Bakery;)
     
    Eugene-B likes this.
  21. Thall33

    Thall33

    Joined:
    Sep 18, 2013
    Posts:
    83
    Are you able to do model swaps as well. we have scenarios where we have day/night but in the scene the cars are swapped with destroyed versions at night. We can of course call on the models to swap but can we bake 2 different scene states?
     
  22. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    You can add two model variations to the scene and then create two presets using the preset manager. In one preset, normal models will be active, and in another, destroyed ones, the functionality allows this. You need to add these models to the "Game Objects" group in the preset manager and set the state (on/off). Then you can start automatic baking.
     
  23. Jade_Curtiss

    Jade_Curtiss

    Joined:
    Jul 20, 2013
    Posts:
    20
    Where is the "Game Objects" group then? In the preset manager window, only "Light Sources", "Bakery Light Meshes" and "Custom Blendables" are found.
     
  24. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    Are you using version 1.33?
     
  25. Jade_Curtiss

    Jade_Curtiss

    Joined:
    Jul 20, 2013
    Posts:
    20
    I'm using version 1.32:p
    It seems to be the feature supported by v1.33.
    Since I don't have tried it, I want to know if the Transform of objects can be saved to preset besides enabled/disabled? cause it's definitely what I need. Thanks in advance.
     
  26. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    Hmm, this is available for lights, but not for GO, they only have an on / off state. Describe what exactly do you want to achieve?
     
  27. Jade_Curtiss

    Jade_Curtiss

    Joined:
    Jul 20, 2013
    Posts:
    20
    I have a scene with some objects moving around and they change the GI effect, yeah it's kind of like realtime GI, but the movement of those objects is regular and predictable. Let's say it's not the Light but the objects which change the lighting environment. I wonder if it is possible to use MLS to approximate these effects with several lightmaps' interpolation.
     
  28. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    Ok I get it, I'll try to add this functionality today and send you a short patch.
     
  29. Jade_Curtiss

    Jade_Curtiss

    Joined:
    Jul 20, 2013
    Posts:
    20
    Thanks a lot!;) I think it would be more convenient to support this feature in the next version, since I'm still waiting for Unity Asset Store to release your SRP version.
     
  30. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    I'm looking forward to that too.:)
     
  31. Thall33

    Thall33

    Joined:
    Sep 18, 2013
    Posts:
    83
    Our studio has been looking for this exact solution to create high quality VR environments at low cost lighting, outstanding! Keep it up please!
     
    Eugene-B likes this.
  32. Artini

    Artini

    Joined:
    Jan 29, 2016
    Posts:
    87
    Looks very nice, but I still could not figure out, how it suppose to be used practically.
    Could you post some examples, that this asset make sense to be used.
    Thanks.
     
  33. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    Yes, I am going to record some tutorial videos shortly. In general, this is intended to be able to bake multiple lightmaps for a single scene and then switch between its or interpolate without sacrificing performance.
     
  34. Artini

    Artini

    Joined:
    Jan 29, 2016
    Posts:
    87
    Great. Thanks for the answer. Wishlisted for now.
     
    Eugene-B likes this.
  35. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    Hello everyone!

    MLS (Built-In + URP + HDRP) has just become available in the Asset Store!
    It will be marketed as a PRO version and users who have purchased Built-In but also need SRP can upgrade at a discount. Good luck with this edition!

    https://u3d.as/2yYs
     
  36. manurocker95

    manurocker95

    Joined:
    Jun 14, 2016
    Posts:
    74
    Just a few reports (tested in Unity 2021.1.11f1 and Unity 2021.1.12f1):

    "fixing" the three warnings would be nice just for a "no warning policy":

    - Assets\Magic Lightmap Switcher\MLSLight.cs(18,22): warning CS0108: 'MLSLight.light' hides inherited member 'Component.light'. Use the new keyword if hiding was intended.

    - Assets\Magic Lightmap Switcher\MagicLightmapSwitcher.cs(1868,22): warning CS0414: The field 'MagicLightmapSwitcher.needsRetetrahedralization' is assigned but its value is never used

    - Assets\Magic Lightmap Switcher\MagicLightmapSwitcher.cs(1867,22): warning CS0414: The field 'MagicLightmapSwitcher.tetrahedralizationCompleted' is assigned but its value is never used


    In Quick Scene:

    - This scene has missing materials, it would be nice to have them.

    - Sky and Fog Volume has a missing script (what is it?)

    - Camera has a missing script which is not cinemachine nor post pro related (what is it?)

    Trying to configure it by hand:

    - The preset manager is not in the quick start document and it doesn't look like the screenshots.

    - When baking the queue I'm getting:

    Code (CSharp):
    1. IndexOutOfRangeException: Index was outside the bounds of the array.
    2. (wrapper stelemref) System.Object.virt_stelemref_sealed_class(intptr,object)
    3. MagicLightmapSwitcher.StoreReflectionProbesData+<Execute>d__0.MoveNext () (at Assets/Magic Lightmap Switcher/Editor/Store Stages/StoreReflectionProbesData.cs:90)
    4. MagicLightmapSwitcher.MLSLightmapDataStoring.StoringStageIteratorUpdate () (at Assets/Magic Lightmap Switcher/Editor/MLSLightmapDataStoring.cs:72)
    5. UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <6ca5a1eeed924aafabbbb98281c05418>:0)
    and it gets stuck

    upload_2021-6-22_11-57-28.png



    There's no way to select/load nor update the presets in the MLS Manager.

    When selecting the Switchin/Blending assets I'm getting this error:

    Code (CSharp):
    1. ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    2. Parameter name: index
    3. System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <695d1cc93cca45069c528c15c9fdd749>:0)
    4. System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <695d1cc93cca45069c528c15c9fdd749>:0)
    5. MagicLightmapSwitcher.Blending.UpdateBlendingOperationalData (System.String targetScene) (at Assets/Magic Lightmap Switcher/Blending.cs:145)
    6. MagicLightmapSwitcher.MagicLightmapSwitcher+<UpdateStoredArray>d__56.MoveNext () (at Assets/Magic Lightmap Switcher/MagicLightmapSwitcher.cs:1372)
    7. UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <adfa4b62400849189388df71c9e26e89>:0)
    8. UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
    9. MagicLightmapSwitcher.MLSLightmapDataStoring:CreateLightmapScenario(MagicLightmapSwitcher, String, List`1) (at Assets/Magic Lightmap Switcher/Editor/MLSLightmapDataStoring.cs:732)
    10. MagicLightmapSwitcher.MLSManager:DrawSwitchingBlendingSection(MagicLightmapSwitcher) (at Assets/Magic Lightmap Switcher/Editor/MLSManager.cs:1055)
    11. MagicLightmapSwitcher.MLSManager:OnGUI() (at Assets/Magic Lightmap Switcher/Editor/MLSManager.cs:997)
    12. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
    Selecting "Patch standard shaders" gives one more error I can't select because it restarts the editor. After that, i get this one:

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. MagicLightmapSwitcher.Blending.BlendReflectionProbes (MagicLightmapSwitcher.MagicLightmapSwitcher+AffectedObject targetObject, System.Collections.Generic.List`1[T] storedLightmapDatas, System.Collections.Generic.List`1[T] closestReflectionProbes, System.Int32 fromIndex, System.Int32 toIndex) (at Assets/Magic Lightmap Switcher/Blending.cs:265)
    3. MagicLightmapSwitcher.Blending.ProcessReflectionProbes (UnityEngine.Rendering.ReflectionProbeUsage reflectionProbeUsage, MagicLightmapSwitcher.MagicLightmapSwitcher+AffectedObject targetObject, System.Collections.Generic.List`1[T] storedLightmapDatas, System.Int32 fromIndex, System.Int32 toIndex) (at Assets/Magic Lightmap Switcher/Blending.cs:350)
    4. MagicLightmapSwitcher.Blending.BlendLightmapsData (MagicLightmapSwitcher.MagicLightmapSwitcher switcherInstance, System.Single reflectionsBlendFactor, System.Single lightmapsBlendFactor, System.Collections.Generic.List`1[T] storedLightmapDatas, System.Int32 fromIndex, System.Int32 toIndex) (at Assets/Magic Lightmap Switcher/Blending.cs:447)
    5. MagicLightmapSwitcher.Blending.Blend (MagicLightmapSwitcher.MagicLightmapSwitcher switcherInstance, System.Single blendFactor, MagicLightmapSwitcher.StoredLightingScenario storedLightmapScenario, System.String targetScene) (at Assets/Magic Lightmap Switcher/Blending.cs:231)
    6. MagicLightmapSwitcher.MagicLightmapSwitcher+<UpdateStoredArray>d__56.MoveNext () (at Assets/Magic Lightmap Switcher/MagicLightmapSwitcher.cs:1397)
    7. UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <adfa4b62400849189388df71c9e26e89>:0)
    8. UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
    9. MagicLightmapSwitcher.MagicLightmapSwitcher:OnEnable() (at Assets/Magic Lightmap Switcher/MagicLightmapSwitcher.cs:1895)
    and:

    Code (CSharp):
    1. MLS:The system was unable to determine the instance of the core component. Make sure you provide the correct Lightmap Scenario.
    2. UnityEngine.Debug:LogFormat (string,object[])
    3. MagicLightmapSwitcher.RuntimeAPI:GetSwitcherInstanceStatic (string) (at Assets/Magic Lightmap Switcher/API/RuntimeAPI.cs:61)
    4. MagicLightmapSwitcher.MLSPresetManager:Init (bool) (at Assets/Magic Lightmap Switcher/Editor/MLSPresetManager.cs:57)
    5. MagicLightmapSwitcher.MLSPresetManager:OnGUI () (at Assets/Magic Lightmap Switcher/Editor/MLSPresetManager.cs:538)
    6. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    In Switching/Blending the blending configurator still says I need to "prepare shaders"

    upload_2021-6-22_12-2-55.png

    And I can't test the transitions...
     
    Eugene-B likes this.
  37. manurocker95

    manurocker95

    Joined:
    Jun 14, 2016
    Posts:
    74
    Multiscene has tons of errors:

    upload_2021-6-22_12-18-44.png
     
  38. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    Super report! Thanks!
    I'm going to do this right now.


    1) This scene has missing materials, it would be nice to have them.

    What is the best way to do this in your opinion? This version of the asset supports Built-In, URP and HDRP (it is also possible to implement support for Custom RP). All RPs have non-interchangeable materials. Do I either have to choose one thing, or should I automatically detect and replace materials? It is possible, but SRP content is packaged in appropriate packages to support URP and HDRP. It seems easier to import the package you want and replace the materials.


    2) Sky and Fog Volume has a missing script (what is it?)

    This is an HDRP object, if it is imported into the project, then the script should be there. I'll check.

    3 ) Camera has a missing script which is not cinemachine nor post pro related (what is it?)

    Most likely this is also part of HDRP, maybe HDCameraAdditions.cs.

    4) The preset manager is not in the quick start document and it doesn't look like the screenshots.

    I just don't have time. Now everything has fallen at once, MLP support, an update for MLS (Built-In) and an almost finished update for MLS (Built-In + SRP), which, by the way, fixed most of the errors that you reported.
    I will edit the documentation later today after I submit the update to the store.

    5) About erros.

    I'll check it out right now. Agian.
     
  39. manurocker95

    manurocker95

    Joined:
    Jun 14, 2016
    Posts:
    74
    In the custom bendable the new Preset_0 and 1 are not able to load/edit/remove from the MSL Manager so what's the point for having those buttons there?

    upload_2021-6-22_12-20-25.png

    Creating a new Sceneario for those gives this error:

    Code (CSharp):
    1. ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    2. Parameter name: index
    3. System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <695d1cc93cca45069c528c15c9fdd749>:0)
    4. System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <695d1cc93cca45069c528c15c9fdd749>:0)
    5. MagicLightmapSwitcher.Blending.UpdateBlendingOperationalData (System.String targetScene) (at Assets/Magic Lightmap Switcher/Blending.cs:145)
    6. MagicLightmapSwitcher.MagicLightmapSwitcher+<UpdateStoredArray>d__56.MoveNext () (at Assets/Magic Lightmap Switcher/MagicLightmapSwitcher.cs:1372)
    7. UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <adfa4b62400849189388df71c9e26e89>:0)
    8. UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
    9. MagicLightmapSwitcher.MLSLightmapDataStoring:CreateLightmapScenario(MagicLightmapSwitcher, String, List`1) (at Assets/Magic Lightmap Switcher/Editor/MLSLightmapDataStoring.cs:732)
    10. MagicLightmapSwitcher.MLSManager:DrawSwitchingBlendingSection(MagicLightmapSwitcher) (at Assets/Magic Lightmap Switcher/Editor/MLSManager.cs:1055)
    11. MagicLightmapSwitcher.MLSManager:OnGUI() (at Assets/Magic Lightmap Switcher/Editor/MLSManager.cs:997)
    12. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
    13.  
    And those are not selectables as bendable assets (only the ones I created for testing the quick scene following the documentation):

    upload_2021-6-22_12-21-29.png
     
  40. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    Do I understand correctly that we are talking about version 0.9b, which has just been published?
     
  41. manurocker95

    manurocker95

    Joined:
    Jun 14, 2016
    Posts:
    74
    Include legacyRP materials with updated materials in the URP and HDRP packages. This way when changing the RP with the support package, the demo materials are properly updated

    I was thinking about post-pro. These leftovers are easy to fix ^^

    The thing was I was trying to follow a guide tutorial that was not exactly like the screenshots. No problem there, but it's something to take into consideration for next update. Will there be a hotfix package sent by pm/mail/discord/whatever or do I have to wait for the AS to update the package? (just to know)

    Nice, I'll test some more stuff and report
     
  42. manurocker95

    manurocker95

    Joined:
    Jun 14, 2016
    Posts:
    74
    Yup, latest on the store (I just purchased the package):
    upload_2021-6-22_12-28-2.png
     
  43. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    Ok, checking it right now...
     
  44. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    No need to wait, I'll just send it to you directly. Just tell me where. By the way, it would be more convenient to communicate in Discord, since this is real-time. There I have more opportunities to diagnose problems.
     
  45. manurocker95

    manurocker95

    Joined:
    Jun 14, 2016
    Posts:
    74
    When trying to bake the Custom Bendable scene, it doesn't get the same erros, but Prepare shaders never work. i get this log:

    Code (CSharp):
    1. MLS:The system was unable to determine the instance of the core component. Make sure you provide the correct Lightmap Scenario.
    2. UnityEngine.Debug:LogFormat (string,object[])
    3. MagicLightmapSwitcher.RuntimeAPI:GetSwitcherInstanceStatic (string) (at Assets/Magic Lightmap Switcher/API/RuntimeAPI.cs:61)
    4. MagicLightmapSwitcher.MLSPresetManager:Init (bool) (at Assets/Magic Lightmap Switcher/Editor/MLSPresetManager.cs:57)
    5. MagicLightmapSwitcher.MLSPresetManager:OnGUI () (at Assets/Magic Lightmap Switcher/Editor/MLSPresetManager.cs:538)
    6. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    7.  
     
  46. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    Can you connect to the Discord right now? https://discord.gg/p94azzE
     
  47. manurocker95

    manurocker95

    Joined:
    Jun 14, 2016
    Posts:
    74
    There's no way to assign (afaik) bakery lightmaps to the MLS Manager. At least without selecting manually textures and hashes into the presets...

    That would be a good addon.

    The online documentation (opened by clicking General Settings in the offline documentation) has restricted access and shows nothing:

    upload_2021-6-22_12-39-44.png
     
  48. minad2017

    minad2017

    Joined:
    Dec 1, 2016
    Posts:
    46
    I'm using MagicLightmap Switcher and Bakery.
    After completing the initial settings, I created a lightmap according to Quick Start.
    It worked, but when I entered play mode the lightmap was destroyed.
    This symptom also occurs when using Unity's LightMapper.
    I will attach a screenshot.

    Unity 2020.3.10f1 (URP)
    Magic Lightmap Switcher(Built-In + SRP) 0.91b
    Bakery 1.9
     

    Attached Files:

    • 1.jpeg
      1.jpeg
      File size:
      132.2 KB
      Views:
      32
    • 2.jpeg
      2.jpeg
      File size:
      122.5 KB
      Views:
      30
    • 3.jpeg
      3.jpeg
      File size:
      146 KB
      Views:
      27
  49. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    250
    Hi!

    I noticed that in one of the screenshots the "Game Logic" object is deactivated. In the hierarchy of this object is "Runtime Blending", to which is attached a script that controls blending in play mode. If the script is configured according to the documentation, then this should work. Can you check that this is configured and that the Game Logic object is active in play mode?
     
  50. minad2017

    minad2017

    Joined:
    Dec 1, 2016
    Posts:
    46
    With GameLogic, the brightness of the stage will change automatically.
    However, using this still destroys the lightmap.

    I found that changing the viewing angle with the camera changes the appearance of the lightmap.
    This happens with both the editor camera and the in-game camera.
     

    Attached Files:

    • 1.jpeg
      1.jpeg
      File size:
      151.4 KB
      Views:
      28
    • 2.jpeg
      2.jpeg
      File size:
      139 KB
      Views:
      29
unityunity