Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bakery - GPU Lightmapper (v1.96) + RTPreview [RELEASED]

Discussion in 'Assets and Asset Store' started by guycalledfrank, Jun 14, 2018.

  1. Ruuubick

    Ruuubick

    Joined:
    Apr 20, 2014
    Posts:
    17
    Hi Mr F !

    Just wanted to know if you were planning on updating the documentation since the start-up basics now requires a bit more than just having a light script on a static light. (Group selectors and all that, I'm thoroughly confused as to what I'm supposed to do after the latest update).

    Thanks !
     
  2. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    It just works as usual for me: creating a light, setting it to BAKED, adding the Bakery Light component, push "match lightmapped to realtime" and render.
    The light has to be set to BAKED. It doesn't need to be static.
    The meshes you want to lightmap need to be marked as static though.
     
    guycalledfrank likes this.
  3. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
    Thanks I will give it a try , this is working thru Unity HUD
    so I need to play around with it bit perhaps[/QUOTE]


    Just a follow up in the last HUD update it shut off admin, works perfectly now
    note: with Compiled binaries installed shader generated console error between .cginc , I think it was line 118 for the standard, I didn't save it as I just reinstalled version 1.551 overtop of it and will wait for remaining core updates :)
     
    guycalledfrank likes this.
  4. Ruuubick

    Ruuubick

    Joined:
    Apr 20, 2014
    Posts:
    17
    Mmh, all i'm getting is a prompt about requiring objects to be set static (they are) or to add bakery Lightmap Group Selector components on them, which, i'm not sure why i'd need to do that. Fresh install too.
     
  5. RobOuellette

    RobOuellette

    Joined:
    Jun 5, 2018
    Posts:
    10

    Ay - right on the money it seems! We tried a bake at 5 texels/unit with GI bounces at 0 and GI samples at 1; this seemingly baked most of the lights. There are some lights that failed to bake, but most did so I'm assuming the reason for these outliers not baking is an unrelated issue.

    How do you propose we go about getting this to work with GI, etc? Most lights sit below 15 in intensity, and the maximum intensity is 40. All indirect intensity multipliers are set to '1'. I'm not sure if range matters here, but those vary a bit in the scene.

    Should I bring the light intensity down globally and then bring up the exposure in the grade?

    Thanks!
     
  6. ViewportAU

    ViewportAU

    Joined:
    Mar 26, 2014
    Posts:
    26
    I want to share our application made with Bakery:


    While I am here I have one question:
    After baking a few scenes with the same bakery settings, there are scenes with 4K lightmaps and scenes with 2K lightmaps even though the size and complexity of the scenes are similar. I am trying to get them all in 4K as the 2K ones looks much worse. On top of that, the 2K lightmaped maps have a lot of wasted empty spaces while the 4K are great. (Scale per map type is 1/1 and I have maximum resolution set to 4K)
     
    Last edited: Mar 22, 2019
    guycalledfrank likes this.
  7. Ruuubick

    Ruuubick

    Joined:
    Apr 20, 2014
    Posts:
    17
    In advanced mode, can't you set both the minimum and maximum lightmap resolution to 4096 ?
     
  8. ViewportAU

    ViewportAU

    Joined:
    Mar 26, 2014
    Posts:
    26
    Yes, I tried that and still getting 2K even at super high texels resolution like 110 or more.
     
    Last edited: Mar 22, 2019
  9. ViewportAU

    ViewportAU

    Joined:
    Mar 26, 2014
    Posts:
    26
    this is because your scene is bigger than 4Gb on your build. Reduce texture sizes.
     
  10. tcmeric

    tcmeric

    Joined:
    Dec 21, 2016
    Posts:
    190
    Hi, I feel this is maybe a dumb question, but why can I not get some specular reflections? (This is the correct term?). Here is a picture of real time vs bakery baked. Everything is set to static and I am using the bakery light. I have a reflection probe in the scene (just a big on in the middle covering everything).

    Is this just a limitation of baked lighting, or am I doing something incorrect? Thank you.

    Unity 2018.2, latest ver of Bakery.

    baked.png realtime.png settings.png
     
  11. PxoGeorgSochurek

    PxoGeorgSochurek

    Joined:
    Jan 22, 2019
    Posts:
    7
    @guycalledfrank Thanks for a truely awesome plugin! I'm taking over the discussion from my programmer, who asked a bunch of questions a few weeks ago:
    Meanwhile, we've managed to work around most of the problems, but the BAKERY ATLASSING is still producing very weird results, I was hoping you could help us out and explain how it's working and what we're doing wrong. Sorry, this is going to be two very looooong posts :D

    _______________________________________________

    Tested with Unity 2018.2.2f1 and Bakery v1.5.
    We have 2 (probably connected?) problems concerning Bakery's Atlas system,
    unfortunately we can't share the original project.
    But we created 2 tests to reproduce those errors. The UVs are either within 0-1 space, or bigger (0-4 space).
    This is the basic setup, containing all the meshes for both tests, you can see their names and UVs here (created in Maya):

    Screenshots_MayaSetup.jpg

    PART 1: Stretch Test
    (Images are very high resolution, you can see it if you open it, then rightclick and "View/Show Image"!)

    Here we're taking a look at the 4 "StretchTest_" meshes + the CommonGroundReference mesh.
    Lightmap Max Resolution was set to 4096, Min Resolution to 1024 (so we can pack everything into one Lightmap, if set lower it would produce multiple LMs), Texels per Unit was set between 1 and 200 for multiple bakes. We used both „Show Checker“ and/or from the Lighting window the „Object Maps“ tab with the blue wireframe when having an object selected, to see the stretch Stretch doesn't always happen, it seems to be depending on the "Texels per unit" value! So we have one case where it's stretched (100 Texels per unit) and one case where it's not stretching (50 Texels per unit):

    Screenshots_ScenarioA+B_Bakery_density100.jpg Screenshots_ScenarioA+B_Bakery_density50.jpg

    Scenario A (Bakery):
    Meshes that contain long, thin UVs, who are packed closely together so their bounding box resembles an extremely long and narrow rectangle, can get stretched or squashed by Bakery's Atlassing, so the bounding box looks a bit more square-shaped.
    This is Mesh „StretchTest_SpaceOptimized_but_AtlasStretched_01Scale“ (RED).

    Also, we needed the UVs to sometimes be bigger than 0-1 UV space, but according to our tests this didn't seem to make any difference concerning the stretching (except that we get Bakery errors „Meshname has incorrect Uvs (True, x.xxxxx, x.xxxxx“).
    This is Mesh „StretchTest_SpaceOptimized_but_AtlasStretched_BigScale“ (BLACK).

    (Unfortunately, we can't combine/merge these meshes with others to have enough „fill material“ UVs to result in a near-square shape when they're packed. Those long, thin meshes NEED to be separate).

    Interestingly, the stretching varies with „Texels per unit“ value: 5 or 50 shows no stretch, but 1, 100 or 200 show extreme stretch. Maybe this has something to do with the resolution that was chosen for the Lightmap?
    It's difficult to judge due to the stretch, but the stretched meshes Texel Density (if you average out the stretch horizontally vs vertically) seems to be soooomehow similar to the Texel Density of the „CommonGroundReference“ (YELLOW) mesh.

    Scenario B (Bakery):
    In the Meshes „StretchTest_SpaceWasted_but_AtlasNoStretch_01Scale“ (GREEN) and „StretchTest_SpaceWasted_but_AtlasNoStretch_BigScale“ (PINK) (both UVs bigger than 0-1 space) we managed to get rid of the stretching:
    We moved one of the two long, narrow UV Shells way up, so the bounding box is similar to a square – and voila: The stretching is gone, no matter at which Texel per units value you bake.
    BUT this introduces many problems:
    Lots of UV space is wasted
    , you have to manually move around UV shells to get this square-shape which will be destroyed when running any packing/layouting algorithm – and most important of all:
    The Scale is completely off, so you'll have to manually introduce „Scale in Lightmap“ multipliers on those meshes, to get at least somehow uniform texel density across the whole scene.

    In fact, we had to change Scale in Lightmap on nearly all of the objects in our scene manually, because the resulting Lightmap UVs were so non-uniform, sometimes as extreme as „Scale in Lightmap: 150“ (!).
    Interestingly, „150“ did not result in double the resolution of „75“ in our original scene, like you would expect...so the Atlassing system seems to be really off, but that's another story ;)

    Scenario A+B (Unity):
    StretchTest_ScenarioA+B_UnityAtlas.jpg

    Now we take a look at how Unity handles those exact same meshes:
    Although „StretchTest_SpaceOptimized_but_AtlasStretched_01Scale“ (RED) and „StretchTest_SpaceOptimized_but_AtlasStretched_BigScale“ (WHITE) are atlas-scaled a little bit differently, their Texel density is extremely similar to mesh „CommonGroundReference“ (YELLOW). And they are not stretched at all!
    But „StretchTest_SpaceWasted_but_AtlasNoStretch_01Scale“ (GREEN) and „StretchTest_SpaceWasted_but_AtlasNoStretch_BigScale“ (PINK) also suffer from a terribly scaling difference compared to mesh „CommonGroundReference“ (YELLOW), so it seems Unity's atlassing system has calculation problems with this completely strange type of UV layout as well.

    So I guess the final questions regarding our StretchTest are:
    Why is stretching happening, is it a bug/incorrect calculations?
    How can we avoid it, without laying out our UVs in that strange, wasteful square-shaped fashion?
    How can we achieve a Texel density that's somehow uniform throughouth the scene without manually changing every mesh's Scale in Lightmap?
     
    Last edited: Mar 22, 2019
    guycalledfrank and atomicjoe like this.
  12. PxoGeorgSochurek

    PxoGeorgSochurek

    Joined:
    Jan 22, 2019
    Posts:
    7
    Continuation from:

    PART 2: UV Scale Test
    (Images are very high resolution, you can see it if you open it, then rightclick and "View/Show Image"!)

    Here we're taking a look at the 4 "UVSCaleTest_" meshes + the CommonGroundReference mesh.

    Lightmap Max Resolution was set to 4096, Min Resolution to 2048(so we can pack everything into one Lightmap, if set lower it would produce multiple LMs), Texels per Unit was once baked at 5, 25 and 200.
    We used both „Show Checker“ and/or from the Lighting window the „Object Maps“ tab with the blue wireframe when having an object selected, to see the Scaling.
    The fact that the big plane on the right ("UVScaleTest_RealworldScale_BigPlane") had its UVs in 0-4 space, instead of 0-1 like all the other planes (so it has the same Texel Density for standard texturing purposes like its small brother "UVScaleTest_RealworldScale_SmallPlane") didn't seem to make any difference - except that we get Bakery errors „Meshname has incorrect Uvs (True, x.xxxxx, x.xxxxx“).
    There is no strange "move long, thin UV shells up to make it square" like before, only square UVs, so you would expect clean and consistent Texel density across all meshes, also when changing the Texel per unit values. But something else happens:


    This is the bake at 200 Texels per unit (see HiRes image for details), everything looks pretty uniform and okay.

    Screenshots_ScalingTest_texelpu200.jpg


    This is the bake at 25 Texels per unit (see HiRes image for details), it's starting to become non-uniform, small planes occupy less space than they should.

    Screenshots_ScalingTest_texelpu25.jpg


    This is the bake at 5 Texels per unit (see HiRes image for details), now everything is becoming completely crazy, small planes occupy more space in the lightmap than their brothers who are 4x as large.

    Screenshots_ScalingTest_texelpu5.jpg


    Questions:
    What is happening here, is this our fault?
    How are we supposed to set "Scale in Lightmap" correctly, so that Meshes have uniform density across the whole scene, when their relative scale in the Lightmap changes because of changes in the Texels per unit?
    Well, I guess we shouldn't have to mess with the "Scale in Lightmap" at all, everything's supposed to have more or less uniform density, right?

    __________________________________________________________________

    Here's one of your old answers concerning this problem.


    Thanks a lot for the great work, and keep it up,
    best regards,
    Georg
     
    Last edited: Mar 22, 2019
    guycalledfrank, RockSPb and atomicjoe like this.
  13. Cicaeda

    Cicaeda

    Joined:
    Sep 29, 2017
    Posts:
    34
    It seems that transparent textures don't account for tiling when baked. Is this intentional?
     
  14. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,667
    Any console errors during that?

    I definitely should..

    You don't have to use them. They're more like an advanced feature when you want more control.

    The workflow didn't change much since v1.0. Does something look different to you? Quickstart tutorial should still work as before.

    Hmm which file?

    Maybe the objects have Scale in Lightmap set to 0 (on mesh renderers)? Maybe they use skinned renderers (they're not supported yet)? Also having the EditorOnly tag would prevent objects from being baked too.

    Light settings sound reasonable. I'm not sure what could be the cause. I would try splitting the lights into groups and then see if you can bake 1 GI bounce with each group without a problem. If you can share a simplified version of the scene (just the lights plus some cubes maybe), I can debug that for you.

    Wow, this is great!

    I can't make a 100% correct guess (lots of factors), but in general I would assume that:
    - Scenes with 2K lightmaps have smaller total lightmapped area, so 4K is not needed.
    - Lightmap contents can't fit into a 1024 map, but still smaller than 60% of a 2K map, so they are left like that without being scaled up (fixed-texel-size rule wins over the preventing-wasted-space rule).
    Are you sure they do really look much worse? Can you make a checker size comparison? It should be similar with identical settings and Scale in Lightmap (not exactly, but close).
    Sometimes two scenes may look similar in size, but there can be particular objects with complex topology that take a significant area when unwrapped.

    Unity doesn't support baked specular. Bakery does, though, but you'll need to use Bakery shader for that. You will also need to use some directional mode during baking (but not Baked Normal Maps). Check example_mixed_directional_mode scene for reference:

    upload_2019-3-23_14-38-3.png

    I need a drink now :(
    Let me admit I'm not great at writing UV unwrappers and atlasers. I'd rather prefer using the built-in Unity system, but they don't expose the API. The best solution on the roadmap for now is to integrate xatlas for both tasks, as it's a production proven system.
     
    tcmeric likes this.
  15. tcmeric

    tcmeric

    Joined:
    Dec 21, 2016
    Posts:
    190
    Dominant direction, with a bakery shader is the most lightweight then (that has specular)? This is for mobile. Lightmap size is less of an issue vs speed for me. Thank you.
     
  16. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,667
    Yes.
     
    tcmeric likes this.
  17. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
    Hmm which file?

    I will see if I can reproduce it .. I think it was more a Unity bug as I had that happen once a long time ago when running as system administrator in windows 10,they had the default rules set up that causes a unrelated bug in unity that locks up drag and drop thru the window browser into unity. I only needed to enter that mode when doing global shader tweaks. its funny that its hit and miss some systems do and others work smoothly.

    for the last bug I cleared it finally by reinstalling HUD and Unity cleaning reg files. for the bakery side the bug effected it in a way that it intimately had lost settings to the .cgnic line 118 in standard and in specular I forget the line however just restarting fixed it so its going to be more a Unity bug and harder to pin down if I can reproduce it again
     
    guycalledfrank likes this.
  18. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,667
    So I started integrating xatlas, currently as an optional UV unwrapper for imported assets. So far so good, using same padding settings:

    upload_2019-3-24_23-35-42.png

    upload_2019-3-25_0-28-7.png
     
    Last edited: Mar 24, 2019
  19. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    Oh yes, that's better indeed! :)
     
    guycalledfrank likes this.
  20. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    814
    Wow that unity unwrapper seems todo a terrible job in comparison!!

    Dude, I just heard that Nvidia is enabling RTX for pascal line up too!!! I don´t care if perform like crap in realtime but I guess we will benefit greatly even more on baking times!! you think so?!

    Also, If the bakin gets so fast, many times the scene exporting may get longer than the light computing, would be possible to have a mode where you have the scene exported and you simply keep on changing values and rebaking light without exporting?, like searthing for the optimal setup .
     
    Rich_A likes this.
  21. PxoGeorgSochurek

    PxoGeorgSochurek

    Joined:
    Jan 22, 2019
    Posts:
    7
    Hehehe...sorry to spoil your weekend like this, I hope it was some damn fine alcohol at least :p

    So you mean we'll just have to be patient until you're finished implementing xatlas instead of your current, homebrew method - and you're not going to spend more time on your own solution?
    (Which is absoluetly fine, I'm just asking whether I'll have to keep track of the quirks of the current method, or if I can forget everything about it because it will be completely gone soon)

    Thanks a lot and keep up the amazing work!
     
    guycalledfrank likes this.
  22. HenriSweco

    HenriSweco

    Joined:
    Aug 8, 2016
    Posts:
    28
    Did you see any difference in speed or about the same? With it being your own implementation is there anything you're thinking of to now be able to do more gracefully, when you don't have to rely on Unitys unwrapper?
     
  23. psych77

    psych77

    Joined:
    Mar 1, 2017
    Posts:
    55
    Really? Total Texture cannot be more than 4gb? How am i suppose to do that? my game is huge... like 20gb is textures only..
     
  24. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
  25. AAK_Lebanon

    AAK_Lebanon

    Joined:
    May 30, 2015
    Posts:
    77
    I have a scenario and I am not sure what is the best solution for me: I should create a Virtual exhibition, and I am not sure about the lighting setup. I feel that I should put above each stand 4 projectors (I will use unity Light spot with Bakery Point Light script), however, is that an overkill solution? I have more than 40 stands, so what is the best solution ? should I use emissive materials on the projectors or unity light is better?
     
  26. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    I would do just that, but I would do the stand as a prefab and then use instances of this single prefab; just in case I wanted to change the stand configuration later: this way you edit the prefab and all instances get updated at once, so you can always change the amount of spot lights later.
     
    guycalledfrank and AAK_Lebanon like this.
  27. AAK_Lebanon

    AAK_Lebanon

    Joined:
    May 30, 2015
    Posts:
    77
    Thanks for your response. My stand is already a prefab, I am aware of this, however, are you suggesting that I should also bake the light into the prefab?
     
  28. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,667
    Does it? You can certainly enable the RTX mode on non-RTX cards (I can do it on 1060), because drivers/OptiX allow the emulation. On my PC though it makes the bake slower. Maybe depends on the scene.

    You can do that already if you uncheck "export geometry and maps" in experimental settings. Note it will work if you only change light/GI settings, not scene geometry/layout or resolution/atlasing settings.
    I agree that screen export is slow though, it's certainly possible to optimize it. Will start with atlasing.

    That sounds ideal. The homebrew solution is a bit messy, and offloading a large part of this code into xatlas would make it cleaner and should work better (and faster, it's native code).

    Unity took 1.6 seconds on the 2nd pic. xatlas took 0.6 seconds - this is including my own C# mesh rebuilding code on top (I have to rebuild all vertex attributes because unwrapping splits vertices, changing their count).

    There are a lot of things to think about:

    - Currently I only call Unity unwrapping function (or xatlas) during UV padding adjustment, and this only happens for models with "Generate lightmapping UVs" checkbox. Basically I use the checkbox to determine if you want your own untouched UVs or want tools to do the job for you. It has a downside of unwrapping being called twice (!), first during normal asset import, then in my model postprocessor script. This sucks but I couldn't find any neat workaround. Now I definitely have to, otherwise the performance benefit of xatlas won't be as visible, when you have to first run the built-in unwrapper anyway. Ideally what I need is to preserve the checkbox on the asset, but don't actually allow Unity to run its unwrapper. Alternatively I can add my own additional checkbox, but I'm pretty sure most users won't notice/use it and get bad results.

    - Using xatlas complicates scene sharing, especially when you want to send it to someone without Bakery. Currently I write unwrapping instructions to model meta files, and if the postprocessing script is present, it will run Unity unwrapper with these exact settings and get matching UVs. This allows including a very small amount of scripts with your scene, and it can be viewed on any platform. xatlas is a native library that has to be built separately for every platform, and adding it to your scene (especially if you just want to share a scene on the asset store) is a bit too much, I think. I should perhaps generate some UV layout assets that the postprocessor script will be able to apply.

    - I currently pack individual mesh UVs into atlases as AABBs (as does Unity). With xatlas it should be possible to do a tighter packing. E.g. I can generate simplified concave (or at least convex) polygons out of every UV set and then pack them.

    Spotlights sound fine to me. Small emissive surface won't have sufficient precision.
    What baking mode are you planning to use, do you need realtime shadows? Fully baked or shadowmask should work fine.
     
    AAK_Lebanon likes this.
  29. b4th

    b4th

    Joined:
    Jul 4, 2016
    Posts:
    65
    Hi, still building an app for mobile, and I've noticed that with lightmap size reduced to 2048, Bakery is producing 4 lightmaps - a 2048, two 1024s and a 512.

    Because this is a mobile app, draw calls are a higher priority than space efficiency, so in this instance, it would actually be preferable if Bakery baked out only TWO light map atlases at 2048, rather than pack light maps into atlases of decreasing size. This could potentially halve the number of draw call batches!

    Is there an option in Bakery to enable this kind of policy for lightmap packing? If not, could such an option be added?
     
  30. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,667
    Setting Min Resolution to 2048 should do what you want (unless there are many LODs in the scene).
     
    b4th likes this.
  31. TokyoWarfareProject

    TokyoWarfareProject

    Joined:
    Jun 20, 2018
    Posts:
    814
    guycalledfrank likes this.
  32. fuzzy3d

    fuzzy3d

    Joined:
    Jun 17, 2009
    Posts:
    228
    Hi, bakery is fantastic product. Right now I am testing with RTX 2070 Max-Q an it is very fast. In my full-time job we have 4x GTX 1080ti in one PC for renders and this is O.K. too.
    Only one thing- some time bakery settings resetting to default without any reason.. Is there any config file where can I change default parameters?
     
    atomicjoe likes this.
  33. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,667
    Pretty sure you either:
    - Used "Clear baked data". Currently it also clears the settings. Not cool, yeah, should be fixed.
    - Have a multi-scene setup and switched the scene (each has its own settings, they are saved inside scenes files).
    Hint: you can save render settings to a prefab (using Bakery Lightmapped Prefab component), then drag the prefab into any scene, hit Load and restore them.
     
    b4th, fuzzy3d and atomicjoe like this.
  34. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    Well, I didn't know that!
     
  35. lolclol

    lolclol

    Joined:
    Jan 24, 2013
    Posts:
    212
    how to bake lighmap prefab?
     
  36. unity_1046218

    unity_1046218

    Joined:
    Mar 27, 2019
    Posts:
    1
    Hello! I've currently been having issues with baking using Shadowmask (Distance) and SH, and then applying Shadowmask to the Direct Light specifically. I've found this is fixed by increasing the lightmap size, but I'm not sure about one thing.

    "Object's size in lightmap has reached the max atlas size."

    This Unity message pops up whenever I increase the size of my lightmaps, my question is, is this still relevant information using Bakery or should I ignore the notification?
     
  37. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
    guycalledfrank likes this.
  38. zhangfan

    zhangfan

    Joined:
    Apr 10, 2013
    Posts:
    12
    Dear Sir, When i pressed the render button, however, it pop up a window said that : Generate GBufferMap error, Can`t write texture: C:\users\@#¥@#\AppData\local\temp\frender/uvalbedo_test_LM0.lz4.
    I use Windows 10 with chinese language.
    Could you fixed it?
    Thank you!
     
  39. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,667
    You can ignore that - it's only relevant for built-in lightmappers.

    Yeah, noticed your question today on twitter. Sorry about that - seems like it didn't recognize characters in your user name. Try going to advanced settings and set Temp Path to any other folder:

    upload_2019-3-28_11-35-0.png
     
    Last edited: Mar 28, 2019
  40. Krubbs

    Krubbs

    Joined:
    Mar 15, 2013
    Posts:
    30
    @GTX980 4G
    What to do? Lightmaps cleared. PC restarted. VRAM optimzation Force On. Lightmap UVs correct.
    After crash, unity cant open my project 2-3 times - crashes again.
     
  41. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    try with VRAM optimzation Force OFF
     
    guycalledfrank and Krubbs like this.
  42. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,667
    Seems to be caused by a lack of RAM. Similar to all VRAM problems, try the solutions from FAQ (page 27 - "I get an Out of memory error")
     
  43. Krubbs

    Krubbs

    Joined:
    Mar 15, 2013
    Posts:
    30
    This helped for me. Thank you!
     
    atomicjoe and guycalledfrank like this.
  44. Rich_A

    Rich_A

    Joined:
    Nov 22, 2016
    Posts:
    338
    Dumb question - My Unity lights set to 'baked' with the Bakery component attached are still rendering in realtime, with the performance degradation that that entails. (2017.4.24)

    Isn't it enough to attach the Bakery component to those lights to stop them rendering realtime? What am I missing?

    Is Bakery also what is turning off my 'realtime GI' checkbox in the Lighting window?

    Of the three lighting options - which provides the best performance?

    I realise that these are possibly general Unity lighting questions - but with the necessity of Bakery, you are going to get a more general-purpose audience and so these general-purpose explanations might be useful in the documentation.
     
    Last edited: Mar 29, 2019
  45. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,667
    You also need to render the lightmaps to update that (similar to how it works with built-in lightmappers in Unity).

    It can do that, yeah.

    Are you talking about Full/Indirect/Shadowmask? Full lighting is the fastest one, because everything is baked (no mixing with realtime lights).
     
  46. kainoo

    kainoo

    Joined:
    Aug 24, 2015
    Posts:
    10
    Hey,

    We've been using Bakery effectively for projects using Desktop GPUs up until now. We wanted to try out the acceleration of RTX using a Nvidia Tesla T4 with Google Cloud, but it seems like this doesn't work yet. Even after installing the latest graphics drivers from Nvidia, Bakery always gives us the error that the OptiX library could not be found.

    This is all we get in the tracelog:
    Baking using the standard system is working just fine, but not much faster than baking on desktop-grade hardware. We'd like to try out RTX for baking. Is the error on our end and do we need to look with Google for this?

    Thanks for your help !

    Edit: reformulated last paragraph to indicate that we'd like to use RTX
     
    Last edited: Apr 1, 2019
  47. jxxxxst

    jxxxxst

    Joined:
    Nov 3, 2012
    Posts:
    50
    Hi there,

    loving bakery so far, we got new hardware in the studio and id love to try the RTX mode.
    Unfortunately, there are some errors :


    Used host memory: 0mb, available GPU memory: 9244mb
    MODE: lodselect
    USING FLOAT
    Load shaders...
    Loading shader lodselect.ptx::oxMain...
    Loading shader lambert_lodselect.ptx::oxMain...
    Loading shader clip_rtx.ptx::oxMain...
    Loading shader shadow_rtx.ptx::oxMain...
    Loading shader miss.ptx::oxMain...
    Loading shader attrib_trimeshTexLODSelect.ptx::interpolate...
    Error (1540): File not found (Details: Function "_rtProgramCreateFromPTXFile" caught exception: File not found - attrib_trimeshTexLODSelect.ptx)

    Error in PTX
    Used host memory: 0mb, available GPU memory: 9244mb
    Used host memory: 0mb, available GPU memory: 9244mb
    Create buffer...
    Num passes: 1
    Num tex: 1
    Pass lodselect_HDR...
    Used host memory: 0mb, available GPU memory: 9244mb
    Launch 1x1 tiles...
    Tile 0x0...
    Streaming...0
    npd
    Launching...
    Error (1280): Invalid context (Details: Function "_rtContextLaunch2D" caught exception: Validation error: program cannot be used as both ST_ATTRIBUTE and another semantic type)


    Any ideas anyone? : )
     
  48. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,667
    I'm not really sure how this works and what are the limitations. I would first try it on a local PC.
    The error can only mean one of two things:
    - optix* and cuda* DLLs cannot be found in Bakery folder.
    - drivers are old.
    Maybe there is something else I don't know. Maybe check with Google, yeah. Do they have any OptiX-based RTX benchmarks that work?

    OK, yeah, this file was missing in 1.55, I apologize for that. BTW, it's only required when GI VRAM optimization is used. Anyway, I uploaded it to github (PM me if you don't have access to it), or you can just grab it from here:

    (file should be unzipped and placed to Editor/x64/Bakery/)
     

    Attached Files:

    kainoo and jxxxxst like this.
  49. Ruuubick

    Ruuubick

    Joined:
    Apr 20, 2014
    Posts:
    17
    Hi Mr F !

    Going back to my issue with the latest update, it seems that after trying to use Unity's lightmapper at least once in my scene, Bakery will then duplicate the Render Selected Groups onto the basic Render option, making me unable to use bakery at all, only solution being removing every single bakery file on the project, importing it again, and praying that it won't happen again, but it does.

    Any idea what could cause this issue ? Could it be the skinned mesh renderers in my scene ? Conflicting settings between the two lightmappers, a faulty import or maybe something in my scene causing that bug ?

    Here's a gif of my issue
     
  50. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,667
    I'm not sure exactly your description of the problem matches the gif. The error is stating there are no bakeable objects. Object is bakeable if:
    - It's active.
    - It has Mesh Renderer + Mesh Filter or Terrain component.
    - "Scale in Lightmap" on renderer is > 0.
    - Marked as Lightmapped Static.
    - Has any UVs.
    - Does not have EditorOnly tag.
    - HideFlags.DontSave or HideFlags.HideAndDontSave are not set by any script.