Update Voxelman to the latest to grab the new improvements.

This commit is contained in:
Relintai 2020-04-05 02:27:39 +02:00
parent 768af776e4
commit 156d24bee7
2 changed files with 35 additions and 35 deletions

2
HEADS
View File

@ -1 +1 @@
{"engine": {"3.2": "da4eb7101d986af0ba6a15efaaed3dee77370d80", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "b03cbf18f7ecb26aca7a823ad680403620bde845"}, "entity_spell_system": {"master": "dc0c6d224b7ee3683267596efedde8184ac335e4"}, "ui_extensions": {"master": "38acc650db260a831dc26ca96fe9d9a087230bdc"}, "voxelman": {"master": "2d2b7c8c3e2ca34a5ee911fa975d0c933269daa6"}, "texture_packer": {"master": "b17c174906f84de93d84aa60d010ffe603efaa28"}, "fastnoise": {"master": "ea3b34d972fb5f76474daabd7c1e192419811348"}, "mesh_data_resource": {"master": "4bda19b12be2c2a79a6121de6d22e48f3934e726"}, "procedural_animations": {"master": "45efc21f3e8af941d96b53d54f82572a6644fef7"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "fast_quadratic_mesh_simplifier": {"master": "dc598c59322185032835f964db069964244e58bc"}, "props": {"master": "e1f43af57110a2ac518b883012fb7e6d3eb8d120"}}
{"engine": {"3.2": "da4eb7101d986af0ba6a15efaaed3dee77370d80", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "b03cbf18f7ecb26aca7a823ad680403620bde845"}, "entity_spell_system": {"master": "dc0c6d224b7ee3683267596efedde8184ac335e4"}, "ui_extensions": {"master": "38acc650db260a831dc26ca96fe9d9a087230bdc"}, "voxelman": {"master": "d36eff4ed33590f9c799057b784a9f70c31dedea"}, "texture_packer": {"master": "b17c174906f84de93d84aa60d010ffe603efaa28"}, "fastnoise": {"master": "ea3b34d972fb5f76474daabd7c1e192419811348"}, "mesh_data_resource": {"master": "4bda19b12be2c2a79a6121de6d22e48f3934e726"}, "procedural_animations": {"master": "45efc21f3e8af941d96b53d54f82572a6644fef7"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "fast_quadratic_mesh_simplifier": {"master": "dc598c59322185032835f964db069964244e58bc"}, "props": {"master": "e1f43af57110a2ac518b883012fb7e6d3eb8d120"}}

View File

@ -47,20 +47,20 @@ func _create_meshers():
_prop_texture_packer.background_color = Color(0, 0, 0, 1)
_prop_texture_packer.texture_flags = Texture.FLAG_MIPMAPS
func _build_phase(phase):
if phase == VoxelChunkDefault.BUILD_PHASE_SETUP:
._build_phase(phase)
elif phase == VoxelChunkDefault.BUILD_PHASE_LIGHTS:
clear_baked_lights()
generate_random_ao()
bake_lights()
next_phase()
#func _build_phase(phase):
# if phase == VoxelChunkDefault.BUILD_PHASE_SETUP:
# ._build_phase(phase)
#
# elif phase == VoxelChunkDefault.BUILD_PHASE_LIGHTS:
# clear_baked_lights()
# generate_random_ao(123)
# bake_lights()
#
# next_phase()
#set_physics_process_internal(true)
# active_build_phase_type = VoxelChunkDefault.BUILD_PHASE_TYPE_PHYSICS_PROCESS
return
# return
# elif phase == VoxelChunkDefault.BUILD_PHASE_TERRARIN_MESH:
# for i in range(get_mesher_count()):
# var mesher : VoxelMesher = get_mesher(i)
@ -157,31 +157,31 @@ func _build_phase(phase):
# next_phase();
#
# return
else:
._build_phase(phase)
# else:
# ._build_phase(phase)
func _prop_added(prop):
pass
func generate_random_ao() -> void:
var noise : OpenSimplexNoise = OpenSimplexNoise.new()
noise.seed = 123
noise.octaves = 4
noise.period = 30
noise.persistence = 0.3
for x in range(0, size_x + 1):
for z in range(0, size_z + 1):
for y in range(0, size_y + 1):
var val : float = noise.get_noise_3d(x + (position_x * size_x), y + (position_y * size_y), z + (position_z * size_z))
val *= 0.6
if val > 1:
val = 1
if val < 0:
val = -val
set_voxel(int(val * 255.0), x, y, z, VoxelChunkDefault.DEFAULT_CHANNEL_RANDOM_AO)
#func generate_random_ao() -> void:
# var noise : OpenSimplexNoise = OpenSimplexNoise.new()
# noise.seed = 123
# noise.octaves = 4
# noise.period = 30
# noise.persistence = 0.3
#
# for x in range(0, size_x + 1):
# for z in range(0, size_z + 1):
# for y in range(0, size_y + 1):
# var val : float = noise.get_noise_3d(x + (position_x * size_x), y + (position_y * size_y), z + (position_z * size_z))
#
# val *= 0.6
#
# if val > 1:
# val = 1
#
# if val < 0:
# val = -val
#
# set_voxel(int(val * 255.0), x, y, z, VoxelChunkDefault.DEFAULT_CHANNEL_RANDOM_AO)