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
    Comparison of manual and automatic placement (v1.78)
     

    Attached Files:

  2. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Update 1.79 available in the store.

    Bug Fixes:
    • Strong editor slowdown with a large number of objects or MLP volumes on scene
    • Sometimes probes are erroneously removed, even if they are not inside the geometry
     
  3. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    I tried to create a new promo video. I hope this helps users better understand how Unity's light probes are used and how MLP can help with their correct location.

     
    Last edited: Jul 6, 2020
    JBR-games likes this.
  4. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Version 1.81 available on update server.

    Bug Fixes:
    • Wrong type of light source HDRP
    • Calculation errors in debug mode
     
  5. ImpossibleRobert

    ImpossibleRobert

    Joined:
    Oct 10, 2013
    Posts:
    530
    This looks really good. Maybe stupid question from my side: what's the advantage of the algorithm to simply calculating an even-spaced volume of light probes? Is it important to leave out some areas? Will it incur dramatic memory costs? This would be the much better comparison in my eyes (memory, CPU...) than doing a "no-probes" comparison. Everybody knows that only with light-probes light will actually be picked up so it doesn't make sense to show a lighting feature of Unity that way IMO.
     
  6. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    @rwetzold

    To my surprise, not everyone knows what light probes are and why they are needed. :)

    As for the uniform grid, it is not only about saving memory and CPU. The main advantages of automatic placement are that:
    • You do not need to take care of the probes inside the geometry, they are automatically deleted
    • You do not need to look for contrasting places on the scene, they are automatically located and you can set the detection threshold
    • You do not need to go around all the corners on the scene and fill them with probes, this also happens automatically
    • You do not need to duplicate probes, it is long and dreary.
    And all this is just about a "Simple" workflow, there is still an "Extended" one, which allows you to put probes in the air, in those places where objects pass from shadow to light.
     
    ImpossibleRobert likes this.
  7. ImpossibleRobert

    ImpossibleRobert

    Joined:
    Oct 10, 2013
    Posts:
    530
    Thanks for the quick answer. What happens if probes are accidentally inside geometry? Don't the other probes mostly compensate for this?

    As to the video: see it more as a feedback. Why not make an introduction "Have you heard of light probes already? They are used to illuminate baked environments in Unity". THEN show what you bring in addition. Comparing it like now seems a bit strange and I had the immediate reaction "is he going to explain light probes now?". You should really focus on the advantages of your tool and not only state "it will not put probes inside geometry" but WHY this is important. Why not simply create a big volume and fill it with a gazillion light probes.
     
  8. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Probes inside the geometry are usually completely black and when a dynamic object comes close to them it can lead to incorrect lighting. There can be a lot of such places. Thanks for the advice on the video, I hope one day I can make it perfect! :)
     
    hopeful likes this.
  9. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    @fleity Thanks for the great review!
     
    Last edited: Jul 18, 2020
  10. fleity

    fleity

    Joined:
    Oct 13, 2015
    Posts:
    345
    Eugene-B likes this.
  11. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Version 1.82 sent to the store and available on the update server.

    Bug Fixes:
    • Several errors that did not allow to calculate the volume in the extended mode correctly
     
  12. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Hi everyone!

    Sometimes an exception is thrown at line 60 in the MLPCombinedVolume.cs file. (The object of type "MLPCombinedVolume" has been destroyed but you are still trying to access it...)

    I cannot reproduce it, I will be grateful to anyone who reports this issue and provides an order of action to achieve it.
     
  13. swantonb

    swantonb

    Joined:
    Apr 10, 2018
    Posts:
    172
    Am i the only one here who gets 0 probes after hitting "calculate"? I have MLP light script on my lights and literaly copied and pasted mlp game objects from an example scene. Did i do something wrong?
     
  14. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    @swantonb

    Hey!
    There are several possible reasons, the first thing to check is:

    1) The object you selected as the bottom bounding object is not static or has a collider mesh too thin.
    2) Your geometry is not marked as static or is a child of an object that is not marked as static.
    3) You have specified the collision layers incorrectly (the static geometry is not in the layer selected in the "Collision Detection Layers" list)

    Connect to the Discord server, there we can resolve your issue in a quick and real time.
     
    Last edited: Sep 6, 2020
    DrewMedina likes this.
  15. Eugene-B

    Eugene-B

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

    Bug Fixes:
    • Sometimes an exception is thrown at line 60 in the MLPCombinedVolume.cs file. (The object of type "MLPCombinedVolume" has been destroyed but you are still trying to access it...) NOTICE: Perhaps the error has not been completely fixed. Let me know if you encounter it again.
    • Manual probes placement (Set Custom Probes) is not automatically deactivated and locks the scene view even if the component's inspector is not active.
    • Preset of filling options is not taken into account correctly.
    Improvements:
    • Parameters in MLP Quick Editing can be entered using the keyboard, not just the sliders.
    • Added option to disable automatic shadow border detection (in Simple workflow)
     
  16. knas01

    knas01

    Joined:
    Feb 24, 2018
    Posts:
    236
    Hi, I might be looking for something that speeds up light probe placement. I'm not sure though since I'm pretty new to this so sorry if my questions have nothing to do with this asset.
    I saw your example videos and the nice indirect light it created and there's now way I'm gonna do that manually.

    So my questions are, does this work with non static lights, like dynamic daytime?
    Also, can I use it for non light baked emission textures that are on moving prefabs?
    Or are my questions completely wrong and I'm actually not looking for light probes? o_O
     
  17. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Hey!
    Light probes only transfer reflected light from baked lightmaps. What you are talking about requires RTX technology. :)
     
  18. SXY1997

    SXY1997

    Joined:
    Apr 8, 2018
    Posts:
    18
    Hello, when I use the plug-in, many probes are placed around the geometry. I don’t want this. How can I reduce them?
     
  19. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Hi! Can you show a screenshot?
     
  20. SXY1997

    SXY1997

    Joined:
    Apr 8, 2018
    Posts:
    18
    I have a statue of a horse. I want to place a probe on the edge of the shadow on the ground, but I don’t want to place it on the surface of the statue because my character will not be too close. What should I do?
     

    Attached Files:

    • hh.png
      hh.png
      File size:
      53.6 KB
      Views:
      346
    • hh2.png
      hh2.png
      File size:
      76.5 KB
      Views:
      345
  21. SXY1997

    SXY1997

    Joined:
    Apr 8, 2018
    Posts:
    18
    One more question,If I have a staircase, I want to place probes on the surface, but I don’t want to place probes on the back because my character can’t get there, what should I do?
     

    Attached Files:

    • hh3.png
      hh3.png
      File size:
      39.7 KB
      Views:
      337
    • hh4.png
      hh4.png
      File size:
      73.5 KB
      Views:
      332
  22. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    If you don't need probes on horse statue then you can simply make it non-static while calculating the probes. As for the stairs, have you disabled the "Try Prevent Light Leakage" option?
     
  23. knas01

    knas01

    Joined:
    Feb 24, 2018
    Posts:
    236
    Figures. Thanks.
     
  24. SXY1997

    SXY1997

    Joined:
    Apr 8, 2018
    Posts:
    18
    I tried to set the statue to be non-static, but the probe will not be placed on the edge of the shadow and may be placed inside the statue.
     

    Attached Files:

  25. SXY1997

    SXY1997

    Joined:
    Apr 8, 2018
    Posts:
    18
    Is there any way to place the probe on the shadow cast by an object and not place it on the surface of the object?
     
  26. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    @1260073465
    Can I connect to you remotely using TeamViewer, for example? I do this sometimes, it's quick and easy. I'll just show you how best to do what you need to do.
     
  27. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    I thought more about your problem and I think I have found a solution. I will add a special component to the plugin that you can attach to an object on which you do not need probes. Then the object will be taken into account by the system as before, but there will be no probes on its surface. I will upload the update to the update server later today.
     
  28. SXY1997

    SXY1997

    Joined:
    Apr 8, 2018
    Posts:
    18
    Sorry, it is not convenient for me to connect with you for some reasons. Thank you for considering my question. I look forward to the next update.:)
     
  29. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    @1260073465

    Well it was fast and it seems to work. Check the update. Add the MLPForceNoProbes component to your statue, this should prevent the installation of probes on it.
     
  30. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Well, it looks like I've finally fixed this issue (the object of type "MLPCombinedVolume" has been destroyed but you are still trying to access it...).
    Version 1.85 is available on the update server. I recommend everyone to update the asset. The update in the store will be available within two days.
     
  31. pez

    pez

    Joined:
    Jul 6, 2013
    Posts:
    52
    Hi,

    I'm using Magic Probe in Unity 2020.1 & wanted to see if it's supported on that version or not? Because I'm experiencing a lot of bugs.

    The main issue I have at the moment is with getting volumes & probes to update correctly.

    eg: I changed Prope Spacing from 2m to 0.5m & the amount of group volumes went from 4 to 255. That's overkill for the small area I'm testing & takes way longer to bake so I changed that value back to 2m - but it does not reduce the number of group volumes back down. There's no way to reduce that number again other than deleting everything and starting from scratch.

    Similar issues after baking with the quick editing component values. Changing any of those & then putting them back to their previous values does not put the same spread of light probes back. It's like it gets corrupted or something?!

    Any help you have would be great because changes to any of the sliders at the moment is a gamble to weather I'm going to wreck everything I've done thus far or not.

    Thanks,
    Pat
     
  32. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Hi!
    When you change the Probe Spacing, the Corners Detection Threshold also changes, which also affects the number of subvolumes. Perhaps you forgot to change it?

    In terms of quick editing, I would like to see what exactly is happening in the screenshots or a short demo video to understand the behavior.

    I haven't actually tested the tool in detail for 2020.1, I'll take my time for that today.

    Can you connect to Discord server?

    Updt:

    I just ran some tests on 2020.1.5f1 and it looks like everything works without errors (plugin version 1.85). I need to understand in more detail what is going on with you in quick edit though.
     
    Last edited: Sep 16, 2020
  33. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    Any issues with HDRP or would this "just work" there?
     
  34. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Hi!

    If you will be using the plugin in the Advanced Workflow, you will need to configure each light separately. I do not exclude that there may be problems if HDRP is updated again and the API changes there. However, if there are such problems, then this is quickly fixed. Just a few minutes. If you only use the plugin in Simple Workflow, it doesn't matter, since the plugin will not read data from HDRP lights.
     
  35. Unplug

    Unplug

    Joined:
    Aug 23, 2014
    Posts:
    256
    dumb question, but can you make it work for unity 2017.4 ??? unity asset store tell me its for 2018, but maybe you have a version that work for 2017 ???
     
  36. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    The plugin uses Jobs, which is available with the package manager since version 18, so it won't work on version 17. On the other hand, I could try to eliminate this dependency on an individual for you. Don't have the option to upgrade to 2018?
     
  37. Unplug

    Unplug

    Joined:
    Aug 23, 2014
    Posts:
    256
    that would be pretty awesome. I'm on 2017.4 LTS and this project is a game under development for 3 years and I can't upgrade the project. Already tried to go 2018 but it involve a lot of work which I can't afford right now
     
  38. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    OK. I'll see what I can do later today.
     
  39. Unplug

    Unplug

    Joined:
    Aug 23, 2014
    Posts:
    256
    thanks, I just bought it and ill wait to get a custom package if possible. ill work on something else because manually placing prove is really annoying
     
    Eugene-B likes this.
  40. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    @Unplug

    I tried to adapt the plugin to the 2017 version. Unfortunately, this is not possible. Dependencies not only on the Jobs class, but also on many others. This applies to almost all plugin components.
     
  41. gmatthews

    gmatthews

    Joined:
    Jan 13, 2016
    Posts:
    16
    Is there any way this can be used with dynamic geometry/adding objects on the fly to a scene?
     
  42. Unplug

    Unplug

    Joined:
    Aug 23, 2014
    Posts:
    256
    can you refund :(

    alternatively you could upgrade my game to 2018 :D:rolleyes:
     
  43. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Do you mean procedural generation?
     
  44. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Why did you buy this before I checked compatibility? :D
    Are you planning to use the plugin in future projects?

    I can offer a voucher for an asset that will be available soon, this is the Magic Lightmap Switcher, it is designed to switch and mix lightmaps in real time. In any case, a return is possible, I don't think this is a big problem.
     
  45. gmatthews

    gmatthews

    Joined:
    Jan 13, 2016
    Posts:
    16
    yes. so if i add a bunch of shapes, e.g. cubes, to a scene, can I auto-add a lightprobe mesh around the extent of all cubes, and generate the lightprobe info -- even if it runs in the background a bit and slightly delayed for the effect to shiow
     
  46. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    This is not possible, Unity rigidly fixes the probe grid for each scene, and baking data only works in editor mode. The Lightmapped Prefabs found in the Bakery asset may suit you.
     
  47. gmatthews

    gmatthews

    Joined:
    Jan 13, 2016
    Posts:
    16
    Pretty sure lots of people want this feature, since they have dynamic geometry
     
  48. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    Light probes are designed specifically to illuminate dynamic geometry. For indirect lighting, to be precise. Any dynamic object you add will receive this lighting, however you won't be able to get bounced light from the object you just added, this will require recalculating the probes grid and re-baking the data from both the light probes and the entire irradiance map.
     
  49. gmatthews

    gmatthews

    Joined:
    Jan 13, 2016
    Posts:
    16
    Also, thanks for the tip on Bakery, but it doesn't seem to support completely dynamic geometry. or have i missed something?
     
  50. Eugene-B

    Eugene-B

    Joined:
    Sep 7, 2014
    Posts:
    323
    You can use it to prepare prefabs with baked lighting, the rest of the lighting needs to be dynamic. Generating procedural worlds is pretty tricky. I once talked to the guy who made the light probes in Unity move or it was some clever trick, but this way he got the relative ability to build a procedural level with light from the light probes. However, I think there are a lot of nuances and limitations.