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. labCosium

    labCosium

    Joined:
    Jun 17, 2014
    Posts:
    11
    Again on global parameters, could you please explain how act :

    1. Total Samples : I see quality difference, but don't understand exactly what you mean in the documentation about this number. Does it acts somthing like an AA algorithm, by sampling multiple time from small direction changes and make an average of sampled values ?

    2. Ray Oversample is quite mysterious for me : I've made first test using Total Samples = 2, Oversample = 256, rendertime = 13 seconds, then Total Samples = 64, Oversample = 1, rendertime = 45 seconds.
    ray_over_16_13seconds.jpg samples64_40seconds.jpg

    Maybe this scene is too simple to see the difference, but in this case final quality is quite the same.

    If you can light my on these parameters, I can then go to our production scenes with your tool, and give you feedback if you're interested.
     
  2. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    I'm glad it is working well for you! I think you understand the parameters correctly with a small exception.

    In your two pictures, the samples per pass is 512 while the total samples is 2. One pass is rendered with 512 samples per pixel, then the total samples is greater than 2 and the render finishes. Because your total samples per pixel are less than the samples per pass, you end up with far more than the threshold for the render finishing.

    I typically work with the total samples set to the maximum and just stop the render once I think the noise is gone.

    Let me know if you feel that is clear or if you have any more questions.

    Thanks!
     
  3. labCosium

    labCosium

    Joined:
    Jun 17, 2014
    Posts:
    11
    And just to finish :)

    As a small changes proposal, it could be cool to have some log file near to lightmaps textures to save

    - parameters
    - render time
    - average samples per seconds
    - passes number

    to be able to optimize quality/rendertime ratio days after days of use...

    Just a suggestion, not an order of course
     
  4. labCosium

    labCosium

    Joined:
    Jun 17, 2014
    Posts:
    11
    That's perfectly clear ! I completly misunderstood the "Total Samples" parameter... I thought it was something per pixel. Now you explained it is a total maximum number at least to achieve in a render job, all is clear in my mind !
    Hope my silly question can help other users where exploring parameters...

    Thanks again for your reactivity and clarifications
     
  5. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    Ray oversampling casts more rays per sample from the surface, meaning that for the same number of samples there will be less noise. Their pattern is also a grid, which means they will be spaced out efficiently while their origin is still jittered.

    Ray oversampling of 1 can give more sample rasterization overhead while ray oversampling set high can mean longer render times per pass. As with all parameters it is about finding a good balance.
     
  6. labCosium

    labCosium

    Joined:
    Jun 17, 2014
    Posts:
    11
    I'm continuing tests on simple scene.
    I have two kings of artifacts :
    - something like a moiré on ground and up-left part of sphere
    - I can't remove seams on sphere which is a simple Unity Sphere.

    I have test in this case one 512x512 lightmap for ground + cylinder + cube and another 512x512 lightmap for the sphere to let a lot of texels, trying to remove seams.

    As you can see, I'm following your recommandations using max total sample number, and stop when no more noise. In such configuration, I never succeed in removing seams on sphere , regardless lightmap resolution.

    Could you please help me ?

    artifacts.jpg
     
  7. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    The banding you are seeing is very likely to be somewhere between Unity and the display and not from the light map rendering. You can go back in this thread and see a response to a similar question. If you look at the map in another program or open the map view window by clicking on the map in the render settings panel you can inspect the map itself. If you zoom in or enlarge the map view window you should be able to see that any banding is independent of the pixels.

    These are seams that come from a pixel rendered from the camera using multiple pixels on the map to filter it. The unity sphere actually exaggerates this since the way the UVs are layered out there are lots of seams while the surface is smoothed. You may be able to change the filtering settings in the map and there are improvements that I plan to do in this area, though I will say that pragmatically these are very unlikely to be visible in a real scene since they won't show at a distance and will be covered by the environment light, real time light, and textures.
     
  8. labCosium

    labCosium

    Joined:
    Jun 17, 2014
    Posts:
    11
    Another question regarding unwrapped uv results, can we use external tools like QUVeditor e.g. to post-edit result of your unwrap algorithms or is it impossible due to proprietary uv representation ?

    An a pure curiosity question : As, if I understand well, unwrap UV implies 3 uv per triangle, so very often multiple uv coordinates for the vertex, how do you compute vertex color at the end ?

    Oh and sorry, one last question : do you think interesting to include possibility of per vertex baking from your results ? Could be very interesting in many case.

    Thanks
     
  9. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    Right now I am working full time on a mac port, then I plan to work on new light types. If you have a scenario you are working with right now I can help you get the results you need using area or point lights. You can also reach me at the support at shinespark io email address.
     
  10. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    The auto uv tools only use unity's built in scale and offset parameters to place an object's UVs within a texture, it doesn't affect the UVs of the geometry. You can edit those parameters at any time, but you will need to re-render.

    It might make more sense to think about the rendering in terms of points inside a triangle. UVs coordinates are interpolated from the vertices, and that UV point is then used to look up pixels in the texture map.

    Vertex baking would be an interesting feature and is certainly possible, though this is low on my list of priorities at the moment, since (as far as I know) it would not offer many benefits over lightmaps to most people.
     
  11. labCosium

    labCosium

    Joined:
    Jun 17, 2014
    Posts:
    11
    Really good news for fine tuning !

    Sorry my question was not clear. It's about the seams in geometry as I posted. Do you agree that this seam is due to the fact that for on vertex on the mesh, this vertex has multiple uv coordinates because on a seam, and so just near to that vertex on one triangle, the color is interpolated from one texel from one uv, and just near to the same vertex, but this time on an other triangle, the uv is different so texel color is different. Isn't it ?
    What I do not understand is that even uv are not pointing same position on texture, the color should be the same as they rely to same 3d position on the mesh so identical for your lightmapper. Well sorry for such a fondamental discussion but I would like if possible to understand this classical seam issue. In most tools it is due to a lack of padding, but I noticed your padding is always clean so I really do not understand why final color is not the same when going in opposite directions from same vertex (in uv space I mean)... is it only due to interpolation algorithm that give not same color in opposite direction as other vertices in triangle A has not same color as other vertices in triangle B?
    If so, what are the ways to avoid such color discontinuities ? Working on geometry ? on UVs ?
    This question is of course not linked to LIAB but open to every baking masters ;)

    You're absolutly right, this is something quite exotic. Just asked it because we deal in one of our app with very detailed CAD geometry, on iPad so the iPad memory is quite full and in this case the per vertex option should be useful for memory saving. But never mind, you cannot do everything at the same time :)

    Thanks again for your forum activity !
     
  12. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    I think the missing piece may be filtering. Filtering basically takes multiple pixels from a texture lookup instead of just one pixel from the texture for every pixel in the image. Because of this every pixel in the final image maps to an area on the texture and not just a single point. There is always technically be a discontinuity when two adjacent piece of geometry meet and are mapped to different parts of a texture. There is more that I would like to do to hide those seams, but once textures and environment lighting are applied the chance you be able to see them even if looking for them is very slim.

    I would think that if the geometry is heavy vertex based lightmapping might actually take up more memory. With textures you can control the resolution and so can have soft lightmaps that are very small, or detailed lightmaps that are large. If the information is on the vertices you would not have a way to change the extra memory usage or detail in the lighting.
     
  13. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    Hi again,

    im getting this error, im unable to bake... using version 1.8.2

    EDIT: updated to 1.8.3, having same errors +unity5.5.1

    my render settings:
    Samples: 0.25
    Total Samples: 16
    Bounce: 1
    Ray Oversample: 16
    Bias: 4
    Resolution: 256

    Code (csharp):
    1.  
    2. Lighting In A Bottle Render Exception: System.EntryPointNotFoundException: LIAB_SetRayOversample
    3.   at (wrapper managed-to-native) liab.lib:LIAB_SetRayOversample (int)
    4.   at liab.Render.RenderLightmaps (liab.rndrsettings rs) [0x000e9] in D:\UnityProjFolder\SairentoVr v2\Assets\shinespark\LightingInABottle\Editor\Plugins\Render.cs:892
    5.   at liab.liabmain.<OnGUI>m__0 () [0x00006] in D:\UnityProjFolder\SairentoVr v2\Assets\shinespark\LightingInABottle\Editor\Plugins\liabmain.cs:1694
    6.   at liab.liabmain+RndrGui.LiabRenderGUI (liab.rndrsettings rs, liab.ButtonAction onPressRender, liab.ButtonAction onPressWrite) [0x0051e] in D:\UnityProjFolder\SairentoVr v2\Assets\shinespark\LightingInABottle\Editor\Plugins\liabmain.cs:1171
    7. UnityEngine.Debug:LogError(Object)
    8. liab.RndrGui:LiabRenderGUI(rndrsettings, ButtonAction, ButtonAction) (at Assets/shinespark/LightingInABottle/Editor/Plugins/liabmain.cs:1251)
    9. liab.RndrGui:LiabGUI(rndrsettings, ButtonAction, ButtonAction) (at Assets/shinespark/LightingInABottle/Editor/Plugins/liabmain.cs:1263)
    10. liab.liabmain:OnGUI() (at Assets/shinespark/LightingInABottle/Editor/Plugins/liabmain.cs:1694)
    11. UnityEditor.DockArea:OnGUI()
    12.  
    13.  
     
    Last edited: Mar 31, 2017
  14. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    Hi OP3NGL, at a glance this looks to me like there is a function that can't be accessed in the .dll by the C# scripts. My guess is that there is or was some sort of permission problem with the .dll - either it can't be opened by Unity or wasn't overwritten with a new version when upgrading (or something along those lines). What happens if you reinstall the plugin?

    If you still have problems you can send a scene to the support email address and I can take a look at it.
     
  15. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    i deleted the old plugin & reinstall it, however the the dll wont overwrite..
     
  16. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    Try updating from a blank scene file. The render window will load the .dll, which will mean that it is in use and can't be overwritten. If that doesn't work then you can always close Unity and move the assets/shinespark directory somewhere else, then click install from the store again.

    Windows won't let you delete or overwrite a file that is currently open and being used. You just need to make sure that the .dll is not in use to get a new .dll. You could also start a new project and install from there.

    If you still have problems, email me at support at shinespark io and we can look at it more in depth.
     
  17. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    Woo! it works now.... My team decided to upgrade to unity 5.6, how will the plugin fare with the new unity?
     
  18. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    Hey, What does these errors meant?

    Code (csharp):
    1.  
    2. System.NullReferenceException: Object reference not set to an instance of an object
    3.   at liab.Util.MakeTexPathReadable (System.String pth) [0x00026] in D:\UnityProjFolder\SairentoVr v2\Assets\shinespark\LightingInABottle\Editor\Plugins\Util.cs:101
    4.   at liab.Render.GetRenderGameMeshs (liab.rndrsettings rs, System.Collections.Generic.List`1 gameObjs) [0x0021f] in D:\UnityProjFolder\SairentoVr v2\Assets\shinespark\LightingInABottle\Editor\Plugins\Render.cs:104  : Object reference not set to an instance of an object
    5. UnityEngine.Debug:LogError(Object)
    6. liab.Render:GetRenderGameMeshs(rndrsettings, List`1) (at Assets/shinespark/LightingInABottle/Editor/Plugins/Render.cs:109)
    7. liab.Render:RenderLightmaps(rndrsettings) (at Assets/shinespark/LightingInABottle/Editor/Plugins/Render.cs:876)
    8. liab.liabmain:<OnGUI>m__0() (at Assets/shinespark/LightingInABottle/Editor/Plugins/liabmain.cs:1694)
    9. liab.RndrGui:LiabRenderGUI(rndrsettings, ButtonAction, ButtonAction) (at Assets/shinespark/LightingInABottle/Editor/Plugins/liabmain.cs:1171)
    10. liab.RndrGui:LiabGUI(rndrsettings, ButtonAction, ButtonAction) (at Assets/shinespark/LightingInABottle/Editor/Plugins/liabmain.cs:1263)
    11. liab.liabmain:OnGUI() (at Assets/shinespark/LightingInABottle/Editor/Plugins/liabmain.cs:1694)
    12. UnityEditor.DockArea:OnGUI()
    13.  
    Code (csharp):
    1.  
    2. Lighting In A Bottle Render Exception: System.InvalidOperationException: Comparison threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object
    3.   at liab.LightmapLoading.<CreateSearchPaths>m__1 (System.String a, System.String b) [0x00003] in D:\UnityProjFolder\SairentoVr v2\Assets\shinespark\LightingInABottle\Scripts\LightmapLoading.cs:371
    4.   at System.Array.qsort[String] (System.String[] array, Int32 low0, Int32 high0, System.Comparison`1 comparison) [0x00049] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Array.cs:1775
    5.   at System.Array.Sort[String] (System.String[] array, Int32 length, System.Comparison`1 comparison) [0x00028] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Array.cs:1700
    6.   --- End of inner exception stack trace ---
    7.   at System.Array.Sort[String] (System.String[] array, Int32 length, System.Comparison`1 comparison) [0x00037] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Array.cs:1703
    8.   at System.Array.Sort[String] (System.String[] array, System.Comparison`1 comparison) [0x00011] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/Array.cs:1686
    9.   at liab.LightmapLoading.CreateSearchPaths (liab.LightingInABottleId[] lids) [0x00113] in D:\UnityProjFolder\SairentoVr v2\Assets\shinespark\LightingInABottle\Scripts\LightmapLoading.cs:371
    10.   at liab.LightmapLoading.CreateLightmaps (System.Collections.Generic.Dictionary`2& remapTable, System.Collections.Generic.HashSet`1 forceNew) [0x00024] in D:\UnityProjFolder\SairentoVr v2\Assets\shinespark\LightingInABottle\Scripts\LightmapLoading.cs:532
    11.   at liab.Util.CreateAndRemapLightmaps (liab.rndrsettings& rs, System.Collections.Generic.HashSet`1 forceNew) [0x00004] in D:\UnityProjFolder\SairentoVr v2\Assets\shinespark\LightingInABottle\Editor\Plugins\Util.cs:664
    12.   at liab.Render.MakeTxAry (liab.rndrsettings rs, UnityEngine.Texture2D[]& txs) [0x000a3] in D:\UnityProjFolder\SairentoVr v2\Assets\shinespark\LightingInABottle\Editor\Plugins\Render.cs:831
    13.   at liab.Render.RenderLightmaps (liab.rndrsettings rs) [0x00054] in D:\UnityProjFolder\SairentoVr v2\Assets\shinespark\LightingInABottle\Editor\Plugins\Render.cs:881
    14.   at liab.liabmain.<OnGUI>m__0 () [0x00006] in D:\UnityProjFolder\SairentoVr v2\Assets\shinespark\LightingInABottle\Editor\Plugins\liabmain.cs:1694
    15.   at liab.liabmain+RndrGui.LiabRenderGUI (liab.rndrsettings rs, liab.ButtonAction onPressRender, liab.ButtonAction onPressWrite) [0x0051e] in D:\UnityProjFolder\SairentoVr v2\Assets\shinespark\LightingInABottle\Editor\Plugins\liabmain.cs:1171
    16. UnityEngine.Debug:LogError(Object)
    17. liab.RndrGui:LiabRenderGUI(rndrsettings, ButtonAction, ButtonAction) (at Assets/shinespark/LightingInABottle/Editor/Plugins/liabmain.cs:1251)
    18. liab.RndrGui:LiabGUI(rndrsettings, ButtonAction, ButtonAction) (at Assets/shinespark/LightingInABottle/Editor/Plugins/liabmain.cs:1263)
    19. liab.liabmain:OnGUI() (at Assets/shinespark/LightingInABottle/Editor/Plugins/liabmain.cs:1694)
    20. UnityEditor.DockArea:OnGUI()
    21.  
     
  19. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    is there a script to delete all the lighting in a bottle script in the obj? Capture1.PNG Capture2.PNG
     
  20. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    If you are using unity 5.6 I would try it with 5.5 and see if you still get the error since I haven't tested with 5.6 yet. Also check for any permissions problems if you can.

    If you still need help, email me at support at shinespark io so I can look at your scene and have a more fluid dialog.
     
  21. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    645
    Hey,

    I'm finding the "save/stop" button does not work for me the majority of the time. Instead of resetting the button back to render, it stops the baking but keeps the button as "save/stop" and I can't continue a bake (or start anew) without restarting Unity. Is this a known issue?

    Okay, as with my last bake ... it didn't even stop it. The bar kept going even after clicking the button ... as it stands, this is unuseable if I have to keep restarting Unity.

    I'm on an Alienware PC, Windows 10, geforce 1080, and a decent CPU (dont remember offhand).
     
  22. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    645
    Maybe next week I can toss a scene your way. I've spent half a day at work trying to get this to work properly for one small scene with one light, and its not working out. I would love to use this (anything that makes light-baking easier and prettier is plus), but so far I'm not finding it easier or better ... I keep having to reboot Unity and I'm unclear on what settings to use to wind up with a better lighting then enlighten is giving me.

    Besides for the bug, its probably just my lack of understanding how to use this properly ... it took me hours before I even stumbled upon the post here that mentions point light radius is the surface of the light ... there's no mention of that in the readme.

    Am I supposed to be reading something else that I'm not aware of?

    PS: I'm using the release build of 5.6.
     
  23. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    The way it works under the hood is that it will finish the current pass of samples, rasterize them into the image, then see that the render should stop and the images should be saved.

    If you have very high samples per pass, lots of high resolution renders or both, you could create a situation like this. Does this happen on the demo scene with the default settings?

    I just checked and it looks like you are right. This is an oversight on my part. I think most people have started with the demo scene.

    If you still have trouble you can send me a scene and I will take a look at it. Initially it looks to me like it should work in 5.6 although I've just started testing it today.
     
  24. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    645
    That's the thing, I don't know any of that before hand, including what "very high samples per pass" or "lots of high resolution renders" means. All I saw was a "save/stop" button and some sliders, and documentation which did not make note of any potential issues. I simply don't have another half day to waste on guessing stuff based on my lack of information. Definitely update the documentation for future users with anything new user's actually need ... not everyone will notice that the point light is smaller than normal. I did open the demo ... I just did not expect that to change so my mind glanced over it.

    With that said, I would *love* to find a way to use this. We're investigating tech for google daydream and this seems right up our alley ... if we don't have to spend a week of man hours just learning how to use it for better results than enlighten. Already, the cost of my messing around for hours because of the sphere radius issue cost more than the product did to my boss (heh).

    I'll toss it at you on Monday when I'm back. I absolutely want to love this and use this here, and if we can, I'll gladly spread the word to the other companies sharing our space ... but there's only so many hours I can have the owner of the company walking buy as I'm staring at the same screen trying to get one single light bake to look good :p. I have no doubt that this can make gorgeous lightmaps ... my only question is how long will it take to figure it out before I can at least get enlighten quality without using values that are out of wack.
     
    buttmatrix likes this.
  25. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    645
    Btw, sorry to sound upset. I just really want this to work out and didn't expect to hit some of these issues ... was hoping for something very plug-and-play.

    And no, the issue does not happen with the demo scenes. Its definitely something that I am doing.

    [Edit: I think what would have made this much easier for me would have been a few demo scenes with rooms of different sizes lit with *good* lighting (ie: the living room scene you posted from a user) and a note of how long that took to bake, that way I could have seen the final results that different settings give and have had some educated idea of where to start.

    [#Edit 2: Also, it keeps recreating the shinespark/lightingingabottle directory ... I deleted the directory since I'm going back to enlighten for now for our prototypes (I already had something nice up and running) ... I'll give this a shot again when I have more time. Any idea what's recreating this?]
     
    Last edited: Apr 7, 2017
  26. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    It has been plug-and-play for most people when starting with the default settings. The render setting sliders are all labeled, but if you want to post a screen shot of them I can take a look. I would try first though, to just use one map, 128x128 resolution and turn the samples per pass (the first slider at the top) all the way down.
     
  27. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    The comments from @DGordon smack of my suggestions for rendering presets which are common across the industry. At least, I think it would help adoption rates as people become accustomed to your software, especially if they are not familiar with other rendering plug-ins.

    That being said, I appreciate it is difficult (or impossible) to preempt every conceivable scenario, but providing some baseline is usually helpful.
     
  28. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    [#Edit 2: Also, it keeps recreating the shinespark/lightingingabottle directory ... I deleted the directory since I'm going back to enlighten for now for our prototypes (I already had something nice up and running) ... I'll give this a shot again when I have more time. Any idea what's recreating this?][/QUOTE]

    Everything from me that executes is in that directory, so if you delete it when Unity is not running there shouldn't be any way my stuff can run.

    That being said I think if you try one small map with the samples per pass taken down all the way you should be able to see it work (you can slide the samples per pass up even while the render is running, so starting low is no problem).
     
  29. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    The problem there is that sweet spot for working renders or final renders will depend on a combination of the scene and the computer it is being run on (mostly the number of cores). I think it is a good idea though I will probably try to make some videos and tutorials first now that the mac port is done and submitted to the store.
     
    buttmatrix likes this.
  30. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    there need a button to remove the script from lightmap static....
     
  31. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    Hi OP3NGL,

    You can always turn lightmap static off at the object level. In the render gui, on every map, there is a minus button ' - ' that lets you take out all the selected objects from that map:

     
  32. Almakos

    Almakos

    Joined:
    Dec 13, 2013
    Posts:
    179
    Hey @LightingInABottle
    Your asset looks very interesting.
    Seems there is still no Mac OS version?
    Any estimates on that? As we are primarily on Macs

    Also what about specularity and directionality? Does your asset bake to those maps?
    Unity 5.6 doesn't support directional-specular light maps any more and that completely ruined light maps for us. so we are looking for replacement

    Thank you
     
  33. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    Hey Almakos, you are in luck. Version 1.9 just made it to the store, which includes the new Mac version. If you check out the package contents.
     
    Last edited: Apr 12, 2017
  34. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    Shodan0101 likes this.
  35. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    Thank you buttmatrix, that's nice to hear, I've put a lot of work into it.
     
    Shodan0101 likes this.
  36. Almakos

    Almakos

    Joined:
    Dec 13, 2013
    Posts:
    179
    Regarding Mac OSX demo those are great news @LightingInABottle

    as for my other question....
    Usually Unity bakes 2 maps at a time:
    Light and Direction
    Before there was also specularity included (which is now deprecated)
    So what kind of maps does "Raytrace Lightmaps" outputs?
    because I don't see any mention about that....
    Thank you
     
  37. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115

    Sorry about that, part of my reply was lost (probably from re-logging in). Raytrace Lightmaps bakes diffuse light only right now, so it outputs one color map. Direction maps may be something I investigate in the future.
     
    Shodan0101 likes this.
  38. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    Catching this error when importing Shinespark into a fresh project in 5.6.0f3

    Code (CSharp):
    1. System.DllNotFoundException: LightingInABottle
    2.   at (wrapper managed-to-native) liab.lib:LIAB_Init ()
    3.   at liab.liabmain..cctor () [0x00046] in D:\Documents\Unity 5\test\Assets\shinespark\LightingInABottle\Editor\Plugins\liabmain.cs:1478
    4. UnityEngine.Debug:LogError(Object)
    5. liab.liabmain:.cctor() (at Assets/shinespark/LightingInABottle/Editor/Plugins/liabmain.cs:1478)
    6. UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()
    7.  
    Demo scene crashes on launch
     
  39. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    Just restart Unity if you haven't already. For someone reason Unity sources the scripts before it makes the .dll available to them.

    When you say crash, did you just get the exception you posted here or did Unity actually crash and close?
     
  40. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    Yep, that fixed it. Currently running in v2017.1
     
  41. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    I'm not sure if this is a sore subject here, but how does LIAB differ from the new Progressive Lightmapper, which is using Monte Carlo pathtracing - apart from the Auto UV atlassing function(?)
     
    Last edited: Apr 17, 2017
  42. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    From what I've seen, the only problem it solves is that you are no longer completely in the dark to what your lighting will look like. That's great, but lots of other problems remain like light leaking, strange quantization artifacts, difficult to tweak quality settings (since you still have to wait to see if your samples were set high enough, and if not, then you have to set them higher and redo the render), as well as the lack of subdivision which leaves faceting artifacts.

    Not only that, but it still doesn't make use of map space very well, so the same problems with a huge map and tiny UV area for the geometry remains.

    Then there is the workflow. I find it awkward to see what is actually rendering to the maps with enlighten and that hasn't changed. Too much is left tucked away to be handled automatically and poorly, like which objects go into what maps. I'm not sure if there are ways to have objects that are not lightmapped, but are part of the render. I'm also not sure if there is a way to access the maps directly, where with Raytrace Lightmaps they are .exr files that you can open and edit at any point. You can always try it for yourself to compare, it is in 5.6. I think once you do you will appreciate the workflow and quality of Raytrace Lightmaps since the new lightmapper only helps part of the problems have plagued enlighten.
     
  43. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    I'm experiencing some speed issues with LIAB. After assigning lightmaps (11-12), it is generating ~150 .exr textures, resulting in long precompute times before it begins the actual rendering.

    i7 4.2GHz (8 threads) / gtx 1070
     
  44. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    It's writing 150 .exr files at the beginning? How many do you have in your scene? Are you sure it happens after adding 11-12 lightmaps? That seems likely to be coincidental to me.

    You can always email me an example of your scene at | support at shinespark io |
     
  45. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    @LightingInABottle

    if i have a dynamic level like im using dungen to create levels on the fly, how to generate lightmaps? also if one of my prefab is set non-static will i still be able to bake?
     
  46. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    I don't know anything about that asset, but you will likely need to bake lightmaps for the individual pieces. For them to fit together, you may need to bake them with softer, less directional lighting.

    Geometry needs to be set to lightmap static to bake. You can always bake the maps and turn lightmap static off after (I think the run time loader doesn't pay attention to objects that are static and just uses the Lighting In A Bottle Id).[/user]
     
  47. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    Great! thanks i was kinda worried at 1st
     
  48. ColtonKadlecik_VitruviusVR

    ColtonKadlecik_VitruviusVR

    Joined:
    Nov 27, 2015
    Posts:
    191
    Hey @LightingInABottle,
    Some of these results look insane compare to Unity default lighting, great job! I just have a few questions before purchasing to make sure it will work for my project. We are creating a VR game with fairly dense indoor and outdoor scenes (nothing huge, max size can fit in a 100x100x100 cube).

    Here are some very alpha screen shots:
    upload_2017-4-26_11-45-22.png

    upload_2017-4-26_11-46-38.png

    Here comes the questions:
    1. Will the light baking work with many (500-2000) objects (previously you said it would, just making sure)?

    2. Can we have static and non-static items in the scene and still get all necessary lighting/shadows (most of the small items are intractable and will require real-time shadows and lighting while be interacted with)

    3. These 2 images are from the same scene, do you think we can keep it in the same scene and get the feeling of going from inside to outside using different area lights or will the lights from the inside affect the outside or vice versa?

    4. Will this work with malformed/bad UV maps? Can we use Unity's generate UV map import settings to solve this issue? (most/all of our UV maps have not been optimized and several are overlapping)

    Looking forward to some answers!
    Cheers,
    Colton
     
  49. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    I have a small issue that has been holding me up on my project. I have a pretty dense scene and it works fine for about 90% of it, but what keeps happening is a random crash will occur while baking and when I restart Unity, that map is no longer in the indices and all maps are now shifted down one for the assigned meshes. To clarify, the meshes are no longer assigned to the map, so that mapping is gone, but the maps themselves are not kept with the index. There needs to be some kind of a GUID instead of tying the map to an index because of this. That would also allow us to rearrange the list of maps as we need, and possibly rename them to be a bit more verbose in the list. I have lost a good 40-50 maps now and it is starting to get annoying. At the very least being able to put a map back into a certain place would get it working well enough to not set us back 10 hours every time it does this.
     
  50. CaptainMurphy

    CaptainMurphy

    Joined:
    Jul 15, 2014
    Posts:
    746
    Feature request:
    Stop automatically removing maps that don't have any meshes assigned. Make it a requirement to select the map and hit a 'remove' button to stop it from auto culling that map collection. So far I have had it shift my maps 'down' by moving the assigned meshes to the (now empty) map and every map from there on down is now incorrect. I have 60 maps and this just happened on map number 20. Now I have to re-bake or re-assign 40 maps all over again. See my above comment about assigning the items by a GUID rather than index to stop this from happening.