guycalledfrank / bakery-issues

Bug tracker for Bakery
4 stars 0 forks source link

Baking fails consistently when scene includes a certain mesh #156

Open Creepypie opened 11 months ago

Creepypie commented 11 months ago

Hey, I'm having issues with a certain mesh. For some reason, in a specific scene, it fails baking consistently. This doesn't happen if I remove the scene (I bake a group of connected scenes together) or if I remove the object from that specific scene. The object exists in other scenes that are a part of the bake but it doesn't throw any errors for them.

image I checked the console as the error suggested but found nothing relating to the error.

Mesh file: https://drive.google.com/file/d/1vCkxy8jojIp28XL7SM4P5xq2Tskw_g_f/view?usp=sharing The specific submesh used in the error is HandPlane_MDL, although I also had the error happen with other submeshes too.

I followed the instructions in the wiki for troubleshooting without success. If there's any other information you need I'll be happy to share. Thank you!

guycalledfrank commented 11 months ago

Sorry for the late reply. I tried baking this mesh and didn't see any problem:

image

"Can't fit" happens when the default atlas packer fails to fit all the requested objects in one atlas (in a reasonable amount of iterations), so I guess these objects are just the final drop. Are you using any Lightmap Groups on them? Did you try using xatlas as the atlas packer?

Creepypie commented 10 months ago

Hey, thanks for the reply.

Yes, they're in their own lightmap group, and I'm using xatlas for packing.

guycalledfrank commented 10 months ago

Since I can't reproduce it in an isolated scene, my suspicion is there there is something else in the scene, taking all atlases and not letting these objects to fit - most likely there are some objects with NaN/Infinity in their UVs, as that could possibly propagate to all other atlases. If you can send me any test package where it's reproducible, I'll debug and fix it.

Creepypie commented 9 months ago

Hey again, I couldn't reproduce this in an isolated project, weirdly enough. When I made a new project with the scenes in which I encountered the error, the bake completed successfully. It feels to me as if there's something going on with the source project itself (which I can't send because of NDA and >80gb of files lol), but I have no idea what to check. If you have any tips for steps I should take, I'll gladly do them.

guycalledfrank commented 9 months ago

The boring but reliable method is just to hide a half of your lightmappable objects and try. If it doesn't work, hide the half of the remaining objects... if it works, show the half of the previously hidden - until the problem-causing objects are found. The FBX in question is likely not related.