Difference between revisions of "Troubleshooting"

From Bakery GPU Lightmapper: Wiki
Jump to navigation Jump to search
(Created page with "This is a list of common problems, their symptoms and solutions. === Shadowmasks are not baked === Check following things: * Bakery's Render Mode is se...")
 
Line 16: Line 16:
 
* To switch between two modes, you can use "Distance Shadowmask" checkbox in Bakery main window.
 
* To switch between two modes, you can use "Distance Shadowmask" checkbox in Bakery main window.
 
* If you're on 5.6, go to Window->Lighting->Mixed Lighting->Lighting Mode to switch the mode.
 
* If you're on 5.6, go to Window->Lighting->Mixed Lighting->Lighting Mode to switch the mode.
 +
 +
=== Using a version control system I copied the scene to another PC and it doesn't look right ===
 +
Make sure you followed [[How_do_I...#How_do_I_use_git.2Fcollab.2Fother_version_control_system_with_Bakery.3F|version control guidelines]].
 +
 +
=== Baking same asset in one scene breaks its UVs in another scene, how do I fix that? ==
 +
The reason here is [[Manual#Adjust_UV_padding|UV padding adjustment]]. It modifies the UVs in the asset, so spacing between UV charts is optimal, meaning they never leak over each other and there is no much wasted space. Unity has a manual Pack Margin option on model assets, but it’s limited since it applies the same exact value for all meshes inside the model, while each mesh can get drastically different size in the final lightmap based on its surface area. Therefore Bakery overrides it with automatically calculated per-mesh (instead of per-model) padding. However, because “optimal” varies depending on baking resolution, it can be problematic to reuse the same asset in isolated scenes with different lightmap size. There are multiple ways to solve it:
 +
* Generate your own optimal UVs. UV padding adjustment only applies to models with auto-generated UV layout (aka “Generate Lightmap UVs” checkbox) and never touches custom data.
 +
* Use [[Manual#UV_padding:_increase_only|UV padding: increase only]] checkbox and first bake the lowest resolution scene, and then the rest.
 +
* Just disable UV padding adjustment.
 +
* Use two different models for different lightmap resolutions, so each will get the most efficient set of UVs.
 +
* Bake both scenes together.

Revision as of 09:29, 30 May 2019

This is a list of common problems, their symptoms and solutions.

Shadowmasks are not baked

Check following things:

  • Bakery's Render Mode is set to Shadowmask.
  • Masked lights have both Unity and Bakery light components on them.
  • Masked Bakery light components have "Baked contribution" set to "Indirect and shadowmask".

Shadowmasks are baked, but Unity renders real-time shadows instead

You're in Distance Shadowmask mode, it's expected. Read more about the difference:

https://docs.unity3d.com/Manual/LightMode-Mixed-Shadowmask.html

https://docs.unity3d.com/Manual/LightMode-Mixed-DistanceShadowmask.html

  • To switch between two modes, you can use "Distance Shadowmask" checkbox in Bakery main window.
  • If you're on 5.6, go to Window->Lighting->Mixed Lighting->Lighting Mode to switch the mode.

Using a version control system I copied the scene to another PC and it doesn't look right

Make sure you followed version control guidelines.

= Baking same asset in one scene breaks its UVs in another scene, how do I fix that?

The reason here is UV padding adjustment. It modifies the UVs in the asset, so spacing between UV charts is optimal, meaning they never leak over each other and there is no much wasted space. Unity has a manual Pack Margin option on model assets, but it’s limited since it applies the same exact value for all meshes inside the model, while each mesh can get drastically different size in the final lightmap based on its surface area. Therefore Bakery overrides it with automatically calculated per-mesh (instead of per-model) padding. However, because “optimal” varies depending on baking resolution, it can be problematic to reuse the same asset in isolated scenes with different lightmap size. There are multiple ways to solve it:

  • Generate your own optimal UVs. UV padding adjustment only applies to models with auto-generated UV layout (aka “Generate Lightmap UVs” checkbox) and never touches custom data.
  • Use UV padding: increase only checkbox and first bake the lowest resolution scene, and then the rest.
  • Just disable UV padding adjustment.
  • Use two different models for different lightmap resolutions, so each will get the most efficient set of UVs.
  • Bake both scenes together.