From 97710f2b563f840c4ab9cc4e94afb4d3190318eb Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 26 Aug 2020 00:20:35 +0200 Subject: [PATCH] Updated Voxelman to get the blocky mesher changes. Now the second mesher in the VoxelChunk is a blocky mesher. --- HEADS | 2 +- game/voxelman/world/TVVoxelChunk.gd | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/HEADS b/HEADS index 93c82127..3da69c2f 100644 --- a/HEADS +++ b/HEADS @@ -1 +1 @@ -{"engine": {"3.2": "36b746d90393299b81ecb991f4aa94a8d742fd11", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "2b17341ac2b22d766d6f90426f161f04d9ddc599"}, "entity_spell_system": {"master": "0ddd4908fd3af76a50b2ddd0b112236bebed57f7"}, "ui_extensions": {"master": "ca7df8435154d1146be36c4fc97e6cc7092d3eb9"}, "voxelman": {"master": "142809d0cbce0c26926137dd64d1adeb9407bed9"}, "texture_packer": {"master": "f98b7410cd3f2a743cb57456910ad9f93ef89937"}, "fastnoise": {"master": "d0e3f1c759332cf0d9a5d7e0e71d0b0278310651"}, "mesh_data_resource": {"master": "6c99ddcaa6203e77163b4770e7af95bc2a181e3d"}, "procedural_animations": {"master": "8426e2c976e9f9cb82bca636c0ec6e79ad7b3bcb"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "props": {"master": "bfb60df21570415b1860c25c2dae7722cf158ed9"}, "mesh_utils": {"master": "3365df3faf89a4c29c3b4664b53e9007e4e6267b"}, "broken_seals_module": {"master": "9f89e2a4e7b59351ac4cb4c4dc5f88e5b60a2f15"}, "thread_pool": {"master": "b1030eaf92ba595c56ae8caac90b58081303d16f"}} \ No newline at end of file +{"engine": {"3.2": "36b746d90393299b81ecb991f4aa94a8d742fd11", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "c7a98e704dd62782b9f8b4a22b74787278574657"}, "entity_spell_system": {"master": "0ddd4908fd3af76a50b2ddd0b112236bebed57f7"}, "ui_extensions": {"master": "ca7df8435154d1146be36c4fc97e6cc7092d3eb9"}, "voxelman": {"master": "eea83093525be78a24ce8183cc6a931fed323f55"}, "texture_packer": {"master": "f98b7410cd3f2a743cb57456910ad9f93ef89937"}, "fastnoise": {"master": "d0e3f1c759332cf0d9a5d7e0e71d0b0278310651"}, "mesh_data_resource": {"master": "6c99ddcaa6203e77163b4770e7af95bc2a181e3d"}, "procedural_animations": {"master": "8426e2c976e9f9cb82bca636c0ec6e79ad7b3bcb"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "props": {"master": "bfb60df21570415b1860c25c2dae7722cf158ed9"}, "mesh_utils": {"master": "3365df3faf89a4c29c3b4664b53e9007e4e6267b"}, "broken_seals_module": {"master": "9f89e2a4e7b59351ac4cb4c4dc5f88e5b60a2f15"}, "thread_pool": {"master": "b1030eaf92ba595c56ae8caac90b58081303d16f"}} \ No newline at end of file diff --git a/game/voxelman/world/TVVoxelChunk.gd b/game/voxelman/world/TVVoxelChunk.gd index 42508133..a34fe952 100644 --- a/game/voxelman/world/TVVoxelChunk.gd +++ b/game/voxelman/world/TVVoxelChunk.gd @@ -60,16 +60,23 @@ func _create_meshers(): mesher.channel_index_type = VoxelChunkDefault.DEFAULT_CHANNEL_TYPE mesher.channel_index_isolevel = VoxelChunkDefault.DEFAULT_CHANNEL_ISOLEVEL add_mesher(mesher) - - var cmesher : VoxelMesherCubic = VoxelMesherCubic.new() + + + var cmesher : VoxelMesherBlocky = VoxelMesherBlocky.new() + cmesher.texture_scale = 3 cmesher.base_light_value = 0.45 cmesher.ao_strength = 0.2 cmesher.lod_size = lod_size cmesher.voxel_scale = voxel_scale cmesher.build_flags = build_flags - cmesher.texture_scale = 3 + + if cmesher.build_flags & VoxelChunkDefault.BUILD_FLAG_USE_LIGHTING != 0: + cmesher.build_flags = cmesher.build_flags ^ VoxelChunkDefault.BUILD_FLAG_USE_LIGHTING + + cmesher.always_add_colors = true + +# cmesher.channel_index_type = VoxelChunkDefault.DEFAULT_CHANNEL_TYPE cmesher.channel_index_type = VoxelChunkDefault.DEFAULT_CHANNEL_ALT_TYPE - cmesher.channel_index_isolevel = VoxelChunkDefault.DEFAULT_CHANNEL_ALT_ISOLEVEL add_mesher(cmesher) _prop_texture_packer = TexturePacker.new()