Skip to content

Commit

Permalink
Merge pull request #31728 from fire/improve-uvatlas
Browse files Browse the repository at this point in the history
Tweak xatlas and import new version b4b5426
  • Loading branch information
akien-mga committed Aug 28, 2019
2 parents 96ea1e6 + c3c805a commit 4a6b445
Show file tree
Hide file tree
Showing 6 changed files with 1,901 additions and 1,851 deletions.
6 changes: 3 additions & 3 deletions modules/xatlas_unwrap/register_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ bool xatlas_mesh_lightmap_unwrap_callback(float p_texel_size, const float *p_ver
xatlas::PackOptions pack_options;

pack_options.maxChartSize = 4096;
pack_options.bruteForce = true;
pack_options.blockAlign = true;
pack_options.texelsPerUnit = 1.0 / p_texel_size;

xatlas::Atlas *atlas = xatlas::Create();
Expand All @@ -78,7 +78,7 @@ bool xatlas_mesh_lightmap_unwrap_callback(float p_texel_size, const float *p_ver
float h = *r_size_hint_y;

if (w == 0 || h == 0) {
return false; //could not bake
return false; //could not bake because there is no area
}

const xatlas::Mesh &output = atlas->meshes[0];
Expand Down Expand Up @@ -106,7 +106,7 @@ bool xatlas_mesh_lightmap_unwrap_callback(float p_texel_size, const float *p_ver

*r_index_count = output.indexCount;

//xatlas::Destroy(atlas);
xatlas::Destroy(atlas);
printf("Done\n");
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ File extracted from upstream release tarball:
## xatlas

- Upstream: https://github.com/jpcy/xatlas
- Version: git (f65a664, 2019)
- Version: git (b4b5426, 2019)
- License: MIT

Files extracted from upstream source:
Expand Down
157 changes: 0 additions & 157 deletions thirdparty/xatlas/avoid-failing-on-bad-geometry.patch

This file was deleted.

14 changes: 0 additions & 14 deletions thirdparty/xatlas/build-fix-limits.patch

This file was deleted.

Loading

0 comments on commit 4a6b445

Please sign in to comment.