Experimented with the world scale and different sized textures, I want to make the world less like pixel art. Also changed map generation a bit, but it will need more changes, as I originally implemented the transvoxel algorithm differently, in order to have proper voxel type information.

This commit is contained in:
Relintai 2019-12-06 23:17:12 +01:00
parent d4d4cfaa8a
commit 3e0b247251
7 changed files with 11 additions and 12 deletions

View File

@ -9,5 +9,4 @@
[resource]
material = ExtResource( 1 )
prop_material = ExtResource( 1 )
texture_flags = 1
voxel_surfaces = [ ExtResource( 7 ), ExtResource( 4 ), ExtResource( 3 ), ExtResource( 5 ) ]

View File

@ -1,12 +1,11 @@
[gd_resource type="VoxelSurfaceMerger" load_steps=3 format=2]
[gd_resource type="VoxelSurfaceMerger" load_steps=2 format=2]
[ext_resource path="res://data/voxel_textures/test_09.png" type="Texture" id=1]
[ext_resource path="res://data/voxel_textures/test_06.png" type="Texture" id=2]
[ext_resource path="res://data/voxel_textures/test_02.png" type="Texture" id=1]
[resource]
resource_name = "Test"
id = 2
voxel_name = "Test"
texture_top = ExtResource( 1 )
texture_bottom = ExtResource( 2 )
texture_side = ExtResource( 2 )
texture_bottom = ExtResource( 1 )
texture_side = ExtResource( 1 )

View File

@ -1,12 +1,12 @@
[gd_resource type="VoxelSurfaceMerger" load_steps=3 format=2]
[ext_resource path="res://data/voxel_textures/test_03.png" type="Texture" id=1]
[ext_resource path="res://data/voxel_textures/test_11.png" type="Texture" id=2]
[ext_resource path="res://data/voxel_textures/test_01.png" type="Texture" id=3]
[resource]
resource_name = "Test2"
id = 3
voxel_name = "Test2"
texture_top = ExtResource( 2 )
texture_top = ExtResource( 3 )
texture_bottom = ExtResource( 2 )
texture_side = ExtResource( 1 )
texture_side = ExtResource( 3 )

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -58,7 +58,7 @@ use_threads = false
max_concurrent_generations = 1
library = ExtResource( 2 )
level_generator = SubResource( 1 )
voxel_scale = 4.0
voxel_scale = 6.0
chunk_spawn_range = 3
script = ExtResource( 8 )

View File

@ -39,7 +39,7 @@ func generate_terrarin(chunk : VoxelChunk, spawn_mobs: bool) -> void:
val += 2
var tv : float = terr_noise.get_noise_2d(x + (chunk.position_x * chunk.size_x), z + (chunk.position_z * chunk.size_z))
tv *= tv * tv
tv *= tv * tv * tv
val += tv * 2
var dval : float = noise.get_noise_2d(x + (chunk.position_x * chunk.size_x), z + (chunk.position_z * chunk.size_z))
@ -63,7 +63,8 @@ func generate_terrarin(chunk : VoxelChunk, spawn_mobs: bool) -> void:
else:
chunk.set_voxel(2, x, y, z, VoxelChunk.DEFAULT_CHANNEL_TYPE)
chunk.set_voxel(int(255.0 * (val - int(val)) / 180.0) * 180, x, y, z, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
# chunk.set_voxel(int(255.0 * (val - int(val)) / 180.0) * 180, x, y, z, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
chunk.set_voxel(int(255.0 * (val - int(val))), x, y, z, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
# chunk.build()