A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Assets and Asset Store' started by guycalledfrank, Jun 14, 2018.
Yes exactly, that would be perfect!
will this be in next update ?
I just tried again my scene and this time the export could finish, for sure the first time I got an error but I couldn't repro it.
Now baking that scene is still kind of slow because of the export process being rather long, I don't know if this is due to the fbx containing a lot of objects.
In case you see "Adjusting UV padding" taking a long time - it only happens once after the model is imported. Here is a long explanation of what happens: https://forum.unity.com/threads/bakery-gpu-lightmapper-v1-4-released.536008/page-22#post-3771211
- It's not a part of the lightmapping process, but a preparation step that is called only ONCE for every new model and if resolution was changed. Rebaking without changing the resolution or modifying the model won't make it happen again. This option can be disabled in advanced settings, but you can get some lighting leaks (which you would get anyway with builtin lightmappers).
- It's slow, because it uses Unity's own (slow as hell) UV unwrapper (https://docs.unity3d.com/ScriptReference/Unwrapping.GenerateSecondaryUVSet.html).
Other scene export steps shouldn't take that long (but they still can be optimized...)
The GPU Lightmapper is amazing. For our very complex scene it just takes an hour to render, with the Unity Progressive Lightmapper it takes more than 14 hours.
But we have one strange issue with some white flickering edges, this just appears with the bakery Lightmap and MSAA enabled. (non directional)
I saw things like that before. If you build for DX11, you can fix it in the shader by adding centroid sampling for the lightmap UV interpolator (so e.g. if it was TEXCOORD1, it should become TEXCOORD1_centroid). I'm not sure if there is any other way, and built-in lightmappers aren't immune to it as well.
The reason is the way MSAA extrapolates data from vertex shader, potentially making UVs go slightly out of bounds.
You can use Unity Cache Server with local Mode. This help to reduce "Adjusting UV padding" time...
Hello, I seem to keep getting baking errors and it wouldn't let me bake my scene. I have successfully baked multiple times before, but I don't know what's causing these errors now.
"ftrace error: -1073741819"
and sometimes it's "ftrace error: 921"
Answered in PM
I have noticed lightmaps get broken on the same FBX meshes that have been baked on multiple different scenes. The last baked scene is the only correct one. Problem remains even if I make lightmaps output folders for each scene.
The reason of that is UV padding adjustment. It tries to optimize the UVs for the resolution used in the currently open scenes you bake, but it doesn't known about the same model being used in other scenes. Models have only one set of lightmapping UVs, and so it happens.
a) Disable "Adjust UV padding" in advanced settings. Won't mess with UVs at all. On the other hand, unmodified UVs may be not optimal. This is what you get in Unity using built-in bakers anyway.
b) Have 2 separate models for different scenes. They will get differently optimized UVs for different resolutions.
c) Use Lightmap Groups and make sure the model is always baked with the same resolution in every scene.
Hi! Is there something with Bakery that could cause this issue?
I've got an main scene, with a bunch of additive scene's loaded. They baked together fine. Now I clear the lightmaps using the Unity lightmaps tab so it's no more lightmap in my scene. I'm doing this because I'm building a different assetBundle for low memory devices that can't handle lightmaps, so they will just have no lightmap. Anyways I saved the scenes with no lightmaps. But when I reaload it, all the lightmap comes back. I can't get rid of it. I don't want to delete the lightmap files as those are for a different assetBundle.
Unity's clear button only works for built-in lightmaps. What you need is Bakery->Clear Baked Data.
It only clears lightmap references from currently opened scenes. It doesn't delete any files.
Hey again Mr. F, I've noticed an ?issue? when working with area lights. If they are parented and said parent has a scale lower or higher than 1, Bakery multiplies the width or height of said area light per the parent scale. I noticed that when some of my lights went 'out of room'. It's not that much of a problem, I just took the lights out of the parent (broke my prefabs tho) but you may want to check it.
Also a question, is there any way to set the default settings of Bakery? I'm tired of changing them every scene, especially when I forget to set the temp/path and it floods my C: hard drive.
Ah yeah, that seems like a bug - thanks for reporting. Gonna fix it soon.
You can currently try doing it by modifying ftLightmapsStorage.cs. All default variables start with "renderSettings".
The plan is to add presets you can save as assets and plug into settings.
Hey I am also getting that error, any idea how to fix?
Apparently it gets stuck around here (I'm just relaying information from my artist)
This is the error that it seems to hang on
I anwered raepadua in PM because they sent me more details about the error and the settings used.
What you get looks like a different problem, and I don't really see why it can happen. I don't see anything particularly suspicious on the line on your screenshot. Are you on the latest v1.4? Does it happen on other scenes? Is there some specific object that causes it?
Thanks for your fast answers!, great support.
I managed to fix the previous error that turned up after updating, i infact changed the temp path to another disk and
my antivirus didnt like that (ransomware protection didnt allow file access outside of the temp folders)
I do however have another error in another scene, this error isnt new, its happening since the first time i used bakery on this scene. disabeling all the static object leaving just a new cube object fixes the problem.
how ever, logs say nothing about which object is causing which errors.
any help would be greatly appreciated.
A possible reason is that you have way too many GI or Skylight samples (>64) or Light Mesh samples (near > 64, far > 4096). Similar errors seem to occur when you hit certain hardware limits, but because the exact number seems to vary between machines, I wasn't sure what limits to put in the UI.
I think I'm ready to get Bakery - as long as prefabs are fully working (with light probes, etc...) and easy to use for procedural levels.
Hey, I've found a way to get Enlighten's Real-time GI system to play well with Bakery's lightmaps.
Here's some proof to go with my words.
The steps to get this working are as follows, and really simple.
1) Edit the Bakery script that disables Real-time GI so that it no longer disables it. (Line 452 of "ftLightmaps.cs")
2) Bake with Enlighten, and make sure Real-time GI is enabled. (This is only to get the Realtime Lightmaps in place, I personally baked with extremely low settings so that it finished in about 15 seconds).
3) Bake with Bakery to get it's very nice high quality lightmaps.
You now have Real-time Enlighten lightmaps working alongside Bakery's baked lightmaps.
If there is any way we could get this functionality added to Bakery to have it do these steps automatically, that would be amazing.
Real-time GI is great, and can be used for a lot of neat things - it's especially helpful for VR, since we can't have too many real-time lights, as VR is primarily done in forward rendering.
Ah looks like the issue was simply that we had an !ftraceLightmaps gameobject in a sub prefab that was breaking things, removing that fixed it
Lightprobes work as they normally do in Unity, and that means you currently can't put them in prefabs.
Pretty cool. I'm gonna try it myself and see if I can add an option.
It's so hard to find ways of lighting procedural levels. And I don't know much about Lightprobes.
Unity intends to replace the existing probe system anyway, and that can't come soon enough.
So i generated lightmaps on my windows machine & had them published(bakery generated lightmaps only) to the cloud so I can apply them to the project version on my MAC. I published the lightmaps first, followed by the scene. However, the lightmaps are missing on the model in the scene. I couldn't come across any 'lightmap data asset' to publish - published the lightmaps only. Am I missing something?
Currently apart from the scene and the lightmaps, you need to send all .cs scripts and ftGlobalStorage.asset to another machine.
But I removed many cross-dependencies and the need for the asset already, so should be easier after the next update
Hey just wanted to say thank you for this Asset. Haven't really done anything 3D releated for a few years now and just started to get back in Unity again while i eagerly wait for my Pimax Kickstarter HMD to arrive. I am a hobbyist only so i don't know much about lighting... just reading into it an trying stuff. I made this little personal project and i thought it came out quite ok.
Performance wise this sure is a nightmare and any real GameDev and lighting expert would say i can't do that but hey as long as it runs who cares.
This is my very first Game engine interior scene so this is new terrain for me and i really got frustrated waiting for the first Unity bake to finish only to find out it looks like crap and i had to bake and wait again.
It still looks like crap but thx to bakery i can improve much faster because instead of 1 or 2 hours for the bake to finish i am down to a few Minutes.
Hi - updated to 1.4 and are trying to get large scenes to bake.
If we just bake lightmaps, then load that on another computer (via P4), all lightmap links are lost. Just baking the lightmaps doesn't create a Lightdata asset... should there be one? Baking lightprobes will create the asset, and then lightmaps show up on other workstations.
Though, we've never been able to get reliable results with a team setup (ie. More than 1 person on the project and more than 1 PC needing to sync data). There'll always be some object that comes through with 'busted' LM Uv's.
This is the result from the PC that baked the lightmaps (ignore the white tree's, they use unbaked LightProbes). The entire map baked perfect, there is never an issue and I turned off (in the bakery source) unwrapUV's so as to avoid Bakery touching the assets (I assume?).
This is the result on other PC's once they sync (using P4). This particular building looks like it has busted UV's or is indexing the wrong texture. In the Mesh Renderer, the BakedLightmap maintains the same hashes and lightmap index.
How are other peoples experience with this? Are other people using this in a collab environment (multiple users on the project synced through version control?)
Nice, looks pretty clean!
Yeah, it's now mentioned in FAQ - you need to also send ftGlobalStorage.asset and scripts to another computer.
However, I recently managed to remove the need for this asset as well as for 80% script files. If you're interested, I can send you a beta. Basically should remove all syncing problems.
The lighting data asset is an opaque blob I can't modify, so Bakery doesn't rely on it and instead stores data elsewhere. Probes use it though, as it's the only way, and there is at least partial API to change them.
Most Bakery data is stored in the scene itself. Lightmaps are applied via script. UV padding adjustment data is in the global storage asset (this one will go away in the next version).
Long explanation of current behaviour is in this post: https://forum.unity.com/threads/bakery-gpu-lightmapper-v1-4-released.536008/page-22#post-3771211
I’ve very interested in using / purchading Bakery.
Can Bakery solve issues with seems? I’ve attached an early go at light mapping one my scenes and seams are one of my biggest issues.
You mean this one? It's surprising there is even a seam. Maybe the lightmap resolution is too low?
Bakery has multiple tricks to fix various causes of seams, so yeah, maybe you should give it a try.
Yea...it’s my biggest issue...well that and lightmap size. I’m currently using shadowmasks and they tend to be on the larger size.
Bakery 1.4 supports different size for indirect and shadow masks by the way. So you can have high-resolution masks, but lower resolution everything else.
Sounds awesome...will give it a try. Thanks;
One last question, does this asset require a lot of setup to use.
Just curious about the workflow.
Not much. You will need to add Bakery light components to your lights and press the "match to real-time" button to copy settings from standard lights. Also note that ambient lighting comes from the Skylight component, not the Lighting window settings.
Hi, I wonder if this is a Bakery issue or Unity issue. So I bake all my 3000 scenes together via multi-scene editting. The first "master scene" loaded in the editor is the active scene and always loaded in the game. there are always only the master scene + 9 scenes loaded in the game(it's a streaming world), not all 3000 scenes at once. It would make sense if only the lightmaps used by the 9 scenes are loaded at any time. This is also what Unity's Doc says: https://docs.unity3d.com/Manual/MultiSceneEditing.html
However it seems to me that all the lightmaps are stored in the "master scene" and when I load the master scene it takes a long time to load as it loads all the lightmaps into memory even though they are not used.
So yeah, I wonder if this is a Unity bug or Bakery! Thx!
Seems like Bakery issue. Thanks for reporting - will investigate.
I've been experimenting with Bakery 1.4 for about a week for a large outdoor scene (historical reconstruction of a section of Palmyra). I've been able to get great results with Bakery on smaller test scenes but when I try to bake my primary scene (see below), it keeps crashing during the alpha buffer export.
I saw on the forum that that was an earlier bug--any idea what I should be tweaking to fix this?
Here are my settings. I'm only using a directional light with the Bakery script attached plus a couple small point lights:
10 texels per unit might be a bit too much for this map. Can you try setting it to 1 and see if it prevents the crash?
Thx so much! If you don't mind letting me know once there's a patch for this that I can download(even if it's not official released yet) that'd be great! As I'm near a beta release soon.
I'm getting the same issue, it was baking perfectly before, I tried with and without a directional mode but I'm getting the same result.
It seems like this issue can happen if you bake a scene with already baked prefabs (this is not possible at the moment - either you do a full scene bake, or you bake separate prefabs and then assemble a scene from them).
What do you mean by baked prefabs? Because it is not a particular baking scenario for this scene and we are not using prefabs.
Make sure you don't use any insanely high sample values for GI/Light mesh/Skylights then. I'm not aware of any other remaining reason for crashes. If sample values are fine, try replicating it on a smaller scene and send it to me for debugging.
Yes - actually everything is versioned (Bakery folder, Editor folder... etc) except the local storage which is on an ignore list as per earlier suggestions.
Thing is, if we re-import the building, it sometimes fixes it. Or if we delete it and re-export from 3dsMax with a different name, so its a new asset, it can also fix it.
But it's unpredictable how your scene will look once someone syncs on a different PC. A full, verbatim, copy/paste of the project from one PC to another (ie. over USB stick) has no issues at all.
Hmm, ok... so here's the process we use.
- Open a scene
- Press 'Render' in the Bakery window
- Submit changes (Lightmaps, Scenes, Bakery global storage if its changed)
- Sync on another PC
- Observe that no lightmaps display (pitch black for a static scene)
...baking Probes generates the lighting data asset, and only then will Bakery lightmaps show up on another PC.
Do you have a process you (or others reading this) use to get reliable results in an environment using version control?
If models are still not okay even with global storage, try reimporting them.
Everyone: feel free to ask me for a beta patch where all the version control stuff should be fixed. I'm hoping to release it shortly on the store, probably in a week.
Thanks - tried this and I'm still getting the same crash. I was able to bake this scene the first time I tried using the default settings (with 20 textels per unit I think). The scene was too bright so I had to try again but it's failed every time since.
Not sure if it's related but it also crashes if I try to force GI VRAM on.