Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020.2 has been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

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

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

  1. BPR

    BPR

    Joined:
    Jan 4, 2013
    Posts:
    49
    Hi,

    I was wondering with the Network Baking feature of Bakery is there a way to grab the inbetween state of the scene with geometry placement, uv group selector, UV2 adjustments and packing to export it somewhere else?

    I would like to have some caustics and light refraction for the scene baked in e.g. Blender and overlay it with the lightmap from Bakery in a consistent way.

    Kind regards,
    BPR
     
  2. musolo

    musolo

    Joined:
    Sep 12, 2014
    Posts:
    234
    Hi! Wonder when is next sale for this asset? i`m too poor to get it any time soon.
     
  3. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    959
    Only Unity knows. But you can expect another mega sale in Christmas or New Year's eve.
     
  4. Gafda

    Gafda

    Joined:
    Mar 9, 2014
    Posts:
    5
    Hi Frank,

    I have the same issue described last week by tranvanhoa1296. All my baked scenes are black. I was working fine few months ago, but now, it's always generating dark lightmaps, I have tried the following:
    - Updated NVidia Drivers
    - Updated Bakery with the latest version of the github repo
    - Cleaned baked files
    - Cleaned cache file inside the frender folder
    - Reimported my project (deleted library folder)
    - Updated my project from 2018 LTS to 2019 LTS
    - Using XAtlas, OID

    I can add that I am using AreaLights with the BakeryMeshLight script on it.
    I cannot share the entire project or the models (that are huuuge). So tell me what information you need to help you improve the debug process of this issue.

    I have switched to Unity's progressive lightmapper, but bakery is wayyyyy faster and with a better output.. :(

    Thanks in advance !
     
  5. CompuGeniusPrograms

    CompuGeniusPrograms

    Joined:
    Aug 27, 2018
    Posts:
    40
    Hi! I'm having a ton of issue using Bakery (which I just bought) with this Sci-fi Industrial Art Snaps Pack: https://assetstore.unity.com/packag...rt-sci-fi-industrial-by-manufactura-k4-145105

    When using Unity's built-in lighting generator, it looks good, but when using Bakery, it looks terrible. I think I traced the issue to the lack of unwrapped lightmap UVs on the models, but when I clicked Generate Lightmap UVs in Unity, it still looks bad. How can I fix this?
     
  6. solarflare_s

    solarflare_s

    Joined:
    Feb 14, 2013
    Posts:
    10
    Love the asset.

    Is there a way Bakery can save out a collapsed image, that contains all the RGB information as well as the light bake, so that it can be used in another program???
    So instead of baking out a separate Lightmap, that is applied over the top, it combines them into one texture map.

    Or does anyone know an easy way to combine an object with 2 UV Channels into 1 texture map.
    So an RGB colour map and a light bake into one 1 texture file?

    Any help greatly appreciated.
     
  7. BPR

    BPR

    Joined:
    Jan 4, 2013
    Posts:
    49
    You would have to adjust the UV2 layout to be a copy of the albedo/diffuse uv layout. Then prevent Unity from generating its own UV2 layout in the import settings of the Geometry.
    Then the lightmap is aligned perfectly over the diffuse map in an image application like photoshop or gimp.

    But the lightmap comes usually in a higher bit depth (16 or 32 bit instead of 8 per color channel) that means in order to combine them you need to reduce the precision of the layer which can come with some artistic choices in terms of tonemaping.
     
  8. Firewalker

    Firewalker

    Joined:
    Mar 30, 2012
    Posts:
    34
    "Looks bad" is not informative enough. You need to post screenshot comparations and problems with a clear explanation.
     
  9. CompuGeniusPrograms

    CompuGeniusPrograms

    Joined:
    Aug 27, 2018
    Posts:
    40
    Here are screenshots of how it looks once baked: https://imgur.com/a/RkkjBv1
    It is choppy, dark, and really ugly. It should be smooth, lighter, and metallic.
     
  10. Ukounu

    Ukounu

    Joined:
    Nov 2, 2019
    Posts:
    136
    Did anybody have a chance already to try the new RTX 30XX cards with Bakery? All the reviews I read say that most existing games and apps cannot scale for so many cores, and that's why 3080/3090 will give only 20-30% better performance than 2080 Ti despite having two times more CUDA cores. Will Bakery's performance scale better (two times faster baking)?
     
  11. Firewalker

    Firewalker

    Joined:
    Mar 30, 2012
    Posts:
    34
    These don't look right. Either lightmap UV is bad or objects are not marked static, or something else is the problem. You can check in the inspector of the mesh how the UV is spreading on the lightmap, what is the pixel density, etc. In Bakery you can also turn on/off the checker texture to check if UV mapping is properly set.

    Why don't you start with one simple object from the scene, do the lighting with a skylight and then move step by step until you understand what was behind all this.
     
  12. Sisay

    Sisay

    Joined:
    Dec 6, 2012
    Posts:
    17
    There are no urp shaders? Lwrp shaders do not work in urp
     
  13. CompuGeniusPrograms

    CompuGeniusPrograms

    Joined:
    Aug 27, 2018
    Posts:
    40
    I did some extensive research, and discovered this was a common issue issuing from having Full Lighting Render Mode selected. Changing to Shadowmask fixed the issue right away. This seems to be a bug in the newest version, and will hopefully be fixed soon. Thanks for your help!
     
    guycalledfrank likes this.
  14. marenin

    marenin

    Joined:
    Sep 22, 2019
    Posts:
    7
    Ok, i misunderstood what's the problem.

    The problem is that "correct rotation" not taken into account in bakery→skybox shader
     
    Last edited: Oct 5, 2020
  15. Luvrael

    Luvrael

    Joined:
    Sep 9, 2017
    Posts:
    10
    Hi,
    I have such an error while rendering. I can't find the reason for it. I set up the settings as in the documentation. When you try to change these settings and leave rendering for one hour, it stops at 14%.
    I will be grateful for your response.
    upload_2020-10-5_12-49-16.png
     

    Attached Files:

  16. RegdayNull

    RegdayNull

    Joined:
    Sep 28, 2015
    Posts:
    50
    Works inverted to Unity way but it's okay, I guess. Thank you.
     
    guycalledfrank likes this.
  17. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,383
    The inbetween state is just one big flat mesh where all objects are attached together, and UV0 is only stored for alpha-tested polygons.
    If it's OK, then yes, it's possible to import it to other software and bake something using same UV1.
    I don't have any tools for Blender, but maybe this 3dsmax import script will help you: https://drive.google.com/file/d/1YT5nZf1lPbVuRtOv6bxRVNbyJVAOUFAU/view?usp=sharing

    vbName/ibName point to the files generated; filterUVByLMID tells it to only extract triangles belonging to a particular lightmap; LMID is this lightmap's ID.

    Pretty sure Unity will run a regular Black Friday sale around November/December.

    First test it with GI bounces = 0 and GI bounces = 1, so we know the problem is related to direct or indirect lighting. With 0 bounces all you see is direct. If there are any single NaN/Infinity values, they are not yet propagated. If, with 1 bounce, you can see how darkness grows from some specific areas, it is likely there are some misconfigured lights around it.

    If it's black with 0 bounces, check if lights are not occluded and their geometry is not broken (inverted normals, etc). Check if shadow samples are > 0 and that lights don't use a dark texture.

    If the issue is indirect-related, check the lights from which the darkness grows (sounds scary :eek:). Typical causes can be:
    - Very high intensity
    - Very high indirect intensity
    - Combination of both (intensity * indirectIntensity > 1000)

    Bakery doesn't have such a feature, but you can try following:
    - In ftRenderLightmap.cs change "compressedGBuffer = true;" to "compressedGBuffer = false;"
    - Bake
    - Open Bakery's temp folder (defaults to Users/You/AppData/Local/Temp/frender) and look for files named uvalbedo*.dds
    - These are your color textures, reprojected to lightmap UVs. You can grab some DDS plugin for photoshop (such as this) and open it there.
    - Open your lightmap file. Copy the color image as a top layer. Set blending mode to Multiply. Flatten image. Save.

    UVs look totally broken. No way built-in lightmapper would produce anything meaningful here.
    Most of the scene is supposed to be metallic = lots of reflections. Standard shaders in Unity don't do specular from baked lighting, so the highlights are gone. It also looks like you've disabled the reflection probes/SSR.
    Suggestions:
    - Triple-check how the original scene was baked (or was it at all). Was it using mixed, realtime or baked lights?
    - To replicate mixed lights, use shadowmask (render mode and light options).
    - Make sure reflection probes are in place.

    Ah, you did it already. Good :)

    There are shader subgraphs for URP. And they are only needed for extra features. Regular lightmapping will work as usual: https://geom.io/bakery/wiki/index.php?title=Manual#Feature_support_across_shaders

    Skybox shader and skylight must match exactly. I'm a bit confused, can you show some example images (what it should be vs what it looks like)?

    Are you sure you tried all things listed here?
    https://geom.io/bakery/wiki/index.php?title=Troubleshooting#I_get_a_.22Launch_timeout.22_error

    Inverted? :confused: Weird. Black should be transparent, and white is opaque. I tested it by directly copying the alpha channel to color.
     
    BPR likes this.
  18. RegdayNull

    RegdayNull

    Joined:
    Sep 28, 2015
    Posts:
    50
    No. It works like an alpha. But _TransparencyLM in Unity term is not alpha. It is translucency texture. In alpha encoded opacity, in _TransparencyLM - translucency. Basically this feature supports translucency per channel. Red, green, blue. Pretty cool, but rarely used. It's up to you mimic this or not, even for one channel. I am ok with only separated alpha.
     
    guycalledfrank likes this.
  19. AHFontaine

    AHFontaine

    Joined:
    Aug 3, 2017
    Posts:
    12
    Hi!
    It's probably going to be a code 18 kind of deal.
    I asked this question on the Discord hoping somebody would answer but here we go.

    I'm trying to integrate bakery to an existing project that uses area lights. So I added some Mesh Lights components on each, copied the settings from the Area Light, and tried to start baking.
    Unfortunately, as they were made beforehand, I don't use a mesh renderer for these. And I get this message :
    "MissingComponentException: There is no 'Renderer' attached to the "Area Light" game object, but a script is trying to access it.
    You probably need to add a Renderer to the game object "Area Light". Or your script needs to check if the component is attached before using it."

    The thing is that in the manual, there's this part :
    "Should be used together with the Mesh Renderer component or with a Light component set to Area mode. "

    So is it mandatory to have a mesh renderer even though it says otherwise?

    Thanks in advance!

    P.S. Also, is it possible to use a picture for emission? I'm not really sure how Bakery handles emissive materials but I need to use specific pictures to emit light. Clicking on the available options change the material into a one color light.
     
    Last edited: Oct 8, 2020
  20. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,383
    Definitely not. I think there was a bug like that, fixed a while ago. Did you try using github patches?

    Certainly. Both emissive materials and textured light meshes should work.
     
  21. BPR

    BPR

    Joined:
    Jan 4, 2013
    Posts:
    49
    The script worked like a charm, thanks :)
     
    guycalledfrank likes this.
  22. Firewalker

    Firewalker

    Joined:
    Mar 30, 2012
    Posts:
    34
    Hi Frank,
    Been seeing this a lot when baking reflection probes:

    PPtr cast failed when dereferencing! Casting from Shader to Texture!
    System.Reflection.MethodBase:Invoke(Object, Object[])
    <RenderReflProbesFunc>d__228:MoveNext() (at Assets/Editor/x64/Bakery/scripts/ftRenderLightmap.cs:2265)
    ftRenderLightmap:RenderReflProbesUpdate() (at Assets/Editor/x64/Bakery/scripts/ftRenderLightmap.cs:2145)
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()


    If I run it again (Bake reflection probes) it works ok.

    Any ideas?
     
  23. Loards

    Loards

    Joined:
    May 2, 2013
    Posts:
    111
    Hey, lately i been having an issue trying to use the advanced mode.

    I want to basically use the advance mode to avoid re exporting the scene every time i want to do a bake, but by simply changing to advanced mode, im unable to bake until i reopen unity. Changing to Advance mode, make Bakery to ask for a lightmap group, even when i only press the bake button. if i go back to any other mode, keeps asking for the LightMap group and i need to restart unity.

    Also, is there a more indep guide of use for the AO only mode? saying "useful if you know what are you doing" is not useful at all hahaha. When i try to bake AO only, i get something that barely can be seen as an AO.

    Alos, trying to bake light probes after Lightmaps, gives this error upload_2020-10-10_23-26-22.png

    Any help is appreciated.
     
  24. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,383
    Cause unknown, but it doesn't appear to do anything bad (should still render the probes). Note that reflection probes are rendered by Unity (via regular engine rendering), I only call an undocumented editor function to do it without triggering lightmap/lightprobe bake.

    Simple/Advanced/Experimental modes only affect what controls you can see in the window. Changing settings mode by itself doesn't affect baking behaviour in any way.

    Can you show the exact message?

    How does it look and how do you expect it to look?

    Get the latest patch: https://geom.io/bakery/wiki/index.php?title=Github_access
    Also if you have Light Probe mode set to L1, the probes are already baked after regular "Render" anyway.
     
  25. Loards

    Loards

    Joined:
    May 2, 2013
    Posts:
    111
    [QUOTE="

    Simple/Advanced/Experimental modes only affect what controls you can see in the window. Changing settings mode by itself doesn't affect baking behaviour in any way.


    Can you show the exact message?


    How does it look and how do you expect it to look?


    Get the latest patch: https://geom.io/bakery/wiki/index.php?title=Github_access
    Also if you have Light Probe mode set to L1, the probes are already baked after regular "Render" anyway.[/QUOTE]

    Im sorry, i wrote that wrong, the Light group error happens if i change to "experimental" not advanced.

    Im testing again and the problem is not appearing, i will update as soon as i get it again.



    Thanks.
     
    Last edited: Oct 11, 2020
  26. Firewalker

    Firewalker

    Joined:
    Mar 30, 2012
    Posts:
    34
    Dear Frank,

    Again here are some complicated questions:

    We are automating the baking process. We have an editor "server" where we are initiating bakery by calling bakery.RenderButton(false); (as in example with batch scene renderings)
    Before that, we are loading baking settings in the storage of course.
    So what happens is this:
    1. Baking settings are loaded correctly if the Bakery editor window is not in focus
    2. Baking is initiated correctly.
    3. When baking is finished, the Bakery editor window is in focus.

    So the problem is that repacking of lightmaps is not done correctly on the first bake, but only on the second bake. (first bake - two LMs 1024, second two - LMs 2048)
    When the Bakery editor window is in focus before the rendering starts, LMs are packed correctly (2048).
    That is actually why the second rendering happens correctly - because, at the end of the first rendering, the Bakery editor widow is placed in focus (with correctly loaded rendering settings).

    The second problem is that when the bakery editor window is in focus, storing rendering settings from another editor script does not work (or simply the Bakery editor window is updating storage with its own default settings).

    What shall we do? :)

    Thank you very much!

    [EDIT: we did what we described - made a focus on the Bakery window before the start of rendering, and then back to ours, but there must be a more elegant solution.. and it feels weird, like not knowing what is actually going on]
     
    Last edited: Oct 13, 2020
  27. Gafda

    Gafda

    Joined:
    Mar 9, 2014
    Posts:
    5
    Hi, thanks for the reply.

    So I have tested both GI bounces (0 and 1), I still have dark results :

    bakery_black_gi-0.png
    This is with zero bounce.


    bakery_black_gi-1.png
    This is with one bounce


    Well, near some areaLights there is some baked lights, but it seems very low in intensity.
    area_light.png

    For top lights, I have tried one big AreaLight per light "rail" and several AreaLights (as displayed on the following image). For both, I have a dark output.
    area_light_02.png

    My bakery settings are the following :
    bakery.png

    I have tried with enlighten, the lighting is good, but I still prefer to use bakery than enlighten :)
    Thanks in advance !
     
  28. UltraRobot

    UltraRobot

    Joined:
    Dec 6, 2019
    Posts:
    2
    Hello, plugin looks amazing, but having an issue.

    Trying to bake a simple scene in 2019.4.6f1 (on mac) and I get the following error when I hit "Render"

    Code (CSharp):
    1. DllNotFoundException: simpleProgressBar
    2. ftRenderLightmap.ProgressBarEnd (System.Boolean freeAreas) (at Assets/Editor/x64/Bakery/scripts/ftRenderLightmap.cs:972)
    Everything ought to be imported correctly, I can see the simpleprogressbar .dll file in the Assets/Editor/x64/Bakery folder on disk, and I have no pending build errors.
     
  29. f1chris

    f1chris

    Joined:
    Sep 21, 2013
    Posts:
    335
    I would like to use the baked on my Windows and use it on my Mac. I can do it easily with regular .EXR unity files but Bakery is generating another format.

    1- can I use ( not bake for sure) on a MacOS the baked files from Windows ?
    2- if yes, can you hint me on how to proceed ?
    3- if no, I'll just cry under my bed in a fetal position :)

    thx for your help
    Chris
     
  30. Workaround-Games

    Workaround-Games

    Joined:
    Oct 26, 2015
    Posts:
    3
    Hello, I`m having the exact same issue in a scene that we have been working for a couple of months already (with weekly bakes).

    This last saturday, this same issue started happening here, and i`m at a loss on what could be causing it.
    Have even tried rolling back our repository, but still got the same error.

    I have already tried clearing bakery data, removing _tempScene folder, clearing baked data in the lightning window, reinstalling bakery. But nothing works.'

    Another thing that i noticed is this new warning after the render finishes:
    "The loaded level has a different lightmaps mode than the current one. Current: Non-Directional. Loaded: Directional. Will use: Non-Directional. UnityEditor.Lightmapping:Internal_CallCompletedFunctions()"
    But i did try to render with directional mode None (we use SH with bakery Shader) and it did not solve the problem.

    Can anyone shed some light on this issue?
     
  31. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,202
    I´m interested in upcoming features (roadmap).
    Something interesting to share with us?
     
  32. Firewalker

    Firewalker

    Joined:
    Mar 30, 2012
    Posts:
    34
    Things in the middle are not throwing shadows on the floor.. did you make them static? Why there are lit like they are real-time?

    Looks like you are using bakery light mesh on a light and not on a mesh. I'm not sure it will work on a light. Also intensity of 2 on the bakery light mesh is to small.. you need to go much higher..
     
  33. Gafda

    Gafda

    Joined:
    Mar 9, 2014
    Posts:
    5
    Light mesh can be used with AreaLight (https://geom.io/bakery/wiki/index.php?title=Manual#Bakery_Light_Mesh), I am using AreaLights for this scene.

    Objects in the middle of the scene are dynamic and they use light probes. If I increase the intensity of the Light Mesh component, dynamic objects are brighter than they should be.

    I have always used an intensity of 2, so, maybe something changed inside the bakery plugin (or Unity). What value should I use ?

    For instance, I baked the scene with the following values :
    - Intensity = 4
    - Indirect intensity = 4
    - GI Bounces = 1
    bakery_4_intensity_component.png

    Results are the following :
    bakery_4_intensity.png

    I will try with and intensity of 10 to see if this is better.
     
  34. Firewalker

    Firewalker

    Joined:
    Mar 30, 2012
    Posts:
    34
    I never use Indirect intensity (more than 1) - it is unnatural. Your floor is pretty dark so there will be not so much light reflected from it. Anyway, I'm not sure I understand what exactly do you expect to get? If the room is too dark, increase the intensity. For neon lights, I think we used 40-80.

    Maybe Frank can shed more light on the bakery light mesh intensity formula.
     
    guycalledfrank likes this.
  35. Flow-Fire-Games

    Flow-Fire-Games

    Joined:
    Jun 11, 2015
    Posts:
    257
    Hey, we just got the asset with the preview as well on HDRP
    The previews show fine but then the bakes are always black or are not shown. In the scene baking preview you see a baked shadow but it is then not displayed and it just has no shadow in the viewport. We tried the default lit shader. Does this need some special shader tinkering?

    We checked the documentations and some youtube videos but both of us can't find a solution - is there something we missed? There is no auto exposure enabled. The unity lightmapping works under the same scenarios. We also played with a bunch of settings.
     
  36. Flow-Fire-Games

    Flow-Fire-Games

    Joined:
    Jun 11, 2015
    Posts:
    257
    Here an image:
     

    Attached Files:

    • clip.png
      clip.png
      File size:
      602.2 KB
      Views:
      29
  37. Loards

    Loards

    Joined:
    May 2, 2013
    Posts:
    111
    I been working really successfully this couple of days, having great light and everything, really happy.

    Just found out a couple of problems.

    1) I'm not getting any GI from direct lights on Indirect mode, if I crank up the intensity and indirect intensity in the light like to 50 each, GI is barely visible.

    2) in the experimental tab, if uncheck the "export scene" to speedup the baking, always freezes at 16% or 27%.

    what might be causing this?
     
  38. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,383
    Weird! Can you show your script code?
    Are you sure you called LoadRenderSettings() before RenderButton()?
    Can you confirm it doesn't work properly on the latest github version too? I could fix something before.

    When Bakery window is in focus it tests if current settings in the UI are different from the ones in the storage. If there is a difference, the storage is overwritten with UI data. When you call LoadRenderSettings(), it should do the reverse: set UI fields and active variables to what's in the storage.

    Doesn't look completely dark, but I don't understand why the green floor looks unlit comparing to wooden floor. I think I can see baked lighting on the walls, but I'm not sure about other geometry. Are these non-static objects?

    Looks OK to me (except the unlit objects mentioned above), I can't say it's really dark. You can increase light intensity to get more fill lighting.

    Judging by the wall, the light is working. Just make it brighter, I guess :)

    Mac is not supported, sorry. Did you read the description? :confused:

    upload_2020-10-18_19-2-55.png


    I can do a refund for you, just send me your invoice number.

    The format itself (.hdr) is not a problem for Mac version of Unity. But apart of textures, Bakery also needs a few scripts to apply the lightmaps (because that's how Unity requires it).
    There are also no problems with these scripts on a Mac.
    However, there is one single problem you can encounter when opening a Bakery-baked scene on a Mac: xatlas unwrapping. If you baked a scene with "Unwrapper" (not "Atlas packer") option set to "xatlas", scene models will be unwrapped using external library, which is only compiled for Windows. Other machines opening this scene will need to have the library working.
    This option is disabled by default though, so if you didn't manually turn it on, you don't have to bother.

    So
    - Don't set Unwrapper to xatlas
    - Copy the scripts listed here to your Mac
    - Follow regular version control guidelines

    Are you trying to bake light probes? If you're in L1 light probe mode, they are baked together with lightmaps anyway; if you want to rebake them, you can do that too, but the temp folder needs to hold previous full render data, so it might not work if the last scene you baked is different.
    If you're in Legacy light probe mode... it shouldn't happen.

    This warning by itself shouldn't affect anything, you can ignore it.

    - I was using 3D volume baking extensively this year, so I really want to make it a bit more useful for people not having custom shaders. Having lighting in a 3D texture is extremely powerful for many effects and types of geometry.
    - In case you weren't following #devlog in Discord, Open Image Denoise support was implemented. It's a bit more intense comparing to OptiX, I can't say it's worse or better, just a bit different. Still awesome. And it doesn't depend on driver versions much.

    Large worlds are a challenge, and my own game world slowly became large enough to make it annoying, so you can definitely expect something to make such scenarios easier to manage.

    Probably incorrect light probe placement? Also is there any difference between Legacy/L1 light probes?

    Good advice ;)

    I'm guessing your exposure settings make everything too dim. Did you follow this advice?
    https://geom.io/bakery/wiki/index.p...ok_black_or_have_bad_quality_in_an_HDRP_scene

    Maybe your materials are too dark, so they don't reflect much? Or their shaders don't support Meta Pass?

    Does it print any error to console? Do you uncheck it after the same scene was successfully baked once, and you didn't bake any other scene after it?
     
    Last edited: Oct 18, 2020
    f1chris likes this.
  39. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    4,371
    can the lightprobes be modified at runtime? Think lava flowing locally, only dynamic objects need to show orange lit from below.

    with the builtin progressive light mapper i can do

    Code (CSharp):
    1. using System;
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using UnityEditor;
    5. using UnityEngine;
    6. using UnityEngine.Rendering;
    7.  
    8. public class ProbeChanger : MonoBehaviour
    9. {
    10.     public Color color;
    11.     Vector3[] _probePositions;
    12.     SphericalHarmonicsL2[] _bakedProbes;
    13.     SphericalHarmonicsL2[] _currentProbes;
    14.  
    15.     void OnEnable()
    16.     {
    17.         _bakedProbes = LightmapSettings.lightProbes.bakedProbes;
    18.         _probePositions = LightmapSettings.lightProbes.positions;
    19.         _currentProbes = new SphericalHarmonicsL2[LightmapSettings.lightProbes.count];
    20.     }
    21.  
    22.     void Update()
    23.     {
    24.         var probeCount = LightmapSettings.lightProbes.count;
    25.         for (int i = 0; i < probeCount; i++)
    26.         {
    27.             _currentProbes[i] = _bakedProbes[i];
    28.             _currentProbes[i].AddDirectionalLight(Vector3.up, color, color.grayscale);
    29.         }
    30.         LightmapSettings.lightProbes.bakedProbes = _currentProbes;
    31.     }
    32. }
     
  40. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,383
    You should be able to do the same, as light probes are stored in the same array and applied the same way.
     
  41. mutp

    mutp

    Joined:
    Oct 1, 2018
    Posts:
    54
    Hi Frank,

    How do I go about baking the reflection data of a prefab and saving it within the prefab? I'm looking to save both the lightmap (using the Bakery Lightmapped Prefab workflow) and reflection data of a prefab in the prefab itself, so I can dynamically load it in at runtime.
     
  42. Daniel-Lackey

    Daniel-Lackey

    Joined:
    Jan 26, 2013
    Posts:
    1
    Hi,
    I've been baking my scene with Bakery and it's been working great. Only, as soon as I started adding in light probes and reflection probes, I now consistently get this error message when I hit "Render" (screenshot attached). My bakes are now inaccurate and don't bake the entire scene. Any help troubleshooting this would be awesome!
    Captures.PNG
     
  43. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    4,371
    That's what I thought looking at the lighting interface baked tab but the attached script returns error of array out of bound and when I place a stop point in the code I see that all arrays in LightmapSettings are empty even though dynamic objects clearly get lit by probes (sponza scene)
     
  44. Augis1980

    Augis1980

    Joined:
    Sep 23, 2014
    Posts:
    42
    Hi, I figured OUT that this result: upload_2020-10-20_16-54-2.png is caused by mesh light component on areal lights.
     
  45. marenin

    marenin

    Joined:
    Sep 22, 2019
    Posts:
    7
    Yep.

    What it looks like:
    1.jpg 2.jpg

    What it should be with "correct rotation":
    3.jpg
     
    Last edited: Oct 20, 2020
  46. Luvrael

    Luvrael

    Joined:
    Sep 9, 2017
    Posts:
    10
    Hi,
    How can I reduce the darkness of shadows in shadowmask mode? The shadow is too black and I can't see anything in some places. When I increase indirect intensity in the light direct script then it improves a bit but the stones are too shiny.

    Is it possible to bake the lights with MeshBacked prefabs?
    It is baked with the same parameters on the Bakery settings.
     

    Attached Files:

    Last edited: Oct 21, 2020
  47. Karol_S20M

    Karol_S20M

    Joined:
    Oct 2, 2020
    Posts:
    3
    Hi guys, my current project is on fire (deadline) and now Bakery is giving me this error out of nowhere...I am now trying to open the project on another machine and I see what happens.
     

    Attached Files:

  48. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,202
    Found 17GB of *.lz4 compressed maps in C:\Users\Adminstrator\AppData\Local\Temp\frender

    What happens if I delete them?
     
  49. Luvrael

    Luvrael

    Joined:
    Sep 9, 2017
    Posts:
    10
    Hi again,

    I would like to have a baked light in my project and use light Probes on non-static objects (e.g. characters). I am using Advanced with shadowmask and L1. From what I read on https://geom.io/bakery/wiki/index.php?title=Manual#Render_Light_Probes, the L1 option bakes light probe in addition to the lightmap but the Lightprobes don't work for me. I am using Unity 2019.4.
    When I generate a lightmap with Unity then the light probes work (but baking itself is ugly) but using your asset I have better baking but I can't get light probes.
    How should I set this up for light attempts to work?
     
  50. firebom24

    firebom24

    Joined:
    Oct 23, 2020
    Posts:
    1
    Hi, how can I install the latest build of Bakery from GitHub? Currently having trouble getting even a simple lightmap bake to work and I think I'm installing it wrong.
     
unityunity