Search Unity

[RELEASED] Magic Light Probes - High Precision Light Probe Generator

Discussion in 'Assets and Asset Store' started by Eugene-B, Nov 18, 2019.

?

Are you interested in this asset?

Poll closed Jan 28, 2020.
  1. Yes, I plan to buy it

    3 vote(s)
    75.0%
  2. No

    1 vote(s)
    25.0%
  1. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Hello everybody!
    Has anyone encountered an error due to which all layers of static geometry switched to "Ignore Raycast"? It happened once to me, but I still did not understand why and still cannot repeat this case.

    In one of the passes, my code switches the layer for all static objects to "Ignore Raycast", then at a certain point everything returns as it was. I'm afraid that there might be some kind of mistake, but this is not a fact.

    I would be grateful for the help in solving the problem. If it really exists!

    (FIXED in v1.4.2)
     
    Last edited: Mar 16, 2020
  2. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    I'm trying to adapt Magic Light Probes to different situations. Should I add the ability to place probes along the given lines? This would allow the probes placement on a roads network quickly and accurately.

    At the moment, this does not look very accurate...
    roads.PNG

    roads1.PNG
     
    Last edited: Mar 14, 2020
    hopeful likes this.
  3. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Hi!
    In version 1.4.1, an error was discovered due to which, when calculating the volume for the first time, all layers of static objects were reset to "Ignore Raycast". This bug has been fixed in version 1.4.2, the update has already been uploaded to the asset store and is waiting for approval. To receive the update personally, write to me.

    Also in version 1.4.2 the following corrections are made:

    Added features:
    • Added ability to install probes in manual mode with one click ("MLP Combined Volume" component)
    Bug fixes:
    • The "MagicLightProbes.DependencyChecker.DoesTypeExist()" method throws an exception in some cases, which blocks code compilation
    • The first time you add the "MLP Volume" component to the scene, all non-static objects are deactivated
    • Minor fixes in DependencyChecker.cs file
     
    Last edited: Mar 19, 2020
  4. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Version 1.4.3 sent to the asset store.

    Added features:

    • HDRP light source support (experimental)
     
    AntonioModer and ftejada like this.
  5. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    A new problem was found.

    A pop-up window asking to add plug-in main component to the scene in the prefab editing mode

    Will be fixed in the next update.
     
  6. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Hey guys!
    Update 1.5 ready and sent to the asset store!
    Anyone who wants to receive it before it becomes available in the asset store, send me your email address and invoice № in the PM.

    Added features:
    • The calculation can now be performed even if the editor window is out of focus
    • Ability to quickly edit in real-time some parameters of the calculated volume (in the current version it is only "Color Threshold")
    • The light sources in the "Lights" tab of the manager are now sorted by type and mode

    Bug Fixes:
    • A pop-up window asking to add plug-in main component to the scene in the prefab editing mode
    Changes:
    • Recalculation of automatic volume separation is started only after the mouse button is released
     
    AntonioModer likes this.
  7. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    In version 1.5, an error was detected due to which it was not possible to complete compilation of the project. The update has already been sent to the store.
     
  8. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Hi everyone!
    I added a new feature to the plugin. I’m still working on it but it is already working and will be available in update 1.6. A new feature is the quick editing of the calculated volume in real-time. It runs on GPU and it is very fast!

     
  9. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Update 1.6 sent to the store.


    Added features:
    • Quick editing of volume parameters after calculation
      • Equivalent Volume Filling (GPU)
      • Unlit Volume Filling (GPU)
      • Color Threshold
    • GPU acceleration for some passes of calculation
    • Display progress in editor status bar
    • Display progress on Windows taskbar
    Bug Fixes:
    • In rare cases, probes were erroneously placed inside the geometry
    • Incorrect parent volume for a light source
    • Probes removed from combined volume after scene reload
    • Incorrect type of light source in HDRP mode
    Changes:
    • Temporarily disabled the ability to set the distance between the probes in the corners
     
    Last edited: Apr 18, 2020
    AntonioModer likes this.
  10. DJSourceTech

    DJSourceTech

    Joined:
    Feb 26, 2020
    Posts:
    5
    Hi there, we bought your amazing plugin! Really helpful!
    But some of out project is using .NET 2.0, is it possible to run Magic Light Probe with NET2.0?
     
    AntonioModer and Eugene-B like this.
  11. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Hi!
    Thanks for the feedback! I don’t think you should have any problems with Net 2.0, I tried to keep this support. However, if something does not work, then write to all available communication channels that we’ll come up with something!
     
    AntonioModer likes this.
  12. DJSourceTech

    DJSourceTech

    Joined:
    Feb 26, 2020
    Posts:
    5
    NET3.5 i mean, not 2.0
     
  13. DJSourceTech

    DJSourceTech

    Joined:
    Feb 26, 2020
    Posts:
    5
    Thanks for reply, we are trying to change to .NET 4.0, hope it can run
     
  14. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    I had no problems with this, it should work on all versions.
     
    AntonioModer likes this.
  15. Caudex

    Caudex

    Joined:
    Nov 13, 2013
    Posts:
    4
    Does this support URP. I cannot find it in the docs
     
    AntonioModer likes this.
  16. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Yes, it is compatible with URP/HDRP.
     
    AntonioModer likes this.
  17. Caudex

    Caudex

    Joined:
    Nov 13, 2013
    Posts:
    4
    I am getting a null reference exception that freezes the unity editor (it continuously throws the exception). I was trying to resize the bounding box at the time but the drag points were not showing.
    upload_2020-4-25_22-42-30.png

    I tried restarting Unity but this did not help, I removed all the objects from the hierarchy, it still did not solve the problem. I then removed the script from the Directional Light and that finally killed it.
    After adding everything back in, it is no longer throwing exceptions but I still cannot seem to resize the green box to encompass the scene. What am I missing? I cannot see any grab handles to allow me to resize it.
     
    Last edited: Apr 25, 2020
  18. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Can you connect to the discord channel? Quick guess. You did not delete (by accident or on purpose) any embedded objects of the main component?
    If you add the main component to the scene again and remove the old one, does this solve the problem?

    Volume dimensions are changed using the "Rect Tool"
    upload_2020-4-25_19-32-38.png
     
    Last edited: Apr 25, 2020
  19. Caudex

    Caudex

    Joined:
    Nov 13, 2013
    Posts:
    4
    Thankyou for your quick reply, I thought I had tried that.

    Yes I think you are right about removing a script. When I was fiddling around looking for how to make the grab handles appear, I think I removed the quick edit script (as it had warnings saying it was experimental). I do think you should update your docs to say how to resize that box and also that you have to have a script on every light. Incidentally, a button to Add To All would really be appreciated. I am adding prefabs in with lots of lights in them and clicking manually is kinda tedious.

    Thanks again for your help, this tool is a life saver.
     
  20. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Thanks dude!
    The documents did not really mention how to change the size of the volume. I added this information yesterday.
    As for the button for adding a component to all light sources, yes, you're right, I will add it in the next update. Good luck
     
  21. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Hi there!
    I created a server for quick delivery of updates. You will now download the latest release version of MLP before it is available in the asset store.
    I will also post individual updated files there. Access is by login (use any name) and the number of your invoice. Registration is automatic.
    http://motiongamesstudio.com/mlp-update
     
    Last edited: May 2, 2020
  22. fleity

    fleity

    Joined:
    Oct 13, 2015
    Posts:
    345
    Quick tip for everyone who has problems with geometry dissappearing or not being considered by the lightprobe placement:
    If you parent a mesh (set to static) under an empty which is not set to static AND has a monobehaviour attached to it the light probe placement will deactivate the empty and therefore all children during the calculation. However if that empty with a script is set to static as well everything works as it should.

    Took me more than an hour to figure and some serious headache xD
     
  23. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Perhaps it's time to allocate a place in the manual for this problem! :)
    Thank you for participating!
     
    fleity likes this.
  24. fleity

    fleity

    Joined:
    Oct 13, 2015
    Posts:
    345
    thanks, it's a pleasure. The tool is great and a huge time saver (even with a few random things happening like that xD)
     
    Eugene-B likes this.
  25. fleity

    fleity

    Joined:
    Oct 13, 2015
    Posts:
    345
    Code (CSharp):
    1. Assets\ThirdParty\Magic Light Probes\MLPVolume.cs(62,68): error CS0246: The type or namespace name 'GizmoType' could not be found (are you missing a using directive or an assembly reference?)
    I have multiple erros like this one when trying to build the project with MLP.
    Gizmotype is probably from UnityEditor? hence it can not be found when building? Shouldn't this be in the editor folder then or wrapped in an #if UNITY_EDITOR?
    MLP version 1.66

    adding #if UNITY_EDITOR directives in MagicLightProbes.cs and MLPVolume.cs made it work:
    MLPVolume.cs
    line 62 before DrawGizmoOnSelection #if UNITY_EDITOR
    and #endif in line 125​

    MagicLightProbes.cs: around variable definition of
    public SerializedObject tagManager;
    public SerializedProperty tagsProp;​
    and in
    CheckIfTagExist function where these are used. The function will then always return false but I guess that's okay in a build

     
    Last edited: May 8, 2020
  26. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    I will fix this in version 1.67, which I have almost prepared. I was in a hurry and forgot to check assembly errors, again.
     
  27. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Version 1.67 uploaded to the update server.

    Added features:
    • After clicking the "Add Volume ..." button in the manager, a new volume is created in front of the camera
    Bug Fixes:
    • Data for quick editing is saved even after a scene is reloaded
    • Compilation errors fixed
     
    fleity likes this.
  28. OwlBoy-

    OwlBoy-

    Joined:
    Dec 11, 2015
    Posts:
    24
    I'm getting some errors:

    upload_2020-5-15_13-16-36.png

    Code (CSharp):
    1. Kernel 'CSMain' not found
    2. UnityEngine.ComputeShader:FindKernel(String)
    3. MagicLightProbes.<ExecutePass>d__1:MoveNext() (at assets/Magic Light Probes/Passes/PartialVolumeFilling.cs:64)
    4. MagicLightProbes.MagicLightProbes:SubPassIteratorUpdate() (at assets/Magic Light Probes/MagicLightProbes.cs:450)
    5. UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
    6.  
    Code (CSharp):
    1. ArgumentException: Kernel 'CSMain' not found.
    2. MagicLightProbes.PartialVolumeFilling+<ExecutePass>d__1.MoveNext () (at assets/Magic Light Probes/Passes/PartialVolumeFilling.cs:64)
    3. MagicLightProbes.MagicLightProbes.SubPassIteratorUpdate () (at assets/Magic Light Probes/MagicLightProbes.cs:450)
    4. UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorApplication.cs:200)
    5.  
    Deleting MLP Group 0 and restarting Unity and trying again with a new one I did not get the error, but I have no clue how I caused the error. And fiddling with random errors on my first go at it is a bummer.

    And, I have no probes generated. Not sure what to do. Lemme know what additional information is useful. Unity 2018.4.20f1. 1.68 from the asset store.



    Edit: Additional errors I see while trying to figure stuff out:

    Code (csharp):
    1. Socket: connect failed, error: Operation now in progress(36)
    2. UnityEditor.SceneManagement.EditorSceneManager:SaveCurrentModifiedScenesIfUserWantsTo()
    3. MagicLightProbes.GeneralMethods:MLPMainComponentEditor(MagicLightProbes) (at assets/Magic Light Probes/Editor/GeneralMethods.cs:830)
    4. MagicLightProbes.MLPEditor:OnInspectorGUI() (at assets/Magic Light Probes/Editor/MLPEditor.cs:45)
    5. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    6.  
    Code (csharp):
    1.  
    2. connect failed
    3. UnityEditor.SceneManagement.EditorSceneManager:SaveCurrentModifiedScenesIfUserWantsTo()
    4. MagicLightProbes.GeneralMethods:MLPMainComponentEditor(MagicLightProbes) (at assets/Magic Light Probes/Editor/GeneralMethods.cs:830)
    5. MagicLightProbes.MLPEditor:OnInspectorGUI() (at assets/Magic Light Probes/Editor/MLPEditor.cs:45)
    6. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    7.  
    This is one of the compute shaders:
    upload_2020-5-15_14-0-30.png
     
    Last edited: May 15, 2020
  29. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    The cause of this problem has been clarified.

    Compute shaders do not work on OpenGL <4.3 for Windows and Linux. For macOS only in Metal Render mode. Software verification added.

    In such cases, the system will work without using a GPU.
    The problem will be fixed in version 1.69

    Thansk to OwlBoy-
     
  30. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Version 1.69 uploaded to the update server.

    Added features:
    • During quick editing, the volumes that are visible in the editor camera are recalculated first (prioritized view)
    • Scene GUI for adding/removing objects that bound the scene from below (Tools/Magic Light Probes/Scene GUI)
    Bug Fixes:
    • Fixed a bug in the inspector of the "MLP Quick Editing" component, which did not allow it to display correctly
    • Errors in the algorithm for arranging probes along geometry are fixed
    • Compute shaders do not work on OpenGL < 4.3 for Windows and Linux. For macOS only Metal Render is supported. Software verification added
     
  31. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Mini patch
    Added features:
    • Managing a list of objects that bounds the scene from below from the main component interface
    upload_2020-5-19_1-35-39.png
    Bug Fixes:
    • A method has been found in the search code for probes located below ground/floor that slows down the system if there are many objects on the scene
    • Errors in the "MLP Quick Editing" component - index out of range
    • The wrong plugin’s work path makes it impossible to work system correctly
    Version available on update server
     
    Last edited: May 19, 2020
  32. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Version 1.69 is supplemented by many corrections (thanks to everyone for the bug reports) and renamed to 1.70, now it is available on the update server under this name.

    Anyone who has problems (as well as everyone else) with version 1.68 (available in the asset store), please upgrade to version 1.70 first and see if the problems are fixed.
    An update to the asset store will be sent a bit later, after updating the documentation.

    Full list of changes
    Added features:
    • During quick editing, the volumes that are visible in the editor camera are recalculated first (prioritized view)
    • Scene GUI for adding/removing objects that bound the scene from below (Tools -> Magic Light Probes -> Scene GUI)
    • Managing a list of objects that bounds the scene from below from the main component interface
    Bug Fixes:
    • Fixed a bug in the inspector of the "MLP Quick Editing" component, which did not allow it to display correctly
    • Errors in the algorithm for arranging probes along geometry are fixed
    • Compute shaders do not work on OpenGL < 4.3 for Windows and Linux. For macOS only Metal Render is supported. Software verification added
    • A method has been found in the search code for probes located below ground/floor that slows down the system if there are many objects on the scene
    • Errors in the "MLP Quick Editing" component - index out of range
    • The wrong plugin’s work path makes it impossible to work system correctly
     
  33. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Last edited: Jun 4, 2020
    AthrunVLokiz likes this.
  34. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Version 1.71 uploaded to the update server.

    Bug Fixes:
    • Bugs fixed in debug mode when the "Simple" workflow is selected
     
  35. Deleted User

    Deleted User

    Guest

    Hey guys,
    wanted to ask what files/ folders could potentially be git.ignored?
     
  36. fleity

    fleity

    Joined:
    Oct 13, 2015
    Posts:
    345
    @Alexees
    I've checked in the entire MLP folder into out git without any issues. Since then I have removed a few examples, which I suspect you can therefore safely add to the gitignore
    AND
    I have gitingored the scene data folder (and meta file) as this is the only folder which constantly add local files / changes.
     
    Eugene-B and Deleted User like this.
  37. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Thanks @fleity for taking part!

    Yes, there are files for quick editing in the "Scene Data" folder, if you want your team to also edit the volume using "MLP Quick Editing", then you need to transfer this folder to the them. Other files may be ignored.
     
    Last edited: May 28, 2020
    fleity likes this.
  38. macube

    macube

    Joined:
    Jul 16, 2017
    Posts:
    39
    Hey,

    i get always the error-message, when i click on "calculate probes volume":

    UnassignedReferenceException: The variable calculateVolumeFilling of MagicLightProbes has not been assigned.
    You probably need to assign the calculateVolumeFilling variable of the MagicLightProbes script in the inspector.
    MagicLightProbes.PartialVolumeFilling+<ExecutePass>d__1.MoveNext () (at Assets/Magic Light Probes/Passes/PartialVolumeFilling.cs:73)


    And the second problem is, its very slow when i add MPL Group.
    I use Unity 2019.3.13f1 with URP.
     
  39. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    The first error says that the compute shader is not loaded and therefore the variable is NULL. The second problem is related to the slow method of searching the plugin’s working folder; this happens when your project is large enough. I am already working on this. Could you connect to the Discord channel so that we can communicate more quickly?
     
  40. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Version 1.72 uploaded on update server.

    Changes:
    • LoadComputeShaders() method is divided, now the search for the plugin work folder is carried out in a parallel thread, after which the shaders are loaded. (this eliminates the possibility of the editor freezing when adding volume to the scene)
     
  41. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Version 1.73 uploaded on update server.

    Improvements:
    • Automatically check for updates
    The system automatically connects to the update server and checks for a new version. If a new version is detected, you will receive a notification in the interface of the main component.

    upload_2020-6-3_19-57-1.png

    Using the "About MLP..." window, you can download and install a new version without leaving the editor window.

    upload_2020-6-3_19-56-33.png
    • Links to documentation in system components (help icon in the inspector interface)
    upload_2020-6-5_17-44-19.png
     
    Last edited: Jun 5, 2020
    AthrunVLokiz likes this.
  42. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Version 1.74 uploaded to update server.

    Improvements:
    • Tips for options in the editor interface
    Bug Fixes:
    • The warning about the necessary system component is repeated endlessly and blocks the editor if you deactivate the object in which the MLP Combined Volume component is located
    You can update the version using the "About MLP ..." window

    The store version will be updated later. I'm still waiting for version 1.73 to be confirmed, then I will send version 1.74.
     
  43. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    388
    @EvgenFree

    Is it possible to know how to update from 1.71? I have load of errors that I would love to get rid of. :)

     
  44. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    @netpost
    Hi!

    Errors indicate that you have deleted something from your scene.
    In fact, while researching the code, it seems like you are using HDRP and have removed the HD Additional Light Data component from the light source.

    upload_2020-6-9_1-25-9.png

    In any case, you can update the version using the update server.

    If there are problems after the update, then try to connect to the Discord server, there we can quickly solve any problems.
     
    Last edited: Jun 8, 2020
  45. Deleted User

    Deleted User

    Guest

    @EvgenFree awesome tool, thanks for creating it, it's really a life saver. Could you do one more thing and clean up the API so it does not throw warnings at all?

    upload_2020-6-9_6-9-19.png
     
    Eugene-B likes this.
  46. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Thanks! I will pay attention to these warnings. Will be fixed in the next version.
     
  47. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Version 1.75 uploaded to update server.

    Improvements:
    • Automatic arrangement of calculation volumes
    • Dynamic Volume Density (Experimental)
    upload_2020-6-13_1-3-7.png
    upload_2020-6-13_1-7-5.png

    In parts of the volume in which there are groups of several objects, the density of the probes automatically increases.
    • The requirement to select objects to limit the scene below is now optional. You can use the bottom side of the volume as a limiter
    • Setting the Gizmo display distance during quick editing
    Gizmo Diastance.gif

    Bug Fixes:

    • MLP Helper window now displays correctly
    • The console is cleared of warnings
    Changes:
    • Manager window resized
    • An object is created on the scene, into which all the components of the plug-in are added
     

    Attached Files:

    Last edited: Jun 12, 2020
  48. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    388
    @EvgenFree

    Thank you for the quick reply. Strange! I verified and I had two HD Additionnal light data components on the same camera. o_O

    This will be really useful and faster. I just downloaded the latest version, Thank you!
     
  49. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    @netpost
    Oh no, it's not about the camera, it's about the light source to which MLP Light is added.

    If this problem is still not resolved, please let me know. If possible, then connect to the Discord channel for quick communication
     
    Last edited: Jun 13, 2020
  50. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Hey guys!
    Please pass a short survey if it’s not difficult for you. Maybe this will help me improve my asset. I will be very grateful!

    https://forms.gle/e41noPnPKVKpRaWk6