Search Unity

[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


    Raytrace Lightmaps
    (formerly Lighting In A Bottle) is an editor tool for creating lightmaps. It focuses on quality, interactivity and workflow. It has native components and so is window 64 bit initially. If there is interest in a mac version or the tool in general, a version for OS X will be my top priority. This tool has been in development for quite a while and leverages significant experience with concurrency, UI and physically based rendering for film.

    Asset Store Link


    Quality:




    Interactivity


    Not only is the quality significantly better than the unity default lightmapping, the workflow and interactivity are vastly more fluid and elegant:

    -Maps render and update live directly on 3D objects and in a window of the map, complete with an overlay of the UVs for the selected objects.

    -UV Atlases can be created with one button within the given resolution (no more tweaking enlighten texels per unit to hopefully get the right size image or to get UVs to fill the map efficiently).

    -Geometry can also be subdivided at lightmap render time so that the shading is identical to a much higher resolution (smoother) object.


    There are also many tools to work with larger scenes such as the ability to select any object larger or smaller, the ability to copy UV scale offsets from one object to another, the ability to select objects that don't have a lightmap and much more.

    I have probably still left something out so let me know if you have any questions!
     
    Last edited: Feb 18, 2017
    KRGraphics and Ony like this.
  2. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    Here is an illustration of subdividing a sphere only at lightmap generation time. This gives the shading of the smooth sphere while only the low res sphere + lightmap is needed at run time. Doing this can keep the game lightweight with fantastic quality.

     
    Ony likes this.
  3. Ony

    Ony

    Joined:
    Apr 26, 2009
    Posts:
    1,977
    Awesome. Definitely going to keep an eye on this one moving forward with our new games.
     
  4. Pawige

    Pawige

    Joined:
    Nov 26, 2012
    Posts:
    40
    Looks awesome! Does this work with lights other than area lights?
     
  5. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    605
    I earmarked this asset a while back. Good to see it's still getting attention!

    I know you've already said this is an editor tool right now. Is there a possibility of being able to bake lightmaps at runtime? That would be a huge boon for generating lightmaps for procedurally-generated scene geometry. Enlighten obviously does not support runtime lightmap baking either.
     
  6. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    649
    Do you have any plan to make a Linux version as well, when you'll release an OSX build?

    I was just thinking about baking in Blender as I was found that GI in Unity never really work for me. So I'm much willing to try this product if it will be available on Linux in future.

    Anyway, it looks amazing and thanks for making such a nice work!
     
  7. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    awesome!

    mac osx will be welcome!
     
  8. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    Thanks!

    The version on the store (at the time of this post) only uses area lights. That being said point lights (actually sphere lights since all physical lights need surface area) are something I have already had working before and are at the top of the list. I used the range of the point light as the size of the sphere, so the wire sphere guide around the light in Unity shows you where the surface is. This seemed intuitive to me, though keep in mind that it means the size ends up small relative to the scene instead of large enough to contain parts of the scene like a typical real time point light.

    Environment lights I think are also useful although I don't want to speak to when they would make it in without taking a good look at everything I need to do to make them work (importance sampling, possibly texture mapped lighting, etc).

    Distant lights I personally feel are the least useful since the same effect (or better) can often be achieved with a bright but small area light pulled away from the scene. They are also a bit of an unknown for me compared to the other two (for physically based lighting a distant light would mean a solid angle of brightness on the inside of an infinite sphere). If there is demand I will, of course, figure it out.

    These are my experiences from a significant amount of lighting for film visual effects while physically based lighting was starting to be usable (about 8 years ago). We had all of these lights at our disposal but really only ended up using area lights with a dim environment light (infinite sphere) to fill in the rest since we were unable to use any bounce light.

    Let me know what you think, and I will let you know when point lights have been submitted to the asset store.
     
    theANMATOR2b likes this.
  9. Tapgames

    Tapgames

    Joined:
    Dec 1, 2009
    Posts:
    242
    Are you planning to support emitting light with emissive materials/textures?
     
    buttmatrix likes this.
  10. Tapgames

    Tapgames

    Joined:
    Dec 1, 2009
    Posts:
    242
    I bought your asset and have some play with it. Must say finally a cool baking plugin :)

    I have some questions.

    1. If i have baked a scene with your tool how do I make them work with reflection probes? Now when I add a reflection probe and hit bake probe the baking with your tool is gone.
    2. Every mesh has to have his own Index right? So lets say I have a couple of identical pillars next to each other they cannot share the same index right because they will get all the same baked light map from it. They must be different to get a separate light map for each pillar right?
    3. I made a scene and added 80 meshes to it each with there own index to test the render out and I found that it is rendering a max of 46. This is what I saw in the render settings. Every index after 46 was completely white and not rendered. But I looks like it is saving a exr file for it. Maybe i'm doing something wrong :)
     
  11. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    I hadn't previously taken the idea seriously because I worry about the results not being useful in a game due to noise or time. So far though I've had a few people mention it to me which has been a fair amount of focus proportional to the feedback I've gotten. It is technically possible and in fact I'm fairly proud of the simplicity and elegance of the API interface to the .DLL / shared library. If people definitely want it and feel they are able to use it, I may be able to work with them to make it possible (which likely means more polished C# wrapper functions, documentation and possibly attention to licensing).

    Let me know the specifics with as much detail as possible as well as your impressions after using the tool and I can calibrate to how much work it might take.
     
    Doomlaser and chiapet1021 like this.
  12. chiapet1021

    chiapet1021

    Joined:
    Jun 5, 2013
    Posts:
    605
    Thanks, @LightingInABottle ! I must admit I'm not super technical (I dropped out of computer science as my university major after two years :p ), so I'm not sure I'll be able to provide all the detail you need. My basic use case, in the hypothetical world where Raytrace lightmaps could be used at runtime, would roughly be like this:

    I'd like to use something like procedural dungeon/scene generation tool to instantiate scene mesh geometry and object placement at runtime. Lights that represent the sun and smaller lights, such as lamps, would be created as part of this step.

    The player would explore and interact with the scene after it is loaded. The scene geometry and lights would be static, but the player's avatar and other dynamic objects (non-player people or animals, for example) would move through the scene. Additional dynamic lights may be created as well, say a character holding a torch, for example.

    I don't have hard requirements on how "impressive" the lightmap results would need to be in this situation. I'm more interested in seeing what is feasible to bake for quality vs quantity/size of the lightmap in the several seconds a player would expect to wait while a scene is generating/loading. Certainly, if lightmaps can be generated in pieces in the background and prioritized by proximity to the main camera, that would be even more fantastic.

    Hope that makes sense and isn't too "pie in the sky."
     
  13. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    Thanks!

    Yes, I would love to make a Linux version. I've used Linux personally and professionally, and avoid creating anything that is not cross platform. That being said I plan on prioritizing it according to demand, possibly with quite a bit of fudge room since it does actually bother me to have programs only exist on one platform.
     
  14. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    649
    I understand that you (and probably everyone sells any software) should prioritize their platform support plans according to demand.

    I just wondered the planned OSX version would mean anything to the possibility for Linux support as well, as both platforms often share the similar features and limitations.

    Anyway, I think it'd be safe to assume from your post that you'd probably release a Linux version as well, if it's really something very easily achieved by making an OSX version, so I'm glad that I have something to hope for, at least. Thanks :)
     
  15. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    Now that you have reminded me of that, I will look in to what it will take. It may not be difficult to implement, though arbitrary geometry can wind up being very noisy. Even so I agree that it would be nice to have the option available and could lead to very cool environment lighting.
     
    buttmatrix and Tapgames like this.
  16. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115

    1. When you press bake with Unity, it wipes out all the lightmap data in the GUI and I'm actually not sure if there is a way to make enlighten isolate light probe generation (I'm not an expert on enlighten by any stretch). Your maps are safe on disk in their high quality form and can be reloaded. Right now this might take restarting Unity. I am going to look into this and if it is needed I will make a 'Reload Maps' button. Since this is a UI wart I consider it a high priority.

    2. Every mesh can have it's own index although this would be atypical usage. For your identical pillars you have two options.

    -The first is to give them the same index, then press one of the pack UVs buttons to automatically lay out the scale offsets of each mesh. You can give them the same index quickly by selecting them and pressing the '+' button on the map that you want them to use.

    -The second option is to also give them all the same index, but this time use the 'Propogate Scales, Offsets, and Indices From First Selected' button. This will let you give them all the same lighting by making their lightmap the same, and their scales and offsets identical as well. If you render like this will them all on, the light map will be an average of all the pillars. If you set all but one pillar to No Render, you will be able to trace from just one pillar while they all receive the same lighting. This can give you fast baking and high resolution lighting due to re-use.

    3. I don't think you are doing anything wrong (though that many maps may not be what you want). This sounds like a bug that I will need to reproduce and fix. There is a slim chance that I won't be able to reproduce the bug in which case I'll try to get in contact with you, but I haven't done a test with this many maps yet, so I'm guessing it is just a matter of trying. I will let you know what I find, hopefully it goes without saying that bugs are a higher priority than features.

    Let me know if you this is clear or if you have any more questions in general. Getting feedback will let me refine the tool considerably. I'm thinking now that laying out the UV atlases is important enough to put a button prominently displayed on each map.

    Thanks!
     
    buttmatrix likes this.
  17. xCyborg

    xCyborg

    Joined:
    Oct 4, 2010
    Posts:
    633
    That's how lightmapping should be, complete with live update and UV overlay on a per-object basis.
    Great job!
     
  18. NERVAGON

    NERVAGON

    Joined:
    Oct 27, 2009
    Posts:
    73
    Just dropped in to say that this lightmapper delivers higher quality than even Unity's new progressive baker, and that is impressive. I know I will be using this addon instead of Unity's new internal. Props to this dev for delivering higher quality and a workflow not possible with Unity's internal option.
     
    hopeful likes this.
  19. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    1.6 is now released and on the store. It adds sphere lights (unity point lights) and an easy 'Auto UV Atlas' button along with interface refinements and bug fixes.

     
  20. KarolisO

    KarolisO

    Joined:
    Feb 2, 2014
    Posts:
    30
    It doesn't seem to pad/dilute the lightmaps nearly enough. I fear this might lead to dark lines when looking at lightmaps from far away. Do you plan on addressing this issue?
     
  21. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    Hi KarolisO

    First, I plan on addressing any and every issue.

    That being said it sounds like this is an issue in theory at the moment (though it does sound plausible that someone could run into this).

    I haven't seen any problems so far but I will keep my eyes open. Keep in mind that the geometry in the above image is not perfectly on the border of the islands in the image for this very reason. The samples have a slightly wide filter kernel which expands the filled pixels past the geometry borders. If the geometry was spread out but did not have extra pixels around the borders, with large filters/low mip-map levels you could still have the filtered texture lookup bleed into black, so simply spacing geometry out is not a solution, the pixels must be filled past the geometry border with something plausible as well.

    Here is an example of the UV padding from the UV visualization window you can see from clicking on the map:



    I think a padding setting is a good idea. If I see an example of padding being too narrow or am able to create a situation where I can see artifacts it will be a high priority and I will communicate my progress.

    Thanks!
     
    buttmatrix likes this.
  22. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    i have a few questions, every time i baked the scene, & reload the scene, the lightmaps no longer in the scene i have to either reload lightmaps or re render to have it in the scene, how do i make the lightmaps stay there?

    & when i baked the lightmaps or the reflection probes & vice Versa, either maps disappeared & i have to restart all over again

    your system also add my glass shader/mesh into baking, hence i need to manually removed that mesh from baking into it

    also theres a weird dark circle that was being baked? it looks like the reflection probe is being baked into the lightmap Capture.PNG
     
    Last edited: Feb 8, 2017
  23. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    Is there a limit to how many objects this lightmapper can lightmap. By that I mean just sheer number of models in a scene like says 1000's or what about lightmapping a small jungle or forest full of FBX models with alpha for the leaves. Does this work with unitys Mixed mode so realtime shadows can work with baked shadows OR is this strictly baked lightmapping only. I work with really big complicated outdoor nature scenes that I have been baking with enlighten and unitys terrain system. It works fairly decent for the most part but does have its problems that I have to tweak and fix all the time. Any info on this would be great.
     
  24. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115

    The lightmaps should stay put and load up when you load up the scene. If there is a scenario where they do not, that is a bug that I will fix. Unity has quite a few quirks when it comes to setting up lightmaps and all of the ones I have found I have worked around, however there may still be edge cases. Your lightmaps are still there on disk and versioned in your Resources folder so you should never have to re-render to get your lightmaps reapplied.

    That being said, pressing Unity's build button clears the lightmaps from unity's UI (not from disk). You can bake only reflection probes by using the down arrow on the right side of the 'Build' button, though the first time this is done unity will still clear the lightmap list because it switches the 'Lighting Data Asset'. The next version will have some refinements to this area as well. If you still have problems you can email the shinespark.io 'support' address and I'll work with you to fix any bugs and smooth out any workflow warts.

    For your glass mesh, if it is not marked as lightmap static, it will not be rendered. You also have the option to have rays hit the mesh but not have it be part of the light map (the 'No Render' flag). Transparency is not built in yet but it is actively being worked on.


    The dark circle I would guess is a shadowing object. The first thing to check is that there is not a point light with a large radius. Point lights use their range parameter as the radius for a sphere inside the renderer. While a radius that covers objects would be used for real time lighting, a small radius indicating the actual size of the light is what will work for physically based light mapping since the size of a light is an important part of its look.
     
    buttmatrix likes this.
  25. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    There is no limit that I'm aware of and in fact it was made to scale well and have elegant workflow for large scenes. The geometry for each map can be packed into a texture atlas with one button and each map can currently be 4k (this is just an interface based limitation that could be lifted). Others have mapped detailed rooms and large cities.

    Here is a simple example of dense geometry packed into an atlas for a single map. This is done with the 'Auto UV Atlas' button. One important workflow aspect is that you have control over the resolution for every map and what goes in to each map. Not only this, but you can render only the maps you are working on at any one time which lets you divide the lighting for a scene down into pieces that are manageable in both render time and complexity.




    It bakes lightmap color only and does not affect real time lights. Let me know if that is clear or if you have any more questions, thanks!
     
    Last edited: Feb 8, 2017
  26. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    This is a very impressive asset, but I have some questions about the quality. You mentioned in a previous comment that, based on your experience in the vFX industry, area lights are suitable for most lighting situations.

    However, if you look at the Courtyard image and the boy / dog statues, there seems to be some overexposure on the inside faces of the Courtyard columns, on the base of the stoop in the boy / dog scene, as well on the head of the boy. I assume this is related to the intensity / falloff parameters of the area lights; which themselves have strange distance constraints in Unity.

    To be sure, the quality of this asset *is* very high, and undoubtedly *much* higher than default Enlighten, but probably not on par with a photon mapping solution. Could you comment on these issues or possible quality improvements in the future?

    Courtyard.jpg BoyDog.jpg
     
  27. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    The light bouncing off a surface is expressed in floating point numbers and saved in an .exr file without clamping so there is no information lost in those areas. It isn't clear to me how this is a flaw, those scenes could easily be lit differently.

    Photon mapping is one of many techniques to solve the rendering equation, so any physically correct renderer is ultimately converging on the same solution. That being said this doesn't do caustic reflections yet, which would be a subtle detail in the vast majority of scenes.

    Have you tried it out and if so can you give me a specific example?
     
  28. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    I have not purchased this asset yet, and I apologize if my comments came across confrontational. What you've built here is really exceptional, but I would be interested to see how the ray tracing solution generalizes to other environments - you mentioned it has been used in very large environments, etc.
     
  29. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I just stumbled onto this while testing out the 5.6 beta, and I am VERY IMPRESSED already. I do a lot of VFX work and I need a lightmapper that is clean, simple, and fast to use. The one question I do have is, will this work on prefabs at runtime? I use the UFE asset and only with a script, am I able to retain my lightmaps during play. How will you be able to solve this?
     
  30. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    No sweat, I saw the compliments as well and I appreciate it. This will always be a work in progress, I just want to be clear about the line between issues/limitations with the renderer and learning more about rendering in general, because it can of course be a tricky subject.
     
  31. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    Thanks! I'm glad you like what you see. I can work with you to make sure, but it may not be a problem. The lightmap loading at run time is done with a loading script and is triggered by a component that contains a single 'int'. If assets are being loaded dynamically, they just need to set their lightmapIndex in their 'renderer' component. If you also need to swap lightmaps in and out, that may be trickier, but I can always share with you what I've learned.

    Also I should say it might need an update to work with 5.6, it looked to me like the names of lightmap variables have changed which would break any program that sets lightmaps.
     
    Last edited: Feb 10, 2017
    KRGraphics likes this.
  32. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    Version 1.7 is now live! It ads:

    - A 'Ray Oversampling' parameter to help with better convergence and processor usage
    - Automatic detection of cleared lightmaps (usually from baking light probes)
    - A gorgeous example from customer Adam Nerva

    Asset Store Link

     
    labCosium, buttmatrix and Shodan0101 like this.
  33. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    Had some questions. Does this work with any PBR shaders, but just for starters using unity standard shaders and reflection probes? Also how does it work with mobile for Android.

    I'm asking these things being its a seperate lightmapper not integrated with unitys current enlighten lightmapping solution. So guess question is how integrated is this lightmapper with unitys lights - Area, Directional, Spot and Point lights. Does it have a Mixed mode so to speak to where realtime shadows based off shadow distance go from baked to realtime. Just the way Beast in unity 4 used to work and was the perfect way to go for levels. In Beast it was called Dual lightmapping for this. I just want to know how far the system can go or will it always just be a PURE baked solution and never have any type of realtime shadows.
     
  34. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Ok this is impresive. I did not upgrade to unity 5 because they removed Beast and replaced with teh forever precomputing GI crap. Definetly will keep an eye on this asset. Bookmarked.
     
    JamesArndt likes this.
  35. buttmatrix

    buttmatrix

    Joined:
    Mar 23, 2015
    Posts:
    609
    I realize the post-processing is helping out, but man, the GI looks incredible. This is exactly the type of example I was interested in seeing.
     
    Last edited: Feb 11, 2017
  36. eastes

    eastes

    Joined:
    Sep 1, 2012
    Posts:
    59
    Oh my goodness. This is too good to be true. I'm ready to purchase. Just a quick question. I'm baking a large outdoor scene with a sun in a downtown city scene. Will this work with your plugin, using a gigantic area light?
     
  37. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    I'm also in the need for large scenes such 2x2KM city scapes. Can´t wait for the answer. This only works with area lights? May be you meant directional?
     
  38. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    This relies on GPU power or CPU power? I woud love it to run on GPU since I got a 1080. I remember some VRAY in max rendering semi realtime that relied on GPU hope this is similar, or can lead to similiar render/preview times. Also Microstation has a similar preview mode that renders pretty quick an initial preview and it progresively improves , I guess similar to this. If the render times on the video are real seems pretty quick!

    In regards to the preview region I mentioned before, may be it could compute only the region visible on the editor camera, this way would be no need to setup a region.

    I can provide an urban sceneraio for testing too.
     
    buttmatrix likes this.
  39. eastes

    eastes

    Joined:
    Sep 1, 2012
    Posts:
    59
    I meant area. It's in a previous comment and on asset store I think
     
  40. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115
    Hi Miguel

    Right now it bakes lighting and does not mix with real time lights.. The lights available at the moment are Area and Point Lights (which are treated as spheres). Once I integrate transparency I will most likely set my sights on a solution for directional and spot lights.
     
    TooManySugar likes this.
  41. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115

    I would imagine it would work very well. The scale of a model isn't much of an issue. The number of maps and the resolution of those maps is what will dictate both render times and sharpness of the maps. Typically outdoor scenes only need a few lights and may not benefit as much from bounces as an indoor scene, which can speed up rendering.

    I would recommend starting with a small, intense (very) warm light for the sun and a large blue area light behind it for the atmosphere scatter. Other large blue area lights for the fill should also work well. Even with 2 bounces I would expect some nice results since the key side will be warm, while the shadows will be cool. The large area light behind the 'sun' light should also create a shading falloff from warm to cool.
     
    buttmatrix and TooManySugar like this.
  42. David-Lindsay

    David-Lindsay

    Joined:
    May 20, 2009
    Posts:
    121
    Hi, I have purchased the plugin and I found that it simply is not working at all. Clicking the render button has no effect at all. The demo scene does not render or produce any lightmaps. I have sent a support email about this.

    Unity 5.4.3 / Win 64-bit / New Empty Project / Newest version of your plugin (downloaded today)

    Is it possible that there is an update or fix build that is not yet accepted by unity asset store, or some other version difference that I should know about?
     
    eastes likes this.
  43. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115

    Hi David, the first thing to do is to look and see if warnings are visible. My guess is that you just need to put a non-negative number in for the lightmap index in the LightingInABottleId component, or just select some geometry and push the '+' for a map to add it.

    Also check to see if you are on version 1.7 which is the latest. It was submitted with version 5.5. I will look in to how backwards compatible I can make new versions. Unity makes it a bit tricky with breaking API changes from one minor version to the next. It also may limit you (in the asset store) to only what was submitted with a version lower than yours.

    So in short, upgrade to 5.5 to get the latest if you can, and if not we will figure out another way to get you up and running. Sorry for the inconvenience!
     
  44. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    I would love to see in the future a feature similar available in unity 4.x with beast that is the emisive materials. These are pretty interesting as you can easily create neon light effects and similar, and the light color comes from teh difuse map. Ideal for japanese street alike.
     
    buttmatrix likes this.
  45. David-Lindsay

    David-Lindsay

    Joined:
    May 20, 2009
    Posts:
    121
    Yes, indeed after updating unity to 5.5.1, the asset store downloads shows a yellow "update" button on Raytrace lightmaps. So in Unity 5.4, it is not possible for unity store to provide a correct updated version
     
  46. David-Lindsay

    David-Lindsay

    Joined:
    May 20, 2009
    Posts:
    121
    Okay, it imported successfully and I tested in the demo scene, seems to work nicely.

    Next I decided to try a light bake in the game scene that I am working on.
    - I have baked and tested this scene in unity with enlighten before.
    - It is 5 kilometers end to end.
    - I scaled up the area light to 5000 x 5000 to cover everything.
    - I used the automatic button to "Add lightinginabottleID script to every LMstatic object"
    - I changed the Render Settings to extremely low, and use most threads.
    - Push render
    - The bake failed and unity suddenly terminated, force quit to desktop without warning.
    - If I reopen the project, I get stack overflow errors and the computer is frozen until I force quit unity.

    Luckily, the console is open and I can screenshot the error for you. The settings for Raytrace lightmaps is also open.

    Can you please have a look and tell me how to proceed. It would be nice to reopen this project without rolling back GIT to before raytrace solution was added (I'd lose a few hours work).

    Thanks and looking forward to your reply
     

    Attached Files:

    Last edited: Feb 14, 2017
  47. David-Lindsay

    David-Lindsay

    Joined:
    May 20, 2009
    Posts:
    121
    UPDATE:

    If I start a new project and import raytrace lightmaps into it, then open the lightinginabottle tool window, I get a different kind of error. But the computer is completely frozen, same as above situation, until I force quit unity.
     

    Attached Files:

  48. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115

    Hi David, I haven't seen this before (and many others are using it now) so I may need your scene (or a simplified version of it) to repeat the problem and figure out exactly what it is. You can send me a message at the support address and I can work with you there to either get a scene file or to narrow it down further.
     
  49. LightingInABottle

    LightingInABottle

    Joined:
    Nov 1, 2016
    Posts:
    115

    I think now that this is a problem with trying to automatically detect when Unity wipes out lightmaps while not taking into account the fact that there may be no lightmaps created yet. I am working on this now along with porting backwards to previous Unity versions. I will keep you updated and if you send me a support email I can get you a custom build if you can't wait for the the Unity store approved version.
     
  50. David-Lindsay

    David-Lindsay

    Joined:
    May 20, 2009
    Posts:
    121
    Hi,

    After a sleep and some more tests, I found that this only really happens when doing large scenes. A 5 kilometer scene with a 5 kilometer wide and tall area light is catastrophic -it attempts to start but runs out of resources before baking can begin. But with small parameters (imho, building interiors only) the bakes are regular and relatively fast.

    I like the workflow, and I also like to have a lot of control over my maps, so this plugin is really a step in the right direction, but...

    For outdoors, I found that without crisper shadowing, it's completely unusable -even extremely heavy cloud cover makes much crisper shadows. Think about a scene that is 500 to 1000 meters in height, width and depth. This is not an unreasonable size for a PC, Xbox or Playstation game (which we are making).

    So I'd like to ask if you could make it work with directional lighting? ;)
     
    TooManySugar and Shodan0101 like this.