From c34a194c82a0cfbec5c8e84a4f5f98860f6e7b6b Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 21 Feb 2020 14:10:49 +0100 Subject: [PATCH] Few debug lines for the mesh simplifier. --- game/voxelman/world/TVVoxelChunk.gd | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/game/voxelman/world/TVVoxelChunk.gd b/game/voxelman/world/TVVoxelChunk.gd index eabf1f22..c24d7e58 100644 --- a/game/voxelman/world/TVVoxelChunk.gd +++ b/game/voxelman/world/TVVoxelChunk.gd @@ -238,9 +238,15 @@ func _build_phase(phase): var arr : Array = mesher.build_mesh() +# print("Orig tris " + str(arr[VisualServer.ARRAY_INDEX].size() / 3)) # var fqms : FastQuadraticMeshSimplifier = FastQuadraticMeshSimplifier.new() +# fqms.max_iteration_count = 10 +# fqms.enable_smart_link = false +# fqms.preserve_border_dges = true +# fqms.preserve_uv_foldover_edges = true +# fqms.preserve_uv_seam_edges = true # fqms.initialize(arr) -# fqms.simplify_mesh(0.5) +# fqms.simplify_mesh(0.6) # arr = fqms.get_arrays() VisualServer.mesh_add_surface_from_arrays(get_mesh_rid(), VisualServer.PRIMITIVE_TRIANGLES, arr)