diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-12-14 08:59:46 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-12-14 09:01:27 -0300 |
commit | f3ad14224e27f2a25196575e3c43ebc792c90894 (patch) | |
tree | 84e60bc2fafda809f51bd0892e39205da9423068 /modules/thekla_unwrap | |
parent | aa6772d7abb3ff1ff77b1b658617904bb0af1fbb (diff) |
-Add lightmapper
-Fixes to unwrapper (remove degenerates), makes Thekla not crash
-Added optional cancel button in EditorProgress
-Added function to force processing of events (needed for cancel button)
Diffstat (limited to 'modules/thekla_unwrap')
-rw-r--r-- | modules/thekla_unwrap/register_types.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/thekla_unwrap/register_types.cpp b/modules/thekla_unwrap/register_types.cpp index 01b834f8cb..ab3203068f 100644 --- a/modules/thekla_unwrap/register_types.cpp +++ b/modules/thekla_unwrap/register_types.cpp @@ -42,7 +42,7 @@ bool thekla_mesh_lightmap_unwrap_callback(float p_texel_size, const float *p_ver input_mesh.face_array[i].vertex_index[0] = p_indices[i * 3 + 0]; input_mesh.face_array[i].vertex_index[1] = p_indices[i * 3 + 1]; input_mesh.face_array[i].vertex_index[2] = p_indices[i * 3 + 2]; - printf("face %i - %i, %i, %i - mat %i\n", i, input_mesh.face_array[i].vertex_index[0], input_mesh.face_array[i].vertex_index[1], input_mesh.face_array[i].vertex_index[2], p_face_materials[i]); + //printf("face %i - %i, %i, %i - mat %i\n", i, input_mesh.face_array[i].vertex_index[0], input_mesh.face_array[i].vertex_index[1], input_mesh.face_array[i].vertex_index[2], p_face_materials[i]); input_mesh.face_array[i].material_index = p_face_materials[i]; } input_mesh.vertex_array = new Thekla::Atlas_Input_Vertex[p_vertex_count]; @@ -54,8 +54,8 @@ bool thekla_mesh_lightmap_unwrap_callback(float p_texel_size, const float *p_ver } input_mesh.vertex_array[i].uv[0] = 0; input_mesh.vertex_array[i].uv[1] = 0; - printf("vertex %i - %f, %f, %f\n", i, input_mesh.vertex_array[i].position[0], input_mesh.vertex_array[i].position[1], input_mesh.vertex_array[i].position[2]); - printf("normal %i - %f, %f, %f\n", i, input_mesh.vertex_array[i].normal[0], input_mesh.vertex_array[i].normal[1], input_mesh.vertex_array[i].normal[2]); + //printf("vertex %i - %f, %f, %f\n", i, input_mesh.vertex_array[i].position[0], input_mesh.vertex_array[i].position[1], input_mesh.vertex_array[i].position[2]); + //printf("normal %i - %f, %f, %f\n", i, input_mesh.vertex_array[i].normal[0], input_mesh.vertex_array[i].normal[1], input_mesh.vertex_array[i].normal[2]); } input_mesh.face_count = p_index_count / 3; input_mesh.vertex_count = p_vertex_count; @@ -65,6 +65,7 @@ bool thekla_mesh_lightmap_unwrap_callback(float p_texel_size, const float *p_ver Thekla::atlas_set_default_options(&options); options.packer_options.witness.packing_quality = 1; options.packer_options.witness.texel_area = 1.0 / p_texel_size; + options.packer_options.witness.conservative = true; //generate Thekla::Atlas_Error err; |