{"repo":"z3y/XatlasLightmap","free":true,"listed":false,"github":"https://github.com/z3y/XatlasLightmap","clone":"git clone https://github.com/z3y/XatlasLightmap.git","description":"Better lightmap packing for Unity","language":"C++","stars":62,"topics":["bakery","lightmap","packing","unity","xatlas"],"license":"MIT","category":"game-templates","readme_excerpt":"XatlasLightmap A tool for the most efficient lightmap packing in Unity. How it works It generates unique uv2 per mesh, instead of using lightmap UV offsets, which when combined with static batching doesn't create any extra cost. Additional vertex streams are used to set uv2 in editor, which requires modifications to bakery scripts. Lightmap Scale is also calculated differently which allows it to have perfectly uniform texel density when lightmap scale is set to 1. How to use - Add package with git https://github.com/z3y/XatlasLightmap.git - Patch Bakery Tools XatlasLightmap PatchBakery (only once) - Add a XatlasLightmapPacker script on a GameObject - Select a BakeryLightmapGroup asset with Packing Mode set to Original UV - Generate Lightmap UVs on the model importer or create custom UV2 - Enable mesh Read/Write on the model importer - Pack Share your lightmaps Limitations - Nested lightmap groups arent supported yet - Doesn't work with GPU instancing, since every mesh ends up being unique. Only use with static batching. - Model reimports will break the mesh until packed again. - Since the packing is so efficient and the padding gets applied correctly most shaders will have slight bleeding at 2px, it is recommended to use a centroid interpolator for the lightmap UV. - Using bicubic sampling requires more padding - Lightmaps might fail to bake properly first time - Only works with Bakery - Sometimes on build it can fail to get UV2 because Read/Write is disabled, even tho its no","default_branch":null,"files":null,"tree":[],"storefront":"/r/z3y","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/z3y/XatlasLightmap/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}