mirror of
https://github.com/Relintai/broken_seals.git
synced 2025-02-22 15:17:57 +01:00
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:
parent
d4d4cfaa8a
commit
3e0b247251
@ -9,5 +9,4 @@
|
|||||||
[resource]
|
[resource]
|
||||||
material = ExtResource( 1 )
|
material = ExtResource( 1 )
|
||||||
prop_material = ExtResource( 1 )
|
prop_material = ExtResource( 1 )
|
||||||
texture_flags = 1
|
|
||||||
voxel_surfaces = [ ExtResource( 7 ), ExtResource( 4 ), ExtResource( 3 ), ExtResource( 5 ) ]
|
voxel_surfaces = [ ExtResource( 7 ), ExtResource( 4 ), ExtResource( 3 ), ExtResource( 5 ) ]
|
||||||
|
@ -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_02.png" type="Texture" id=1]
|
||||||
[ext_resource path="res://data/voxel_textures/test_06.png" type="Texture" id=2]
|
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
resource_name = "Test"
|
resource_name = "Test"
|
||||||
id = 2
|
id = 2
|
||||||
voxel_name = "Test"
|
voxel_name = "Test"
|
||||||
texture_top = ExtResource( 1 )
|
texture_top = ExtResource( 1 )
|
||||||
texture_bottom = ExtResource( 2 )
|
texture_bottom = ExtResource( 1 )
|
||||||
texture_side = ExtResource( 2 )
|
texture_side = ExtResource( 1 )
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
[gd_resource type="VoxelSurfaceMerger" load_steps=3 format=2]
|
[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_11.png" type="Texture" id=2]
|
||||||
|
[ext_resource path="res://data/voxel_textures/test_01.png" type="Texture" id=3]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
resource_name = "Test2"
|
resource_name = "Test2"
|
||||||
id = 3
|
id = 3
|
||||||
voxel_name = "Test2"
|
voxel_name = "Test2"
|
||||||
texture_top = ExtResource( 2 )
|
texture_top = ExtResource( 3 )
|
||||||
texture_bottom = ExtResource( 2 )
|
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 |
@ -58,7 +58,7 @@ use_threads = false
|
|||||||
max_concurrent_generations = 1
|
max_concurrent_generations = 1
|
||||||
library = ExtResource( 2 )
|
library = ExtResource( 2 )
|
||||||
level_generator = SubResource( 1 )
|
level_generator = SubResource( 1 )
|
||||||
voxel_scale = 4.0
|
voxel_scale = 6.0
|
||||||
chunk_spawn_range = 3
|
chunk_spawn_range = 3
|
||||||
script = ExtResource( 8 )
|
script = ExtResource( 8 )
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ func generate_terrarin(chunk : VoxelChunk, spawn_mobs: bool) -> void:
|
|||||||
val += 2
|
val += 2
|
||||||
|
|
||||||
var tv : float = terr_noise.get_noise_2d(x + (chunk.position_x * chunk.size_x), z + (chunk.position_z * chunk.size_z))
|
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
|
val += tv * 2
|
||||||
|
|
||||||
var dval : float = noise.get_noise_2d(x + (chunk.position_x * chunk.size_x), z + (chunk.position_z * chunk.size_z))
|
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:
|
else:
|
||||||
chunk.set_voxel(2, x, y, z, VoxelChunk.DEFAULT_CHANNEL_TYPE)
|
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()
|
# chunk.build()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user