Page MenuHome

Geometry: fix division by zero in `GEO_uv_parametrizer_pack`
ClosedPublic

Authored by Aleksi Juvani (aleksijuvani) on Apr 1 2022, 9:18 PM.

Details

Summary

If all islands had a size of zero, a division by zero would occur in
GEO_uv_parametrizer_pack, causing the UV coordinates to be set to
NaN. An alternative approach would be to skip packing islands with a
zero size, but to avoid introducing any subtle changes in behaviour,
this patch opts for a minimal change that fixes the issue.

Diff Detail

Repository
rB Blender

Event Timeline

Aleksi Juvani (aleksijuvani) requested review of this revision.Apr 1 2022, 9:18 PM
Aleksi Juvani (aleksijuvani) created this revision.

Since @Brecht Van Lommel (brecht) mentioned he was the maintainer of this code, maybe he has an opinion here? Skipping islands with zero size does sounds reasonable.

I think it's better to pack them anyway. If UV coordinates are for example outside the 0..1 range, I think it's better if they get moved into that range.

This revision is now accepted and ready to land.Apr 5 2022, 7:15 PM