Siccity / GLTFUtility

Simple GLTF importer for Unity
MIT License
974 stars 217 forks source link

Lightmap UVs are generated incorrectly with Unity 2019.4.31f1 #165

Open Takanu opened 2 years ago

Takanu commented 2 years ago

image

Using the latest master and the aforementioned Unity version, attempting to generate Lightmap UVs creates islands that are miniscule and have far more padding than the specified texel amount.

This comparison is made using an FBX and GLTF export of the same object, and both use Generated Lightmap UVs using the exact same default UV Lightmap settings and lighting conditions.

image

image

The first image is the FBX result, the second is the GLTF result. If there are any other tests or debugging steps I could take please let me know and i'd be happy to assist.

Siccity commented 2 years ago

Try checking the scale of the object. I've used the lightmapper for a 2019 project and it worked fine, so I'm guessing this has to be something on your end

Siccity commented 2 years ago

Alternatively, I'd you could attach a repro project that could help

Takanu commented 2 years ago

The scale of the objects are all correct, I'm using Blender's GLTF exporter to do it and the scale appears correct when inspecting the objects inside the GLTF file in Unity.

Here's a package comparing the FBX to the GLTF version of the model (I forgot to mark two spheres as Static but it doesn't affect the issue). Lightmap Test.zip