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.
Thank you for the reply and being awesome Frank
I'm sure this has probably been asked before but will Bakery support Open CL in the future?
Also I do have an old Nvidia GPU doyou think it might be possible to use that for rendering even if it's in a second slot?
I'm now having a problem where it will not render unless i disable half my lights. it goes through the whole process and doesn't throw any errors, but i end up with zero shadows. then i turn off half my lights, render, and i get shadows.
can't have more than 10 baked lights in my entire scene.... this is definitely not sufficient. am i doing something wrong again?
What does this error mean?
"Some shadow masks can't be baked due to more than 4 masked lights overlapping. See console warnings for details".
It says to check the console, but I don't know what I'm looking for there.
you're looking for yellow triangles separated by normal messages. there'll be a sequence of them. it'll say something like "assigning (light name) to channel number #"
look at what light is named, and check it. you'll see that it is overlapping a few other lights.
I did some experiments with this, and it will bake more than 4 lights overlapping, but the warning refers to the amount of channels available to shaders. it should apply only to real time or mixed lights.
I've found a bug that crashed my Unity while doing a bakery lightmap.
Ok, so this one scene I've baked a lot of times without any issues, but this time I tried baking with L1 Light Probes to see if there would be any difference. I got those errors:
Seeing as I've previously baked this scene multiple times I don't think this is a regular memory issue (probably?)
Do you have any idea what I could do here?
There is a memory check option in the render page. You mark it on, then try to bake, and it does a check to see how much you need and asks if you want to proceed. If it is a legit memory problem, presumably it will say it there too?
Having an out of memory issue, even though there is still plenty of free memory available. It happens about 70% of the way through the bake of a fairly simple scene. Standard 3D scene (not hd/lwrp) using 2019.1.7. Just a single room with a few doors, table, barrels. No probes. Basic materials in the scene, no advanced shaders of any kind. Scene and project are fresh no other addons. The scene was created just to experiment with bakery. Autogen lights disabled on unity light settings and cleared bakemaps before using bakery.
Several lights in the scene (torches) and one bakery skylight. No directional light. Indirect and Shadowmask being used, all lights set to this via bakery Baked Contribution. Verified this by using Light Explorer to check each. Bakery component set to match the realtime light on each. Linear fix button pressed. And, also set shadowmask on the advanced render options. Dominant direction being used. 100 texels per unit. Everything else on defaults.
I hit the checkbox before I pressed render to check memory and it said no problem so I continued.
Here is the console error log:
Error: Unknown error. See .ftracelog.txt for details. (1)
<RenderLightmapFunc>d__218:MoveNext() (at Assets/Editor/x64/Bakery/scripts/ftRenderLightmap.cs:4923)
ftRenderLightmap:RenderLightmapUpdate() (at Assets/Editor/x64/Bakery/scripts/ftRenderLightmap.cs:3227)
Here is the tail of fracelog.txt:
Loading additional lightmap: SampleScene_LMA8_diffuse_HDR.lz4
LM is half
Loading shader lmTexGI.ptx::oxMain...
Loading shader lambert_tex_gi2.ptx::oxMain...
Loading shader shadow3.ptx::oxMain...
Loading shader trimeshTex.ptx::intersect...
Loading shader trimeshTex.ptx::bbox...
Used host memory: 0mb, available GPU memory: 6528mb
Used host memory: 0mb, available GPU memory: 6528mb
Num passes: 3
Num tex: 3
Skipping pass LDR
Skipping pass HDR2
Used host memory: 0mb, available GPU memory: 6528mb
Launch 8x8 tiles...
Error (1282): Memory allocation failed (Details: Function "_rtContextLaunch2D" caught exception: Out of memory)
I baked a scene with some meshes. (they all have more than one sub meshes)
Then I uploaded the results to other PCs (SVN).
However they didn't get correct results. Light maps just messed up.
(Without using Adjust UV Padding)
Then I pick one mesh and combine its sub mesh (remain only 1 sub mesh).
After baking and uploading again, the other PCs get correct result on this mesh.
Seems bakery not worked if mesh contains more than one sub meshes.
Or is there something need to be cared about when we use more than one sub meshes?
Not currently planned.
Depends on how old it is. Do you know the exact model name?
Weird. Probably yes. Are they all shadowmasked?
The amount of baked lights is unlimited.
Read more about shadowmask mode and its limitations: https://docs.unity3d.com/Manual/LightMode-Mixed-Shadowmask.html
Console warning messages should tell you which lights overlap (e.g. "Light Light001 can't generate shadow mask (out of channels").
Right now it's necessary to first bake the lightmaps for the same scene before baking L1 probes. Check if it was the case.
Any screenshot of that scene? Polycount? Could it be that you used an extremely high value for GI samples?
I don't think that's the case. Try this:
1. Add the attached file.
2. Make sure "Adjust UV padding" is disabled everywhere (you can even make it a default setting now, Bakery->Utilities->Save settings as default).
3. Select all problematic assets on the baking machine.
4. Click Bakery -> Clear asset meta. This will remove all previously written additional UV-related metadata..
5. Just in case, do 3 and 4 on other machines as well (you won't need to do it ever again, just this time).
8. Should work.
yes, they are all set to indirect and shadowmask.
it behaves this way even if i disable all objects in the scene except for one cube and one sphere that i have been using for testing purposes.
in the scene i have been testing it with today, i can only have 8 lights enabled before it ceases rendering shadows. I don't really understand what it could be. there are no error messages .
Are you using forward rendering? Can be Unity's light limit:
good thought. could have been that, but i set it to 30 and it is still doing the same.
I don't know if this helps at all
actually it's helped me a little to see what's happening. when i turned off one of my lights, it was fine. it was creating a 'lighting data asset'. then when i turned the light back on and rendered, it failed to create this 'lighting data asset'.
I'm testing a LWRP project and just encountered an issue with the lightmapped prefabs. If the prefab is enabled in the scene by default it works well, but if the prefab is disabled at startup and enabled later the lightmap is messed up :
This is the same prefab on each row, but on the left it's enabled at startup and on the right couple of seconds later.
Any idea what's causing this?
I think this Lighting Data Asset may be getting malformed somehow when it is being written. I say this because it is not being recognised by unity as a valid asset file. I opened it in wordpad, and i tried the debugger and looked at the data being written, but i can't figure out how to read it, there is a lot of hex data that doesn't translate into text in monodevelop. I can't think of any other ways to try and read the data. I've put it in google drive here https://drive.google.com/file/d/1brjNOtEpDUaebk8saYODvxGtqCBmjnXA/view?usp=sharing
Hmmm, maybe. I did bake quite a lot of shadowmasked scenes in 5.6, but I could miss something. On Unity 2017.3 and older I rely on manually generating (completely undocumented, reverse engineered) binary data for lighting data assets (see here). On >2017.3 this isn't necessary, because Unity added proper API to set shadowmasking options at runtime. The best option is to update, I think.
Not really, but will test this.
there's a problem with that. last time i tried updating my unity version, i ended up with hundreds or errors and it seems like it's unrealistic for me to try again. I guess i may be stuck with this issue then. clearly, you've already done a ton of work to try and solve this in the past, it doesn't seem realistic for you to do more work on that. I can understand what a nightmare that kind of work is.
edit: i upgraded to 2017.4, as my previous attempt was to go to 2018.1 ...
no major issues so far, apart from some minor errors from deprecated features. light baking is going well after first test so it may be all golden from here.
We have a very strange problem:
When baking a more complex single model, two objects that are close to each other may have strange black baking errors at the edges.
But if I split this wrong place into two separate objects, the baking result will become normal.
This problem can occur on two objects that are very close together.
If we take apart the two objects, or use the Unity default renderer to bake, there is no problem.
@Loards have you reported the issue? Can you somehow still reproduce it?
@guycalledfrank I've fixed a bug recently that would prevent the updater to run (https://issuetracker.unity3d.com/is...th-skipupgradedialogs-command-line-argument); this may be related.
Notice that Unity Hub was launching Editor with the command line argument mentioned in the issue. There was 2 issues related to this; the one linked above and another one in the Hub which has been fixed in version 2.0.1.
If you ever get a report of ApiUpdater not running please fill a new issue (or send me a message).
would it be possible to get an
HDRenderPipeline/Bakery Layered Lit (HDRP 5.16.0)
SH Mode is really missed here.
Once you get used to it s hard to live without.
Non-Linear Light Probes and Bicubic Filtering for Lit and Layered Lit would be nice.
Did the same recently I like it so far, it has a proper baking API and Playable API for animations, while MSAA is still unbroken.
Can you send me any example model for testing? Hard to guess what could happen from images.
That is super cool. Thanks! I was really puzzled. Given I never installed the Hub explains why I didn't notice the problem.
I'll put more work into HDRP after it's finalized. For now even a minor version update breaks my shaders.
I'm still not sure why that happens. Can you reproduce it on my example_prefabs_assembled scene? E.g. disable all prefabs, play, enable at play time. Seems to work.
In any case, also try calling this after the prefab is loaded, it should re-assign the lightmaps:
var data = prefabGameObject.transform.Find("BakeryPrefabLightmapData").GetComponent<ftLightmapsStorage>();
var data = prefabGameObject.transform.Find("BakeryPrefabLightmapData").GetComponent<ftLightmapsStorage>();
"I'll put more work into HDRP after it's finalized. For now even a minor version update breaks my shaders."
Oh noo. Than i am old.)
I did a 3 months HDRP pause too.
When time have a look on the the new light intensitys and HDR Sky. I get strange results. To dark dark bakes. Think the new intensity values must be new interpreted.
To have it work again with a HDR Sky and one Directional LightLight would be cool.
Directional lights should work perfectly in HDRP, or at least they did in HDRP 5.13. Check if example scenes work (example_lights sources should look just like real-time after you click Match).
GTX 670, I've now got a GTX 1060 to replace my RX580 because I need CUDA for rendering on 3Ds Max as well. Anyway similar question, is it possible to use both cards? combine all those CUDA cores together?
bakery has destroyed my ambient lighting? how do i restore it? I have disabled all bakery components and cleared the baked data. my ambient light still does not work. (this could be something to do with my custom shader, but it would be useful to know what bakery does for the following ) what did bakery do to change the lighting models on my objects and where do I look to make adjustments to this. I'm wanting to try some experiments but I need a starting point. I need to restore my scenes to what they were. I also need to figure out a way to get the ambient effect i want, because the 6 light suggestion in the faq does not work well, it causes a 6 way falloff pattern, it's not flat and uniform.
It's not that bad. I know a guy who even used GTX 650 successfully to bake high quality interiors.
The amount of VRAM will limit the size/complexity of the scenes you can bake, but it's still usable.
Yes, it should work, but note that if you don't have NVLINK, the card with the smallest VRAM amount will define memory limit: https://geom.io/bakery/wiki/index.php?title=FAQ
Unity disables realtime ambient lighting if lightmaps are present. It should still affect dynamic non-lightmapped objects though.
Try clicking Update Skybox Probe to refresh global ambient data.
Since you're using a custom shader, you can just add additional flat ambient there?
it's acting very weird for sure. I feel like it's broken somehow, but if there was something that bakery did then you would have said so, so it's something else.
I did try playing with my shader and got a lack of detail with the ambient effect so I gave up for a bit, but I should go back and do more because I think I was just adding to the wrong variables. I didn't name them very well XD
Thank you Frank.
Hello, i have a problem with Bakery suddenly dissapearing from the menu in my Unity project, even tho i worked with it in the project up until now, baked lightmaps, etc. but now it's gone, and i can't rebake. I tried deleting the plugin and reimporting, but it doesn't help
I do get some console errors of the lightmapper being obsolete , posting a screenshot of that below
I am using unity 2018.3.7f1
My bet is still that "Update skybox probe" should help
Are you sure you weren't using a different version before and you didn't reimport Bakery?
Also if you're using Unity Hub, it seems like there was a bug, preventing API updater from running: https://forum.unity.com/threads/bakery-gpu-lightmapper-v1-6-released.536008/page-63#post-4668227
General info: https://geom.io/bakery/wiki/index.p...2.80.9D_and_.E2.80.9CUnityUpgradable.E2.80.9D
If you can't make Unity API updater to work, try manually replacing things mentioned by the error (e.g. replace "Radiosity" with "Enlighten", etc).
Updating the launcher and then reimporting Bakery worked, thanks
The problem picture ,model and parameter settings
I think the problem is with Generate lightmap UVs. If I check this option, the problem will be much more serious.
Test scene in the attachment
[QUOTE="Source-technology, post: 4680266, member: 1223637"I think the problem is with Generate lightmap UVs. [/QUOTE]
yes you have many UVs that are tightly packed on top each other in the models
20 Tips to Speed Up UV Mapping in Blender:
01:13 - Tip 01: Generate UVs
01:59 - Tip 02: Mark / Clear Seam & Unwrap Shortcuts (Edit Mode / Ctrl + E & U)
02:55 - Tip 03: Smart UV Project (Edit Mode / U → Smart UV Project)
04:48 - Tip 04: Project from View (Edit Mode / U → Project from View)
05:20 - Tip 05: Live Unwrap (Edit Mode / Tool Shelf → Options → Live Unwrap)
05:53 - Tip 06: Tag Seam (Edit Mode / Tool Shelf → Options → Tag Seam)
06:40 - Tip 07: Keep UV and Edit Mode Mesh Selection in Sync (UV/Image Editor → Header)
07:59 - Tip 08: Mirror Seams (Edit Mode & Edge Select / Shift + G → Seam / 3D View → Header → Select → Mirror)
09:16 - Tip 09: Changing Island Margin (Edit Mode / U → Unwrap / Operator Panel → Margin)
09:40 - Tip 10: Changing Unwrap Method (Edit Mode / U → Unwrap / Operator Panel → Method)
10:35 - Tip 11: Island Selection (UV/Image Editor → Header → Island Selection)
11:29 - Tip 12: Protect Islands (UV/Image Editor / P & Alt + P)
12:27 - Tip 13: UV Sculpt (UV/Image Editor → Tool Shelf → Options → UV Sculpt)
13:22 - Tip 14: Show Stretching (UV/Image Editor → Properties → Display → Stretch)
15:32 - Tip 15: Average Island Scale (UV/Image Editor / Ctrl + A)
16:02 - Tip 16: Live Unwrap (UV/Image Editor) → (UV/Image Editor → Tool Shelf → Options → Live Unwrap)
17:21 - Tip 17: UV Grid Texture (UV/Image Editor → Header → New)
18:37 - Tip 18: Multiple UV Maps (Properties Editor → Object Data → UV Maps)
21:36 - Tip 19: Draw other Objects (UV/Image Editor → Properties → Display → Draw other Objects)
22:37 - Tip 20: Texture Atlas Addon (Properties Editor → Render → Texture Atlas)
24:07 - Tip 21: Selecting Islands in 3D View (Edit Mode / Face Select / L)
NOP, I just found the bug, It cause by smoothing group.
I`ll post here sooner
Hey @guycalledfrank, me again !
This time i have a weird issue in a small scene. Well, here's a pic before details :
Here you see, i got a totally black scene, at least for the static objetcs (except the 2 exceptions).
Light probes work fine and so the dynamic objects render properly.
The room is enlightened by an area light and a point light, both baked (and the skylight).
My coworker has exactly the same problem on other projects.
unity version : 2018.4.2f1 (but got the same issue on unity 2017)
bakery version : (last on date) 1.6
I tried lot of different parameters but still stuck on this. Have you seen this issue before ?
After checking my coworkers project, it appears that it was just a bad lighting setting, nothing like my issue.
I tried on a small test scene and it works fine. So i just got it on my main scene (as usual)
[QUOTE =“guycalledfrank，post：4672400，member：275716”][/ QUOTE]
We just reappeared and accurately located this error, and why.
As shown below, when the normal of this face may not be flat, Bakery will cause calculation errors and is 100% recurring.
If we use the Unity default baking tool, or remove all smooth groups, we can eliminate the error.
So we think that Bakery may have some problems when calculating normals.
The attachment is a model that will definitely go wrong, with AB comparison. You can test it yourself.
I hope to fix this bug, thanks.
Guys, I'm a bit late to this party and about to only start with Bakery
Does it work with:
Unity Beta 2019.2
Unity Alpha 2019.3
Does Bakery still beat any built in Unity lightmapper? Even the current GPU lightmapper they are working on?
Apologies in advance for the newbie questions
Bakery can have problems when vertex normals do not match actual geometry too much. This (and the solution against it) was explained in my blog post. In short, what you're seeing is the result of this:
Smooth surfaces have their sample points pushed away a bit, to represent their "actual" smooth shape, but when that imaginary shape intersects other geometry, it gets flattened.
It was the best balance I could find so far, and it does work in many cases. In your case, however, it doesn't seem to be an ideal solution.
I've just added an option to disable sample position adjustment, if you want to, and disabling it seems to produce better results on your model. You can get it from this github branch.
(If you see 404, you can auto-add yourself to the repository here).
So wait, does it work now or not? It's hard to guess what could happen. Do objects from this scene bake in other scenes? Do lights from this scene work somewhere else?
Latest version I tested was 2019.1.3f1, so can't guarantee. But I would be surprised if it broke completely.
Barkey has a very AWESOME baking quality. I hope this option can be checked on the per object and global option in the next version.
PS: I saw someone saying that the indoor light intensity is too low. This is a problem that the GI renderer has encountered. Both Vray and Mental Ray have encountered that sampling is hard to hit in this small window unless the sampling is high enough - but it wastes a lot of rendering time.
The practice of Vray and Mental ray is to add a type of light called "light portal", just put it in the window. He will be responsible for generating samples that illuminate the indoor scene, but his intensity and color depend on what kind of ambient light Light Portal receives.
Unreal also uses the same way
Doesn't work, but forget the "my coworker has the same issue" part.
The same objects do bake correctly in other scene, which makes no sense because i made the same scene than previous one and it works.
This still forced me to remake all the scene and costs me some time, so i'd like to know what is the problem in the first scene (which still doesn't bake correctly) and how to avoid it.
Anyone ever experienced errors saying "Object was destroyed mid-export"? How do you reproduce that? I get some reports of that occasionally, but haven't seen it myself. This error will happen if some object was present when you hit Render but disappeared a few moments later (before scene unloading). Certain Unity version bug? Third-party scene management assets? Procedural geom?
@Toylips in particular was complaining about that.
I though about adding these, but surprisingly, even without them interiors seemed to be pretty good (see ArchVIZPro scene). Arguably that scene had rather large windows. Will try to add portals in future updates.
Sounds like a mystery. Does anything at all bake in this scene? Any primitive?
Apparently these two boys do bake everytime. Well.. They don't really have a perfect render, i know, but at least they render something.
Just tried adding some cube and other primitives but they're all black. All probes are black aswell.
Just started off a bake to test 1.6 with HDRP/2019.1 as I head home, only issue so far is some obsolete stuff in 2019.1 (the enum for the lightmappers is now Enlighten, etc rather than Radiosity)
Tomorrow we'll find out if it worked!
Oh, feature request by the way: Option to sleep PC after completing the bake, gotta save those electricity bill pennies.
EDIT: IT WORKS! We are finally free of the tyranny of the buggy GPU lightmapper.
A cursed scene. Interesting. Given it's black even with a few boxes, can you pack it up as unitypackage and send to me? Will take a closer look.
Sounds a bit risky if you accidentally leave this option when you don't need it
What I can do instead is a "bake finished" event you can subscribe to from your scripts. You'd able to add any logic there.
Tried to bake it again before sending it to you, looks like it works now.. Man i don't get it, i didn't touch the scene since it was all black. Baked like 20 times, restarted unity, the pc, multiples times, and it did nothing.
Now the scene bakes normally haha
That works! You could just have it disable the option when done of course So it's just a volatile setting.
All going well so far, thanks for all the updates. I'll give remote baking a go soon, but right now everything is baking so damn fast I don't need it.
In short: Bakery is significantly better than the Unity GPU mapper. Hands down. Even with my 1080 Ti Unity's mapper doesn't have the necessary optimisations to let me do 4096 maps but Bakery doesn't care one iota.
Suddenly i get this error when trying to render the light probes as always in the same project.
.ftracelog.txt shows this on the bottom:
"Error (-1): Unknown error (Details: Function "_rtContextLaunch2D" caught exception: Encountered a CUDA error: cudaDriver().CuMemcpyDtoH( dstHost, srcDevice, byteCount ) returned (719): Launch failed)"
Any idea what could be happening?
Try baking lightmaps first, and then the light probes. Also, are you using regular light probes or did you select L1 mode?
Today we encountered this problem:
And we check the log:
Tile size: 4096
Used host memory: 0mb, available GPU memory: 5764mb
Loading additional lightmap: probes_diffuse_HDR.lz4
LM is half
Loading additional lightmap: Sanfrancisco_LMA10_diffuse_HDR.lz4
Can't read lightmap for GI: Sanfrancisco_LMA10_diffuse_HDR.lz4
Seems the problem comes from MODE: texgiprobesh.
How to solve this~?