Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

[RELEASED] Raytrace Lightmaps | ShineSpark - Live Feedback, Subdivision, One Button UV Atlas Packing

Discussion in 'Assets and Asset Store' started by LightingInABottle, Jan 19, 2017.

  1. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    Hey, I'm glad you like it.

    So far I've been able to recreate this in a way by changing multiple settings (like linear/gamma). The odd thing is that once I can get it to happen, I haven't been able to get it to turn off again within the same project after changing settings back, re-baking, re-importing, etc.

    The .exr files are under the Resources directory and the loading scripts are in the shinespark/LightingInABottle/Scripts so if you are inclined you can see that the image files are correct along with exactly how the loading is happening.

    When I start up a project everything seems to work fine. That being said I'll keep trying to dig deeper into what is causing it or at least how to prevent it.
     
  2. ColtonKadlecik_VitruviusVR

    ColtonKadlecik_VitruviusVR

    Joined:
    Nov 27, 2015
    Posts:
    191
    StaffanEk likes this.
  3. crackfox

    crackfox

    Joined:
    Jan 2, 2016
    Posts:
    29
    hi,

    just got this last night and it kinda blew me away.

    couple of questions:
    does this work with spot light?
    can it work with terrains?
    emissive materials?
    also is it possible to use in combination with height map or POM?

    if i may i´d join the gpu chorus. itd be great to be able to use my 1080TIs
    i realise its a long way away though.

    keep up the excellent work.
     
    Last edited: Jul 9, 2017
  4. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    I'm glad you like it.

    1. Spot lights are not integrated yet, although that may be something I add in the next version.

    2. It works with anything that is geometry. If the terrain you are using is being created or modified by GPU vertex shaders or being done with some sort of shader based rendering, that geometry is not exposed to the lightmapper.

    3. Emissive materials are not yet supported. I may take another try at them, though to be clear about expectations, they will likely be very noisy in comparison to using lights.

    4. Anything that can be converted to geometry will work.

    5. I take GPU ray tracing requests to really mean wanting renders to run faster, which can actually be done in many ways.
     
  5. Crusare

    Crusare

    Joined:
    Feb 14, 2014
    Posts:
    21
    Hi there,

    We've just purchased your Raytrace Lightmaps plug-in and have attempted to use it with Unity 5.6.2p4. Upon importing the package, Unity crashes. The project can never be opened again unless the shinespark folder is deleted.

    Any suggestions on how to resolve this?
     
  6. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,798
    @LightingInABottle
    More sample and screenshots needed.

    You should upload tree baking demos. For example unity PLM needs +64GB memory to bake lots of trees. Does your plugin can to bake lots of trees with low memory usage?(3d mesh tree , no unity tree system)
     
  7. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115

    Hi Crusare, can you send me a scene that I can use to repeat what you are seeing using the support email address (support at shinespark.io) ?

    -Do the example scenes work?
    -Is it a brand new project that you are seeing this in?
    -Has it worked for you in previous versions of Unity?
    -Is this on Windows or OSX?
     
  8. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115

    If you have some tree models you can send me, I would love to light them to show things off. I remember Unity's tree system having problematic UVs but it has been a while.

    I can't say what the resources would be without seeing the models and textures, but I would guess that there are many ways to avoid using 64GB of ram, since that sounds excessive to me. Even on complicated scenes it should be entirely possible to break the scene down and light it much more effectively.
     
  9. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,798
  10. Crusare

    Crusare

    Joined:
    Feb 14, 2014
    Posts:
    21
    No, you misunderstand.

    No matter what scene I'm in, I just hit "import" on the assets and then Unity immediately crashes. It cannot be opened again until I delete the shinespark folder from the asset folder of the project. So with that in mind:

    - I can't open the example scenes as Unity crashes before giving me an opportunity to do anything after importing
    - No, it's an already existing project
    - We've just purchased it, so I have no idea if it worked on previous versions of Unity or not
    - It's Windows 10

    It's worth noting that in a brand new project, it also crashes, just not on import. It crashes after clicking "Render" in the Lighting in a Bottle window.

    What do you think is going wrong here? Could it be the Unity version (5.6.2p4) that's causing this?
     
  11. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    You will want to try it with a non 'p' version of the IDE. Those patch builds are usually hotfixes that can have some unintended instability so unless you have a very specific reason for running the patch version it is best to stick to 'f' builds. We built our last project in 5.6.1f1 and it works perfect.
     
  12. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    I'm not sure, I need to recreate it to be able to help. Are you trying to re-import it from the asset store each time or have you tried closing the rendering window and opening Unity with the asset files already there in a brand new scene?

    Without the render window, I think all that should happen is the scripts being parsed, the tool menu item being created, and the C# scripts loading the .dll into Unity's memory space. Even if the .dll couldn't be loaded or if functions in the .dll weren't found by the scripts Unity should just report an error with the .dll and not crash. Are there any errors or messages that Unity gives?
     
  13. Crusare

    Crusare

    Joined:
    Feb 14, 2014
    Posts:
    21
    We're not using the p version out of spite, we needed it to resolve a rare bug that prevented us from proceeding with development.

    Nope, no error messages. Unity crashes after import. A progress bar appears and then disappears immediately. Then the crash happens. The weird part is that the Unity error reporting window doesn't even appear.

    I can't reopen Unity in any shape or form (with that project) while the shinespark folder exists in the hierarchy. Yes, I re-import it from the asset store everytime.
     
  14. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115

    Can you try making a new project, copying the shinespark folder to that project, then opening Unity? Unity is a bit shaky with importing assets that use .dlls. I haven't seen crashes, but I have seen a .dll loading error until restarting Unity.

    If you can try a non-P version that would also be helpful. Whether you need a p version or not, if the root of the problem is something unique to the p version, then I will know that is where I will need to look to be able to fix it, if it is even something within my control.
     
  15. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,798
    Send me your tree baking results.
    Bake time + Quality + Memory usage
     
  16. Crusare

    Crusare

    Joined:
    Feb 14, 2014
    Posts:
    21
    Alright, so here's what I did:

    - Created a new, empty project in Unity 5.5.4 (full version, no "p")
    - Imported the Raytrace Lightmaps plug-in from the asset store
    - Import worked fine
    - Entered directional lighting example scene
    - The lightmap is there, everything looks fine
    - I've opened up the Lighting in a Bottle window, pressed "Render"
    - Unity crashed

    I suspect this is a different issue, but thought it would be worth noting anyway.

    However, it's obvious now that the first bug I've reported is indeed because of the 5.6.2p4 version, as that doesn't happen in 5.5.4 .
     
  17. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    When this happened, did you restart Unity after you imported it, or did you hit render immediately? Were there any errors, warnings or messages from Unity? Also make sure you are on the current version ( 1.11 5.29.17 )

    If we can't figure it out here, one option is to skype so I can look at your screen. There are likely other things we can do to narrow it down too.
     
  18. Crusare

    Crusare

    Joined:
    Feb 14, 2014
    Posts:
    21
    So the most interesting thing happened just now.

    Upon trying to import another Unitypackage, the same crash occured as with your package, and once again, I am unable to re-open Unity. This suggests that this is a bug within Unity itself. I'll try and rebuild the libraries, see if that fixes this.

    Very odd.
     
  19. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    I did a quick test without textures first. It only takes 5-10 minutes to get a clean noise free render on my computer. The memory was fairly trivial, about 200MB more than Unity uses when idle. I'll try it with textures later. I'm actually not sure why Unity's lightmapper chokes so hard.






     
  20. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,798
    Thank you
    I'm talking about 300+ trees
     
    Last edited: Aug 18, 2017
  21. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    I can do it out of curiosity, but depending on your situation, giving 300 trees their own individual lighting is either going to mean that their individual shading is very low definition, or there will have to be lots of very high resolution maps.
     
    CaptainMurphy likes this.
  22. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    Yeah. Best bet would be to make like 20 unique trees and light those then just make sure they stay the same alignment as the originals for the world lighting to match.
     
  23. Isabelle_Cudlitz

    Isabelle_Cudlitz

    Joined:
    Aug 18, 2017
    Posts:
    3
    Hey there! Just wanted to say that I picked up this asset to make some pretty demos for some stuff that I'm working on and so far, I'm super happy with it.

    If I wanted to make a surface be perfectly reflective to the lightmap baker, how would I go about doing so? Would it be possible for me to have a surface that handles rays in a custom manner, such as teleporting the ray somewhere else?
     
  24. Doomlaser

    Doomlaser

    Joined:
    Dec 9, 2013
    Posts:
    22
    Has anyone tried using this to bake lightmaps on procedural scenes at runtime? I'd be interested if such a thing is possible with this. It looks like a really great package.
     
  25. Shuiyue-TT

    Shuiyue-TT

    Joined:
    Aug 6, 2013
    Posts:
    1
    why i can not bake point light in light map?
     
  26. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115

    Hi Collin, I'm glad you like it.

    Baking reflections of perfectly reflective surfaces is something that doesn't make much sense technically, since glossy reflections are different from every different camera angle.

    Sharp reflection techniques typically use some sort of baked occlusion, screen space reflections, or voxel tracing.

    There is no way to do custom rays tracing like you are describing and I have no plans for that at this time.
     
  27. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115

    Hi, I'm afraid I will need more information than that to be able to
    help you.

    Do the demo scenes that come with the asset work?

    Can you show me an image?

    Are you sure the UVs are correct?

    Do other light sources work?
     
  28. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    Hi Doomlaser, this is something that comes up from time to time. That would require distributing the native shared libraries with your own executable which would be something we would need to work out licensing wise. It may also take a little work to straighten out any of the kinks of using it at run time. I can work with you if you are serious about making it work.
     
  29. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    I have a couple of questions. Does it work on terrains? Does it work on multiple terrains? Will it continue to be supported after the Unity finishes their Progressive Renderer? Is it slower to use this system then the built in systems Unity has? Because I would be using it for VR applications.

    Thanks :)
     
    buttmatrix likes this.
  30. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    Hi Christian

    This works on any polygonal geometry by baking .exr images. Any procedural geometry that is created at run time won't work unless it is first converted to polygonal geometry in the editor.

    As far as I know the progressive renderer is in Unity already.

    Speed is heavily dependent on scenes, but as far as I can tell, getting the same quality out of Unity for large scenes is a very frustrating experience, while the interactivity and quality of Lighting In A Bottle makes lighting more of a victory lap after spending time on environment art.

    If you mean faster at runtime, it should be faster for multiple reasons. The first is that it only does a direct texture lookup for diffuse lighting and doesn't use a secondary guide image to modify lighting queries in the shader. The second is that it is much easier to control the resolutions of maps so that memory is not wasted.
     
  31. Zhukovp

    Zhukovp

    Joined:
    Mar 31, 2017
    Posts:
    3
    Does it works in Unity 2017.1.x and 2017.2.x ?

    Thanks.
     
    Last edited: Oct 21, 2017
  32. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Any plans for light probes on the horizon? Why are you ignoring this question?
     
  33. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    Just bought this and tied to use it on Render selected items and got this GUI Error:

    ArgumentException: GUILayout: Mismatched LayoutGroup.Repaint
    UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type layoutType) (at C:/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayoutUtility.cs:301)
    UnityEngine.GUILayout.BeginVertical (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayout.cs:333)
    UnityEngine.GUILayout.BeginVertical (UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayout.cs:320)
    liab.liabmain+RndrGui.RenderSettingsGui (liab.rndrsettings rs) (at Assets/shinespark/LightingInABottle/Editor/Plugins/liabmain.cs:931)
    liab.liabmain+RndrGui.LiabGUI (liab.rndrsettings rs, liab.ButtonAction onPressRender, liab.ButtonAction onPressWrite) (at Assets/shinespark/LightingInABottle/Editor/Plugins/liabmain.cs:1272)
    liab.liabmain.OnGUI () (at Assets/shinespark/LightingInABottle/Editor/Plugins/liabmain.cs:1697)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:285)
    UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:278)
    UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:245)
     
  34. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    725
    I am waiting to hear about why the GUI broke? Any ideas??
     
  35. DBarlok

    DBarlok

    Joined:
    Apr 24, 2013
    Posts:
    265
    Hello. Im seeing many bugs with the Lightmaps when the Level restarts, Almost burned Textures, or dark textures, changing conditions. The plugin is great. But i need help with this errors and im not receiving an answer. Can you please write me back? Im on a 3 months update now and i was waiting for Support on this 2 days ago.
     
  36. dozhwal

    dozhwal

    Joined:
    Aug 21, 2014
    Posts:
    59
    Any news from this asset ? Last time i checked, it did'nt worked well with my project. (lightmap id sets to -1). but i find it interristing. please tell me there is still some support today ? :)