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. Dismiss Notice

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

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

  1. hiyougami

    hiyougami

    Joined:
    Jan 27, 2017
    Posts:
    4
    Heya, having an issue with LODGroups and Lightmap Groups (I saw this was mentioned before and said to be fixed, but after updating to the latest patch & verifying it was installed, it's still occurring).

    upload_2022-2-23_0-37-45.png

    Baking without any Lightmap Group Selectors gives expected results, but with Lightmap Group Selectors, all meshes that are part of LODGroups are not receiving direct light, only indirect.
    We're rendering Full Lighting with Atlas Packer set to Xatlas, Unwrapper set to Default, and RTX mode enabled.
     
  2. dhruv_unity154

    dhruv_unity154

    Joined:
    Feb 11, 2022
    Posts:
    14
    Hello All,

    I am thinking to use the Bakery for my VR Projects. But have a few questions.
    Bakery plugin has a requirement of a Windows PC for bake, I understood.
    Current project development I need to do Mac system also. Can I use the windows system for bake environments and Prefabs? After the baking process can switch to my Mac system for further Development with the Bakery plugin and all baked scenes?

    @guycallednik @guycallednik
     
  3. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,628
    Weird, Bakery specifically sets them to Lightmap (you can see it in ftTextureProcessor.cs). There is a disabled option to set them to Default though. Maybe you somehow have it enabled in a very ancient scene, and now the option is gone from the UI, but still stored in the settings? In which case, try following:
    - Get debug tools: https://geom.io/bakery/wiki/index.php?title=Community_extensions#Debug_Tools
    - Click Bakery -> Debug select storage
    - Click "Show debug info"
    - Somewhere near the top you'll see "Render Settings Encode Mode". Make sure it's set to 0.
    If it's already 0, then perhaps some third-party asset is messing with the lightmaps.

    Interesting, I don't see any valid reasons for these seams then. Any chance you can send me any little example package/project where I can debug it?

    Uhmm maybe baked in Indirect mode? This way only GI is baked. Try Full Lighting if you want to bake shadows too. Or set "Baked contribution" to "Direct and Indirect" for the lights that you want fully baked.

    As far as I know, Package Manager versioning is broken and you shouldn't trust it.
    @jbooth is complaining about it for a long time, seems bad: https://twitter.com/slipster216/status/1485848590853492743
    Bakery has its own independent patcher, so maybe try it instead: https://geom.io/bakery/wiki/index.php?title=Github_access

    upload_2022-2-24_1-10-21.png

    Yes, unfortunately Bakery uses some Win/D3D11 code even for the scene export process. Rendering the UV GBuffer, transforming/converting cookies/cubemaps, encoding the alpha maps, etc. So it's kinda hard to make it work, especially when I don't have a Mac myself.

    Yeah, it should be sufficient. Make sure the matrix is set after the level is laid out, recalling Awake will update the matrix.
    I should probably make an example scene with this kind of rotation.

    Unity may preview HDR volumes incorrectly. Maybe the dark blob is just some inversion happening in their preview code. tex0.a and all other textures can also contain negative values.

    L1 spherical harmonics are made of 4 RGB values:

    upload_2022-2-24_0-54-26.png

    First value (L0) is just average light. Next 3 values split it into axis-aligned contribution, i.e. light coming in X direction, Y, Z (negative or positive, depending on what's stronger).

    Volumes are packed like
    tex0: L0.rgb, L1Z.r
    tex1: L1X.rgb, L1Z.g
    tex2: L1Y.rgb, L1Z.b

    Possibly the dark blob is there just because L1Z.r is negative around the lights, i.e. lighting goes in the negative Z direction (?).

    I can also debug any test package/project if you can send something.

    This should be enough: https://geom.io/bakery/wiki/index.p..._who_doesn.E2.80.99t_have_Bakery_installed.3F

    But looks like you already did that... are there any errors on another machine? Did you export the complete project, are the actual lightmap images there?

    Light probes cannot be baked per-sector because Unity doesn't know how to merge different light probe sets :(
    https://geom.io/bakery/wiki/index.php?title=Partial_scene_baking#Light_probes_and_volumes
    And L1 probes need the whole world to be loaded into the lightmapper - something sectors are helping to avoid. However, you should be able to use Render Light Probes with Legacy light probe mode, when they're mostly rendered inside the engine.

    Yes, you should be able to do so. But there are some things to note:
    - Don't use xatlas as Unwrapper, as it requires using a Windows DLL in Editor. You can still use xatlas as Atlas Packer, there is no problem with that. Basically you're OK with default settings here.
    - Probably disable Asset UV adjustment to prevent any sync issues (switch to Advanced settings and then set "Asset UV Processing" to "Don't Change")
     
    Keaneo likes this.
  4. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,628
    Sounds like the bitmask is working as expected, in case the light and the group are using different bits? Can you show me their bitmask values?
     
  5. Keaneo

    Keaneo

    Joined:
    Mar 7, 2015
    Posts:
    99
    @guycalledfrank thanks for the reply. I think think the preview could be showing/representing what I see when I play the scene - I get related results on dynamic objects in the scene that use the BakeryURPVolumeGraphRotatable shader (i.e. they go dark while inside the big dark blob!). Having reviewed this, I can't correlate it 100% with incorrect rotation of the prefab (i.e. if I have one bright light on one wall, that shows as a large dark blob, I would expect that light to illuminate the dynamic object at SOME point as I walk around the perimeter of the prefab - if incorrect rotation were the main issue.
     
  6. hiyougami

    hiyougami

    Joined:
    Jan 27, 2017
    Posts:
    4
    Both the lights and the Lightmap Group Selectors were using a bitmask value of only 3. I don't think it could be a mismatch of bitmask, since other child objects of the same Lightmap Group that don't have a LOD Group are baking just fine (e.g. the lower half of the floating island).
     
    guycalledfrank likes this.
  7. wj640520

    wj640520

    Joined:
    Jun 9, 2017
    Posts:
    6
    Hi, I have created a project then imported two packages, Perfect Culling, and Bakery.
    I created a new scene and dragged a prefab called TestPrefab into the scene, then I added a "Perfect Culling Camera" component on the camera and hit the play button, I want to check out how the culling function works, but it always shows a red message.
    "Some objects were not cleaned up when closing the scene. (Did you spawn new GameObjects from OnDestroy?)
    The following scene GameObjects were found:
    !ftraceLightmaps"

    I asked Perfect Culling support chat, and he said Bakery caused this error. So I tried to delete the Bakery package, and it didn't show the error message again. So if I still need to use the Bakery in the same project, how can I fix the error?

    PS. I sent a Perfect Culling package to you by email. I hope it will help.
     

    Attached Files:

  8. RPGia

    RPGia

    Joined:
    Jan 23, 2017
    Posts:
    40
    Hello, will Bakery work for creating light mapped prefabs that also have working light probes?

    I saw the wiki said that you can using bakery volumes but it sounds like each volume will require 4 samples due 3 SH textures and 1 shadow mask? I'm making a mobile game, and I feel like 4 samples is too much as an alternative to light probes. Am I understanding this correctly?
     
  9. CapelaGames

    CapelaGames

    Joined:
    Oct 13, 2014
    Posts:
    9
    It took me a while to do, but here is a sample project with the issue in it.
    If you build the lighting the issue goes away. But as soon as you press play it comes back, and I can't work out why.
    I put a cube in the scene to show you where the weird . (The scene is Assets/Keep/Bakery Test)
    I made the project as smaller but its still 700mb, hopefully that isnt too big.
    -
    edit: removed link

    Quoting my original message as a reminder.

    Thanks for your help
     
    Last edited: Mar 27, 2022
    guycalledfrank likes this.
  10. JuanGuzmanH

    JuanGuzmanH

    Joined:
    Feb 8, 2018
    Posts:
    70
    Hi Frank!. First of all thankyou for your work. Bakery is already an essential tool for my work and I used since some years. Your support is always excellent.

    What brings me here today is not really a problem with the Bakery functionaly but a tiny but anoying issue with the language used on the Bakery inspector components.

    I know is not a big deal, but its this type of small details can save some time.

    Im not sure if I'm the only one with this issue (english is not my mother language), but every time I'm facing the same issue.
    Generally speaking Its about the phrase that appears matching bakery components to Unity settings or other way around. I end up very frecuently, even reading the text explaining the action and thinking about this, clicking in the opposite action I want to do. Maybe its better to understand with some examples:

    For example Skylight Bakery Component, when the settings from unity are not matching with the bakery light .. you can see this text:
    upload_2022-3-2_9-8-37.png

    Here I think the problem is the "match" & "to". Its not clear for me what is going to be modified. I would apreaciate if the action is a bit more descriptive making clear what is going to be modified.
    Im not sure what, what for example, it will be clear for me to say:
    "Update Scene Settings to match this Bakery Light" and "Update this Bakery Light to match Scene Settings"

    On top of that (in the case of Sky material changes) If you are hitting the wrong action, the "undo" action (Ctrl Z) is not working so I have to go comeback to the original sky material and change manually the texture that was originally there.

    The same happens with other lights:
    upload_2022-3-2_9-7-37.png

    In this case, with a Unity direct light baked and the bakery one:

    The Buttons text actions are confusing me always:
    - First of all there is no "realtime lights" they are baked, so this text on the buttons are confusing me.
    - And seconf I think the text should be again more in the direction of
    "Update unity light to match this Bakery light" and "Update this Bakery light to match Unity Light"
    or at least something that makes me clear wich component is going to be modified.


    I know there are always a lot of more relevant things to improve realted with functionaly, but for me it will be a great help.

    Thankyou for your work!
     
    guycalledfrank likes this.
  11. VirtualDestructor

    VirtualDestructor

    Joined:
    May 3, 2014
    Posts:
    40
    I looked into Bakery Light Volumes and integrated them into my app. I think this feature single handedly saved my game. My levels are randomly generated and I can't use real-time lighting. Light volumes look much better than light probes, they are far easier to place, and I have found them to be much more performant than expected. Having to use triggers to set the texture references in the materials is tedious, but well worth it given the results. This is an amazing feature.
     
    guycalledfrank likes this.
  12. kwt127

    kwt127

    Joined:
    Mar 8, 2015
    Posts:
    5
    Hello, thank you for all your help with Bakery.
    In the process of building my game for release, I encountered a bug where Bakery/Standard would refer to a samplerunity_lightmap that was removed by the shader build.

    I believe the creator has provided two patches, Bakery/shader/Bakery.cginc and Editor/x64\Bakery/shaderSrc/ftrace.cginc, both of which have been posted on this forum in the past, but after applying both patches, the problem still persists. This is occurring.
    The specific error message is as follows

    ---

    Desktop Screenshot 2022.03.04 - 12.52.32.01.png

    Shader error in 'Bakery/Standard': Fragment program 'bakeryFragForwardBase': Unrecognized sampler 'samplerunity_lightmap' - does not match any texture and is not a recognized inline name (should contain filter and wrap modes).

    ---

    Unfortunately, I have not been able to create a validation environment for testing because I am busy with the upcoming release. So, it is highly dependent on my development environment and may not be a problem by nature, but if you have any ideas or solutions, I would appreciate it if you could let me know.



    On a different note, I have also encountered a problem with Batch bake, Bakery's utility tool. It seems that when I press the Rnder button manually on the same scene, the result is different from when I use this tool to Rnder the scene. Specifically, the format of the generated texture does not follow the settings. Even if the settings were originally set to produce DXT5, this tool seemed to produce BC6H/BC7.

    Environment:

    Unity version 2020.3.30f1
    Bakery version 1.9
     
  13. karunakaruna

    karunakaruna

    Joined:
    Jan 18, 2022
    Posts:
    1
    Hi Frank,
    Thank you for you work - really love your plugin - unfortunately I have an error.

    I've been baking using Shadowmask >Dominant Direction > L1 lightmaps for sometime with success and all the sudden I'm getting this error when I try to bake lightprobes, even after a full-bake:


    I attempted to delete and re-import bakery but it does not make a difference. I also tried downloading a patch, but get this error - it appears it is no longer on github?:


    It appears to be an issue specifically with L1 lightmaps - as legacy works, and lightmaps still bake.

    Hope to find a solution soon - my deadline is today so this is coming as a last minute surprise. Understand you've got a life of course, appreciate your time and effort.

    Unity: 2020.3.18f1
    Bakery: 1.9
     
  14. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    935
    Solved lightmap UV generation. Dreamwise.
    Add physical springs to UV'S and apply with serveral million raycasts to geo like so.....and remember how to reverse.

     
    Last edited: Mar 12, 2022
  15. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,357
    I don't much about how Unity handles baked lighting, but is there a way to bake only ambient occlusion with Bakery and use that with real-time lighting?

    I'm currently using real-time lighting with Unity's AO postprocessing effect. This darkens the corners of my environments like I want, but would prefer not to have AO on my characters and such, so I was looking for an alternative.

    When I bake Ambient Occlusion only, it bakes the AO as expected, but then the level geometry is unlit and unaffected by lights and shadows.
     
  16. r_chevallier

    r_chevallier

    Joined:
    Apr 20, 2014
    Posts:
    31
    Hello,
    I am coming across a problem I have not had in the past. My game has about 5 separate scenes so far. Two of the scenes seem to be conflicting with each other when it comes to baking the lightmaps. When I bake one scene it looks good. When I close it out to bake the other scene it messes up the lightmapping in the previous scene. Only two particular scenes seem to be interfering with each other. All my other scenes are fine. I am using "Scene named output path". The lightmap files seem fine in there respective folders but it is almost like the UVs are getting messed up. Not sure if I checked a setting causing this issue.

    Thanks
     
  17. kwt127

    kwt127

    Joined:
    Mar 8, 2015
    Posts:
    5
    Hello.
    I often encounter that phenomenon too. This phenomenon seems to occur when creating a duplicate scene.
    The solution is to clear the lightmap data from Lighting and correct the scene information referenced by LightingData.
     
  18. maltuna

    maltuna

    Joined:
    Oct 16, 2016
    Posts:
    1
    Hey everyone. Was banging my head on this with a larger scene. If you get the baking error :ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.

    Try changing Asset UV processing to [Don't change]
    Bakes perfectly now!

     
  19. r_chevallier

    r_chevallier

    Joined:
    Apr 20, 2014
    Posts:
    31
    Thanks for the response,

    I will try that next time. I have bake my scenes several times in the past and never came across this issue. On my last bake it seemed to get resolved. I did turn on "Spit By Scene" in the Bakery "Auto Atlasing" option. This may have helped.
     
  20. axvr

    axvr

    Joined:
    Aug 8, 2015
    Posts:
    14


    any ideas which setting that caused those pink areas in my baked lightmap?
     
  21. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,043
    Is there any way to use Bakery generated light maps without having to use the supplied scripts?
     
  22. GoldenFoxLLC

    GoldenFoxLLC

    Joined:
    Nov 28, 2019
    Posts:
    7
    Is there any way to make stained glass look?
     
  23. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,043
    @guycalledfrank While I hope to get an answer to my question above, in the mean time I was trying to follow the FAQ about generating and uploading the lightmaps and scripts to GitHub and bringing them back down to a repo clone of the project. When I open the project the lightmaps are not applied. Suggestions on what to check?
     
  24. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,628
    Hi all. Sorry for 2 weeks of silence. I was shocked by the horrible events that are still happening right now. Had to relocate.
    Wrote some thoughts: https://ndotl.wordpress.com/2022/03/12/post-russia/

    ---

    Not sure if I fully understood the problem, but here are some wild guesses:
    - Are you using OptiX 7 denoiser? Try updating to the latest patch, as there were some issues handling high intensities in my code.
    - ...does it happen without any denoiser at all?
    Also, any screenshots?

    Can you send me a test unitypackage please? E.g. some primitives with LOD/Lightmap groups and lights configured the same way? I'll check it.

    I tried to reproduce your steps but didn't get the error message somehow (this is on Unity 2020.3.12):

    upload_2022-3-13_21-59-27.png


    !ftraceLightmaps is an invisible scene object that stores lightmap/renderer arrays as well as current render settings. It is created when Bakery window is open; changing render settings will modify its values.

    Unfortunately no, light probes are a native Unity system and Unity doesn't support putting them in prefabs. With volumes we don't have these limitations.

    Yes.

    Yeah, maybe not the best fit for a mobile game. But keep in mind that these samples are only running on the volume-receiving objects, not the whole screen. It is possible that it will still work if your dynamic objects don't render too many fragments. But it's important to make sure that your lowest supported hardware does support HDR 3D textures (GLES3 devices should be OK).

    I checked it with my UV debugging shader, and I can see the UVs are completely ovelapping on the Spacestation object. Generate Lightmap UVs is off.
    Enabled it.
    You seem to be lighting the space station via the volume, while using the same model as the source of this lighting/shadows. Thus the "grid" artifacts, they are similar to shadow acne (when trying to use real-time shadows with zero bias). Voxels from the model intersect with its own faces. You can modify the shader graph, adding some normal offset to the position before sampling the volume... or just don't do it at all. Volumes work better when used for dynamic objects receiving shadows from static objects. Can you use a regular lightmap on the station?

    ---

    Will continue tomorrow.
     
  25. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,628
    Thanks!

    I see your point. Yeah, even I have to carefully read it before clicking.

    Would this be better?

    upload_2022-3-14_19-47-50.png

    Yeah, Ctrl+Z should work with light-light matching, but it doesn't undo skybox changes currently... I agree it's annoying.
    Just fixed it, please try the latest patch.

    Awesome :)

    Yeah I had this issue appear randomly sometimes. Please try the latest patch. It now uses a dedicated inline sampler instead of samplerunity_Lightmap on supported Unity versions:

    upload_2022-3-14_20-20-21.png

    Can you confirm it also happens on the latest patch?

    When light probes are in L1 mode, they are always baked together with lightmaps (when pressing Render), so actually you don't need to use Render Light Probes separately in this case. Still, it's weird that it didn't work. Did you also try the latest patch?

    Patcher should work normally, just tested it. Download errors may happen if your internet is very slow (?) or some firewall rules disallow downloading through Unity C# code.
    You can also follow manual patching instructions, just download 2 zips from github and extract them to corresponding folders.

    Wait, did you already implement it, or is it a suggestion? :D

    Yeah, it's a bit tricky as Unity assumes that lightmaps contain illumination, not occlusion. If you can write your own shaders/graphs, you can just rewire lightmaps into Occlusion, et voila. Alternatively, you can make sure that your UV0 == UV1 and put baked lightmaps into Occlusion slots of the materials (but shader approach is more elegant...).

    Are these scenes using the same models?
    https://geom.io/bakery/wiki/index.p..._in_one_scene_breaks_its_UVs_in_another_scene

    Surprising if it works...

    Well that shouldn't happen even when padding adjustment is enabled... if you can, please check if it still happens when using the latest patch.

    Seems like everything is pink? Do you have RTPreview, does it look pink there as well? It is possible that Meta Pass in your shaders doesn't compile and looks pink (?)
    Maybe something else, but there is no enough information to tell. Are there any pink lights in the scene? Does it happen when denoising is disabled?

    Some scripts are necessary: https://geom.io/bakery/wiki/index.p..._who_doesn.E2.80.99t_have_Bakery_installed.3F

    It works as described here basically: https://support.unity.com/hc/en-us/articles/206869046-Using-external-lightmaps-in-Unity-5-0
    Since Unity5, applying non-built-in lightmaps via scripts is the only supported way in the engine. Lighting data assets are not writeable (here is my rant).

    Do you have any reference?
    Currently Bakery doesn't support colored transparency. But you can:
    - Use colored cookie textures for spot/point lights. Sponza example has a similar lantern.
    - Use SSS for stained glass in scenes lit mostly with indirect lighting; it will give similar results.

    Make sure that you synchronized:
    - Actual lightmap texture files.
    - Updated scene files.
    - Have necessary scripts (mentioned above) present.
    - Updated model *.meta files, if UV padding adjustment was used.

    Also note that Unity can sometimes mess up asset GUIDs when partially copying assets between projects. Check if exporting/importing via .unitypackage works, as this workflow always corrects the GUIDs. This problem is not unique to Bakery and can happen to any Unity project with any cross-asset references.
     
  26. RPGia

    RPGia

    Joined:
    Jan 23, 2017
    Posts:
    40
    Hi, is there any chance of bakery settings being tied to a ScriptableObject, like the lighting settings in newer Unity versions?

    I use bakery as part of a pretty complicated scene processing workflow, where I'll bake all vertices into a single mesh, then create a new scene, then do the bakery. And during the new scene creating, I have to recopy all of the bakery settings. If I could just assign a ScriptableObject with all the settings data on it, it would make life so much easier. (Maybe this already exists in modern Bakery versions, haven't updated in a year)
     
  27. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,628
    Can you try copying it like sceneA -> global -> sceneB?

    upload_2022-3-15_7-59-12.png

    Global storage is already a scriptable object (but global).
     
  28. hiyougami

    hiyougami

    Joined:
    Jan 27, 2017
    Posts:
    4
    Here's a link to the unitypackage. There's three LMGroups, each with a different bitmask. Inside each group is a light (with different color), a cube, as well as a rock with LODs. You can see that the rocks all receive the red light from bitmask 0, but the cubes pick up the correct lighting for each group.
    I've tested on both the most recent github version of Bakery, as well as the Asset Store version, and both exhibit this result.

    upload_2022-3-15_20-45-59.png

    Sorry to hear about your situation, and glad you are safe. Both Bakery lightmapper, and the constant support you provide to the community, are extraordinary, and help us create things we could only imagine. Thank you.
     
    Last edited: Mar 15, 2022
    guycalledfrank likes this.
  29. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    935
    Think that was a good descission and thanks for this amazing text.
    Talked with some Unity and Blender devs this week who are in an similar situation.
    By reading your Text i must offen think on your Island level demo. Therefore it must be art.)
    The run from the beach through the village pretty nails your writing down in visual form.
    Only an impression )
     
    dsilverthorn and guycalledfrank like this.
  30. RPGia

    RPGia

    Joined:
    Jan 23, 2017
    Posts:
    40
    Hi, is it possible to make the generated _mask file (I think this is the shadow mask) as NOT a .tga, but rather a .png, to save space?
     
  31. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    317
    Thanks @guycalledfrank for the help with shader issues for URP - I now have a working configuration using your Better Shaders stacked shader and Better Lit Shader integrations for Bakery.

    I have a question about loading in Bakery Volume's (global) for different scenes. I've noticed that loading / unloading one scene affects the volume / lighting in another scene. What's the best way to keep things in sync for the correct volume lighting by scene? Is it better to use multiple smaller global volumes in each scene or a bigger volume that spans scene areas to prevent this from happening?

    // Wildstyle
     
    Last edited: Mar 16, 2022
    guycalledfrank likes this.
  32. natebo

    natebo

    Joined:
    Dec 5, 2020
    Posts:
    3
    Hey guys so I've been trying my best to slowly update my sample sizes to try and get rid of this noise I am getting around these light meshes that I have, but I am unsure what is happening or if I'm even adjusting the correct settings.

    After a certain point, Bakery just breaks and refuses to bake within the scene anymore... it forces me to create an entirely new scene in order to bake again or switch to a non-broken scene that already exists.

    Anyways, the important error I eventually get is 'ftrace error: Can't load lightmap to compose. See .ftracelog.txt for details. (91)'

    Where is this log file located? And additionally what settings should I be messing with to get rid of this noise here? It seems to break and give me this error whenever I turn off self-shadow and crank the 'samples far' beyond 512.

    Edit: My homebrew solution is to use two area lights per wall fixture right now. One area light mesh facing towards and one facing away ^_^
     

    Attached Files:

    Last edited: Mar 16, 2022
  33. EdyH

    EdyH

    Joined:
    Jun 20, 2019
    Posts:
    13
    I upgraded bakery and now the output path is not working. Lightmap textures are saved at the root of Assets Folder.
    Here it is the code
    Code (CSharp):
    1.      
    2.       var storage = ftRenderLightmap.FindRenderSettingsStorage();
    3.       storage.renderSettingsOutPath = bakeryOutputPath;
    4.  
    5.       var bakery = ftRenderLightmap.instance != null
    6.         ? ftRenderLightmap.instance
    7.         : new ftRenderLightmap();
    8.       bakery.LoadRenderSettings();
     
  34. GilG

    GilG

    Joined:
    Jan 30, 2017
    Posts:
    27
    Hello, I'm using prefabs in various scenes. When generating a lighting in a first scene then in a second it breaks the lighting of the first scene. Does anyone already had this issue ?
    regards,
     
  35. JeffNIAR

    JeffNIAR

    Joined:
    Jan 13, 2016
    Posts:
    8
    I have a couple issues with the network rendering. First thank you for having a way to offload the baking to another machine.
    • Can we have control to choose the port the server uses to listen for connections? It looks like it is 27777, but would like to have the option to pick another one.
    • The baking crashes when the user locks the PC. I RD into the remote PC, get it all up and running. And eventually the RD session closes (I am still logged into the PC through), and right when that session closes, the baking crashes. We have inactivity timeouts on our PCs, so I cannot leave it up long enough for a large scene to finish baking.
     
    guycalledfrank likes this.
  36. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,657
    You should be able to find the log file under
    Assets/Editor/x64/Bakery/
    . This is where the other ones are stored as well.
    .
     
    guycalledfrank likes this.
  37. Zoidberg656

    Zoidberg656

    Joined:
    Sep 26, 2018
    Posts:
    16
    skylightoff.jpg skylighton.jpg

    I baked the lighting with a sky light to give the look of moon light coming through windows.

    When I keep the sky light on and bake the light probes, it gives my dark hallways this half illuminated look, and when I disable the sky light and render the light probes, it appears dark (the way it should).

    Is there a way to stop the sky light from rendering with the light probes? Or do I just have to remember to disable it when rendering them?
     
  38. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    983
    Would be awesome to move stuff over to DXR or Unity's internal Computer & Ray Shaders.
    This would also allow Intel GPUs to work as the newer ones also will support these features.
     
  39. Wawruch2

    Wawruch2

    Joined:
    Oct 6, 2016
    Posts:
    67
    I think I have the same problem as hiyougami there are 2 chairs here first one has no LOD's second one has LOD component , first one get's Indirect+Direct lighting and every object with LOD's gets only indirect lighting, bove are under the same Group -> Settings of the last bake Xatlas packer is the problem here, with default it works but there's a lot of empty space so the default packing is not great. Are there any workarounds? I'll still try find the source of the problem but it might actually be Xatlas + Lightmap Group + LOD component
     
    Last edited: Mar 19, 2022
  40. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    935
    Hi,
    i tried to convert the Bakery Sector example to physical plausibel values.
    Never seen a solution before who is able to bake such big areas in this short amount of time in this quality.
    Her some details for others to reproduce.

    This generated some questions. Marked with "?" .)
    Would be nice to get some feedback.


    1. Analyze IBL
    I use the TreasureIslandWhiteBalanced IBL from Unity HDRI sample package.

    I has an version with Sun (blue marks)

    1_.JPG

    and an NoSun variant.

    2_.JPG

    The IBL comes with this record data.
    The ones i found to be relevant i will mark.


    Shot name: Treasure Island 1
    Location: Treasure Island - San Francisco

    Date: 13/03/2016

    Time: 10h15

    Weather: Some clouds


    Range:

    Standard capture:
    9 shots by view
    8 EV (1/4000 - 1/15")


    Highlight & Sun capture:
    15 shots by view
    Filter: 1000 + 32 (-15 stops)
    14 EV (1/2000 - 8")
    EV Step: 1

    Camera Settings:
    EV Step: 1
    F/8
    ISO 100


    Lux: 51000

    Luminance on 60 % white patch: 6700

    After Processing (With Sun):
    White balanced Lux: 5.205
    Absolute multiplier: 9798.271
     
    Last edited: Mar 20, 2022
  41. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    935
    2) Sun setup

    - setup a Unity Sun with Lux: 51000 (blue circle right top)
    - convert with Convert Lightmapped from Realtime
    to Bakery Direct Light intensity 16233.8 (blue circle right under)

    What color should be used here? For now i choosed a tinted color like screenshot.
    3_.JPG


    3) setup HDRI Sky volume

    Exposure: 14 (blue circle right top)
    and use physical camera in Exposure Override (blue circle under)

    4.JPG
     
    Last edited: Mar 20, 2022
  42. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    935
    4) setup Bakery Skylight

    Hit Bakery update Skylight Probe

    • Original IBL

    5.JPG

    • Bakery generated one in
    8.JPG

    6.JPG

    Test: set this to -14 in preview slider (blue circle)

    Check. OK

    7.JPG

    I choosed the no sun IBL first because we have the directional Light as sun replacement.
    Then i switched to the with sun IBL because it gave me slightly better results.
    Mostly for post processing the sky.
     
    Last edited: Mar 20, 2022
    guycalledfrank likes this.
  43. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    935
    • Hit match this light to scene skybox

      Color gets this grey.
      Intensity 4.59.


      Is the grey color correct? Tested also with white which seems not to match.
      Question is where grey comes from.

      Is the Intensity value 4.59 correct?
      Also tried to set this to 1 what seems be more correct.
      What would be the right intensity here for this setup.

    • add generate IBL to Sky texture field
    9.JPG
     
  44. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    935
    5: setup physical camera

    ISO/Shutter/Aperture (blue circles)
    to match Camera settings from IBL shoot

    Camera Settings:
    EV Step: 1
    F/8
    ISO 100


    This is only done to check plausibility.
    Not really needed.
    But i prefer to work with pysical camera values in future. So let s take these.
    Mostly because we now can in HDRP and to match rendering to Backplate shots if they come with an IBL.

    10.JPG
     
    Last edited: Mar 20, 2022
  45. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    935
    Result:

    Looks pretty nice.
    Booth sectors baked with Shadowmask to get some nice shadow quality on street level.

    Compare the resulting fassade color in sun and in shadow.
    • compare A1 with A2
    • compare R1 with R2

    11.JPG

    12.JPG

    13.JPG

    14.JPG


    Main questions are these ones from chapter 4):

    Hit match this light to scene skybox

    Color gets this grey.
    Intensity 4.59.


    • Is the grey color correct? Tested also with white which seems not to match.
    • Question is where grey comes from.

    • Is the Intensity value 4.59 correct?
    Also tried to set this to 1 what seems be more correct.
    What would be the right intensity here for this setup?

    • Would it be possible to get an alternative pysical plausibel unit for Intensity in the Bakery Skylight?


    and the chapter 2)

    • What color should be used here? For now i choosed a tinted color like screenshot.

    • Would it be possible to get an alternative pysical plausibel Lux intensity value in the Bakery Direct Light?

    If there are any suggestions to correct some values further. Please give me a message.
    Since a while I prefer to start with artist related work after creating physical correct setup.)
     
    Last edited: Mar 20, 2022
  46. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    935
    btw.
    set these -14 values to display lightmaps and baked lightmap preview the right way (blue circles)

    18_1.JPG

    18.JPG

    19.JPG

    15.JPG

    16.JPG
     
  47. KYL3R

    KYL3R

    Joined:
    Nov 16, 2012
    Posts:
    128
    Didn't find an explanation in the docs, what does red and yellow mean? "Overexposed"?
    I am using HDRP, I only changed the Indirect Boost from 2.78 to 2.79 in these 2 screenshots:



    In general, I was trying to get more bounced light into the interior. (bounces is at 3 because I wanted to reduce bake time, as I was investigating the yellow/red)

    Note: If I lower the Direct-Light Intensity, it doesn't get red with the same indirect boost value. So I assume I am exceeding some brightness level maybe?

    What would you suggest to do? I want day-light brightness outside but also cozy light on the interior, going for a stylized, non-realistic look. Should I fake that by adding an area light? Or am I missing some setting? btw. RTPreview looks fine, and it does seem to take the "indirect boost" into account!


    final note: I am using the newest version from github.
     
  48. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    935
    Some crosschecks with different pysical camera shutter speeds.

    Check light and shadows of buildings in the ibl background against the rendered in the foreground.
    Pretty nice.

    19.JPG

    20.JPG

    21.JPG

    22.JPG
     
    guycalledfrank likes this.
  49. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    935

    You can go with my setup i posted some minutes before.

    Your post is an good example why it makes no sense to fiddle with artistic values and intensitys when you have real values you can match.

    Then it renders and bakes like in the screenshots.
    Inside your cave/room you simply have to adjust the shutter speed of the camera to get it right.
    Like in real world.
    Set only shutter Speed for take image outside and inside buildings.

    So use the Unity IBL(free in asssest store) i used and the bakery direct light and you are pretty close to an physical correct setup.
    But you have to setup the Camera, PostProcessing, IBL and Sun the "correct" way that everything works at the end.
     
    Last edited: Mar 20, 2022
    guycalledfrank likes this.
  50. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    935
    Here a fast simulation of your interior room. I placed the cam in an corner. Not reachable for direct sun.

    Run around outside Shutter Speed: 200
    23.JPG

    If you enter an interior room. Shutter speed 50

    This it how it works in real live photography and film..
    Your eye adapation is very fast an accurate. Leave the simulation for this to others.)
    or use Histogram or Automatic Histogram Mode in the Exposure Volume Overide.

    But the Physical Camera Mode is a good start to understand what happens.

    24.JPG
     
    Last edited: Mar 20, 2022
    guycalledfrank likes this.