Created 3 textures using godot-procedural-textures (https://github.com/RodZill4/godot-procedural-textures). Also the test dungeon start room now generates a little ruined structure outside as the entrace.

This commit is contained in:
Relintai 2019-12-08 19:44:08 +01:00
parent 582f2298f2
commit 25f3e98f43
20 changed files with 1141 additions and 18 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,7 @@
[gd_resource type="VoxelmanLibraryMerger" load_steps=6 format=2]
[gd_resource type="VoxelmanLibraryMerger" load_steps=7 format=2]
[ext_resource path="res://data/materials/1_standard_material.tres" type="Material" id=1]
[ext_resource path="res://data/voxel_surfaces/4_dungeon_stone.tres" type="VoxelSurfaceMerger" id=2]
[ext_resource path="res://data/voxel_surfaces/2_test.tres" type="VoxelSurfaceMerger" id=3]
[ext_resource path="res://data/voxel_surfaces/1_stone.tres" type="VoxelSurfaceMerger" id=4]
[ext_resource path="res://data/voxel_surfaces/3_test2.tres" type="VoxelSurfaceMerger" id=5]
@ -9,4 +10,4 @@
[resource]
material = ExtResource( 1 )
prop_material = ExtResource( 1 )
voxel_surfaces = [ ExtResource( 7 ), ExtResource( 4 ), ExtResource( 3 ), ExtResource( 5 ) ]
voxel_surfaces = [ ExtResource( 7 ), ExtResource( 4 ), ExtResource( 3 ), ExtResource( 5 ), ExtResource( 2 ) ]

View File

@ -1,6 +1,6 @@
[gd_resource type="VoxelSurfaceMerger" load_steps=2 format=2]
[ext_resource path="res://data/voxel_textures/test_05.png" type="Texture" id=1]
[ext_resource path="res://data/voxel_textures/stone_1_albedo.png" type="Texture" id=1]
[resource]
resource_name = "Test"

View File

@ -0,0 +1,11 @@
[gd_resource type="VoxelSurfaceMerger" load_steps=2 format=2]
[ext_resource path="res://data/voxel_textures/stone_dungeon_1_albedo.png" type="Texture" id=1]
[resource]
resource_name = "Dungeon Stone"
id = 4
voxel_name = "Dungeon Stone"
texture_top = ExtResource( 1 )
texture_bottom = ExtResource( 1 )
texture_side = ExtResource( 1 )

View File

@ -0,0 +1,205 @@
{
"connections": [
{
"from": "voronoi",
"from_port": 1,
"to": "colorize",
"to_port": 0
},
{
"from": "colorize",
"from_port": 0,
"to": "blend",
"to_port": 0
},
{
"from": "perlin",
"from_port": 0,
"to": "blend",
"to_port": 1
},
{
"from": "blend",
"from_port": 0,
"to": "colorize_2",
"to_port": 0
},
{
"from": "colorize_2",
"from_port": 0,
"to": "Material",
"to_port": 0
},
{
"from": "colorize_2",
"from_port": 0,
"to": "export",
"to_port": 0
}
],
"label": "Graph",
"name": "@@1045",
"node_position": {
"x": 0,
"y": 0
},
"nodes": [
{
"name": "Material",
"node_position": {
"x": 508,
"y": -238
},
"parameters": {
"albedo_color": {
"a": 1,
"b": 1,
"g": 1,
"r": 1,
"type": "Color"
},
"ao_light_affect": 1,
"depth_scale": 1,
"emission_energy": 1,
"metallic": 1,
"normal_scale": 1,
"roughness": 1,
"size": 7,
"subsurf_scatter_strength": 0
},
"type": "material"
},
{
"name": "voronoi",
"node_position": {
"x": -627.5,
"y": -296.5
},
"parameters": {
"intensity": 1,
"randomness": 0.95,
"scale_x": 8,
"scale_y": 8,
"stretch_x": 1,
"stretch_y": 1
},
"type": "voronoi"
},
{
"name": "colorize",
"node_position": {
"x": -362.5,
"y": -334.5
},
"parameters": {
"gradient": {
"interpolation": 1,
"points": [
{
"a": 1,
"b": 0,
"g": 0,
"pos": 0,
"r": 0
},
{
"a": 1,
"b": 1,
"g": 1,
"pos": 1,
"r": 1
}
],
"type": "Gradient"
}
},
"type": "colorize"
},
{
"name": "export",
"node_position": {
"x": 545.5,
"y": 62.5
},
"parameters": {
"size": 7,
"suffix": "albedo"
},
"type": "export"
},
{
"name": "perlin",
"node_position": {
"x": -373.5,
"y": -38.5
},
"parameters": {
"iterations": 9,
"persistence": 0.9,
"scale_x": 20,
"scale_y": 20
},
"type": "perlin"
},
{
"name": "blend",
"node_position": {
"x": -102.5,
"y": -118.5
},
"parameters": {
"amount": 0.68005,
"blend_type": 0
},
"type": "blend"
},
{
"name": "colorize_2",
"node_position": {
"x": 223.5,
"y": -182.5
},
"parameters": {
"gradient": {
"interpolation": 1,
"points": [
{
"a": 1,
"b": 0,
"g": 0,
"pos": 0,
"r": 0
},
{
"a": 1,
"b": 0.670407,
"g": 0.671875,
"pos": 0.6,
"r": 0.624903
},
{
"a": 1,
"b": 0.742626,
"g": 0.84375,
"pos": 0.836364,
"r": 0.83743
},
{
"a": 1,
"b": 1,
"g": 1,
"pos": 1,
"r": 1
}
],
"type": "Gradient"
}
},
"type": "colorize"
}
],
"parameters": {
},
"type": "graph"
}

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/stone_2_albedo.png-c18c0574c81fbcf23632af2f67956979.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://data/voxel_surfaces/stone_2_albedo.png"
dest_files=[ "res://.import/stone_2_albedo.png-c18c0574c81fbcf23632af2f67956979.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@ -0,0 +1,226 @@
{
"connections": [
{
"from": "voronoi",
"from_port": 1,
"to": "colorize",
"to_port": 0
},
{
"from": "colorize",
"from_port": 0,
"to": "blend",
"to_port": 0
},
{
"from": "perlin",
"from_port": 0,
"to": "blend",
"to_port": 1
},
{
"from": "blend",
"from_port": 0,
"to": "colorize_2",
"to_port": 0
},
{
"from": "colorize_2",
"from_port": 0,
"to": "Material",
"to_port": 0
},
{
"from": "colorize_2",
"from_port": 0,
"to": "export",
"to_port": 0
}
],
"label": "Graph",
"name": "@@1045",
"node_position": {
"x": 0,
"y": 0
},
"nodes": [
{
"name": "Material",
"node_position": {
"x": 508,
"y": -238
},
"parameters": {
"albedo_color": {
"a": 1,
"b": 1,
"g": 1,
"r": 1,
"type": "Color"
},
"ao_light_affect": 1,
"depth_scale": 1,
"emission_energy": 1,
"metallic": 1,
"normal_scale": 1,
"roughness": 1,
"size": 7,
"subsurf_scatter_strength": 0
},
"type": "material"
},
{
"name": "voronoi",
"node_position": {
"x": -627.5,
"y": -296.5
},
"parameters": {
"intensity": 1,
"randomness": 0.95,
"scale_x": 14,
"scale_y": 14,
"stretch_x": 1,
"stretch_y": 1
},
"type": "voronoi"
},
{
"name": "colorize",
"node_position": {
"x": -362.5,
"y": -334.5
},
"parameters": {
"gradient": {
"interpolation": 1,
"points": [
{
"a": 1,
"b": 0,
"g": 0,
"pos": 0,
"r": 0
},
{
"a": 1,
"b": 1,
"g": 1,
"pos": 0.527273,
"r": 1
},
{
"a": 1,
"b": 1,
"g": 1,
"pos": 1,
"r": 1
}
],
"type": "Gradient"
}
},
"type": "colorize"
},
{
"name": "export",
"node_position": {
"x": 545.5,
"y": 62.5
},
"parameters": {
"size": 7,
"suffix": "albedo"
},
"type": "export"
},
{
"name": "perlin",
"node_position": {
"x": -373.5,
"y": -38.5
},
"parameters": {
"iterations": 9,
"persistence": 0.9,
"scale_x": 20,
"scale_y": 20
},
"type": "perlin"
},
{
"name": "blend",
"node_position": {
"x": -102.5,
"y": -118.5
},
"parameters": {
"amount": 0.6287,
"blend_type": 2
},
"type": "blend"
},
{
"name": "colorize_2",
"node_position": {
"x": 223.5,
"y": -170.5
},
"parameters": {
"gradient": {
"interpolation": 1,
"points": [
{
"a": 1,
"b": 0.072917,
"g": 0.06527,
"pos": 0,
"r": 0.065748
},
{
"a": 1,
"b": 0.203125,
"g": 0.155957,
"pos": 0.2,
"r": 0.140235
},
{
"a": 1,
"b": 0.713542,
"g": 0.587046,
"pos": 0.590909,
"r": 0.460551
},
{
"a": 1,
"b": 0.927083,
"g": 0.921296,
"pos": 0.709091,
"r": 0.880787
},
{
"a": 1,
"b": 0.796875,
"g": 0.796875,
"pos": 1,
"r": 0.796875
},
{
"a": 1,
"b": 1,
"g": 1,
"pos": 1,
"r": 1
}
],
"type": "Gradient"
}
},
"type": "colorize"
}
],
"parameters": {
},
"type": "graph"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/stone_1_albedo.png-f7805e5128f8ebcd9aab69b431b35954.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://data/voxel_textures/stone_1_albedo.png"
dest_files=[ "res://.import/stone_1_albedo.png-f7805e5128f8ebcd9aab69b431b35954.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=false
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View File

@ -0,0 +1,8 @@
For stone_1.ptex, and stone_1_albedo.png
Created for Broken Seals
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.

View File

@ -0,0 +1,226 @@
{
"connections": [
{
"from": "voronoi",
"from_port": 1,
"to": "colorize",
"to_port": 0
},
{
"from": "colorize",
"from_port": 0,
"to": "blend",
"to_port": 0
},
{
"from": "perlin",
"from_port": 0,
"to": "blend",
"to_port": 1
},
{
"from": "blend",
"from_port": 0,
"to": "colorize_2",
"to_port": 0
},
{
"from": "colorize_2",
"from_port": 0,
"to": "Material",
"to_port": 0
},
{
"from": "colorize_2",
"from_port": 0,
"to": "export",
"to_port": 0
}
],
"label": "Graph",
"name": "@@1045",
"node_position": {
"x": 0,
"y": 0
},
"nodes": [
{
"name": "Material",
"node_position": {
"x": 508,
"y": -238
},
"parameters": {
"albedo_color": {
"a": 1,
"b": 1,
"g": 1,
"r": 1,
"type": "Color"
},
"ao_light_affect": 1,
"depth_scale": 1,
"emission_energy": 1,
"metallic": 1,
"normal_scale": 1,
"roughness": 1,
"size": 7,
"subsurf_scatter_strength": 0
},
"type": "material"
},
{
"name": "voronoi",
"node_position": {
"x": -646.5,
"y": -294.5
},
"parameters": {
"intensity": 1,
"randomness": 0.95,
"scale_x": 8,
"scale_y": 8,
"stretch_x": 1,
"stretch_y": 1
},
"type": "voronoi"
},
{
"name": "colorize",
"node_position": {
"x": -320.5,
"y": -430.5
},
"parameters": {
"gradient": {
"interpolation": 1,
"points": [
{
"a": 1,
"b": 0,
"g": 0,
"pos": 0,
"r": 0
},
{
"a": 1,
"b": 1,
"g": 1,
"pos": 0.063636,
"r": 1
},
{
"a": 1,
"b": 1,
"g": 1,
"pos": 1,
"r": 1
}
],
"type": "Gradient"
}
},
"type": "colorize"
},
{
"name": "export",
"node_position": {
"x": 545.5,
"y": 62.5
},
"parameters": {
"size": 7,
"suffix": "albedo"
},
"type": "export"
},
{
"name": "perlin",
"node_position": {
"x": -367.5,
"y": -41.5
},
"parameters": {
"iterations": 9,
"persistence": 0.9,
"scale_x": 11,
"scale_y": 14
},
"type": "perlin"
},
{
"name": "blend",
"node_position": {
"x": -85.5,
"y": -126.5
},
"parameters": {
"amount": 0.6287,
"blend_type": 2
},
"type": "blend"
},
{
"name": "colorize_2",
"node_position": {
"x": 220.5,
"y": -169.5
},
"parameters": {
"gradient": {
"interpolation": 1,
"points": [
{
"a": 1,
"b": 0.072917,
"g": 0.06527,
"pos": 0,
"r": 0.065748
},
{
"a": 1,
"b": 0.145833,
"g": 0.092853,
"pos": 0.2,
"r": 0.075192
},
{
"a": 1,
"b": 0.776042,
"g": 0.637013,
"pos": 0.609091,
"r": 0.458262
},
{
"a": 1,
"b": 0.927083,
"g": 0.921296,
"pos": 0.709091,
"r": 0.880787
},
{
"a": 1,
"b": 0.796875,
"g": 0.796875,
"pos": 1,
"r": 0.796875
},
{
"a": 1,
"b": 1,
"g": 1,
"pos": 1,
"r": 1
}
],
"type": "Gradient"
}
},
"type": "colorize"
}
],
"parameters": {
},
"type": "graph"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/stone_dungeon_1_albedo.png-3d06924ddcf0b0f2b0aed1d017c2379c.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://data/voxel_textures/stone_dungeon_1_albedo.png"
dest_files=[ "res://.import/stone_dungeon_1_albedo.png-3d06924ddcf0b0f2b0aed1d017c2379c.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=false
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View File

@ -0,0 +1,8 @@
For stone_dungeon_1.ptex, and stone_dungeon_1_albedo.png
Created for Broken Seals
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.

View File

@ -0,0 +1,240 @@
{
"connections": [
{
"from": "bricks",
"from_port": 0,
"to": "colorize_2",
"to_port": 0
},
{
"from": "perlin",
"from_port": 0,
"to": "blend",
"to_port": 0
},
{
"from": "colorize",
"from_port": 0,
"to": "blend_2",
"to_port": 0
},
{
"from": "colorize_2",
"from_port": 0,
"to": "blend_2",
"to_port": 1
},
{
"from": "scratches",
"from_port": 0,
"to": "colorize",
"to_port": 0
},
{
"from": "blend_2",
"from_port": 0,
"to": "blend",
"to_port": 1
},
{
"from": "blend",
"from_port": 0,
"to": "Material",
"to_port": 0
},
{
"from": "blend",
"from_port": 0,
"to": "export",
"to_port": 0
}
],
"label": "Graph",
"name": "@@49",
"node_position": {
"x": 0,
"y": 0
},
"nodes": [
{
"name": "Material",
"node_position": {
"x": 1219,
"y": -324
},
"parameters": {
"albedo_color": {
"a": 1,
"b": 1,
"g": 1,
"r": 1,
"type": "Color"
},
"ao_light_affect": 1,
"depth_scale": 1,
"emission_energy": 1,
"metallic": 1,
"normal_scale": 1,
"roughness": 1,
"size": 7,
"subsurf_scatter_strength": 0
},
"type": "material"
},
{
"name": "bricks",
"node_position": {
"x": -483.5,
"y": -407
},
"parameters": {
"bevel": 0,
"columns": 3,
"mortar": 0.031562,
"pattern": 0,
"repeat": 1,
"row_offset": 0.5,
"rows": 7
},
"type": "bricks"
},
{
"name": "scratches",
"node_position": {
"x": 26.5,
"y": -581
},
"parameters": {
"Randomness": 0.5,
"angle": 171,
"layers": 2,
"length": 0.23,
"randomness": 0.35,
"waviness": 0.05,
"width": 0.3
},
"type": "scratches"
},
{
"name": "colorize_2",
"node_position": {
"x": -236.5,
"y": -147
},
"parameters": {
"gradient": {
"interpolation": 1,
"points": [
{
"a": 1,
"b": 0.108406,
"g": 0.108406,
"pos": 0,
"r": 0.166667
},
{
"a": 1,
"b": 0.246762,
"g": 0.29687,
"pos": 1,
"r": 0.78125
}
],
"type": "Gradient"
}
},
"type": "colorize"
},
{
"name": "colorize",
"node_position": {
"x": 285.5,
"y": -406
},
"parameters": {
"gradient": {
"interpolation": 3,
"points": [
{
"a": 0,
"b": 0,
"g": 0,
"pos": 0,
"r": 0
},
{
"a": 1,
"b": 0,
"g": 0,
"pos": 0.409091,
"r": 0
},
{
"a": 1,
"b": 0,
"g": 0,
"pos": 1,
"r": 0
}
],
"type": "Gradient"
}
},
"type": "colorize"
},
{
"name": "perlin",
"node_position": {
"x": 542.5,
"y": -556
},
"parameters": {
"iterations": 7,
"persistence": 0.9,
"scale_x": 20,
"scale_y": 20
},
"type": "perlin"
},
{
"name": "blend",
"node_position": {
"x": 720.5,
"y": -134
},
"parameters": {
"amount": 0.613025,
"blend_type": 11
},
"type": "blend"
},
{
"name": "blend_2",
"node_position": {
"x": 241.5,
"y": 70
},
"parameters": {
"amount": 0.516975,
"blend_type": 0
},
"type": "blend"
},
{
"name": "export",
"node_position": {
"x": 1237,
"y": -33.25
},
"parameters": {
"size": 7,
"suffix": "albedo"
},
"type": "export"
}
],
"parameters": {
},
"type": "graph"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/test_brick_albedo.png-f24e6b9c0f0ab0573a8291a4f3ce9092.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://data/voxel_textures/test_brick_albedo.png"
dest_files=[ "res://.import/test_brick_albedo.png-f24e6b9c0f0ab0573a8291a4f3ce9092.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=false
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

View File

@ -0,0 +1,8 @@
For test_brick.ptex, and test_brick_albedo.png
Created for Broken Seals
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.

View File

@ -46,6 +46,7 @@ transform = Transform( -1, 0, -3.25841e-07, 0, 1, 0, 3.25841e-07, 0, -1, 0, 0, 0
[node name="Model" type="Spatial" parent="Rotation_Helper"]
[node name="character" parent="Rotation_Helper/Model" instance=ExtResource( 1 )]
refresh_in_editor = false
[node name="GUILayer" parent="." instance=ExtResource( 3 )]
[connection signal="onc_open_loot_winow_request" from="." to="GUILayer" method="_on_Player_onc_open_loot_winow_request"]

View File

@ -6,26 +6,79 @@ extends DungeonRoom
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
func _setup():
sizex = 5
sizey = 5
sizez = 5
sizex = 4
sizey = 4
sizez = 4
func _generate_chunk(chunk : VoxelChunk, spawn_mobs: bool) -> void:
if chunk.position_x != 0 or chunk.position_z != 0:
return
var hs : int = chunk.get_size_y() / 2 - sizex / 2
if chunk.position_y == 0:
for y in range(chunk.get_size_y()):
chunk.set_voxel(0, 10, y, 10, VoxelChunk.DEFAULT_CHANNEL_TYPE)
for y in range(0, 4):
for x in range(-4, 5):
for z in range(-4, 5):
if chunk.get_voxel(hs + x, y, hs + z, VoxelChunk.DEFAULT_CHANNEL_TYPE) != 0:
chunk.set_voxel(4, hs + x, y, hs + z, VoxelChunk.DEFAULT_CHANNEL_TYPE)
for x in range(-5, 5):
for z in [-5, 4]:
for y in range(0, randi() % 5):
if chunk.get_voxel(hs + x, y, hs + z, VoxelChunk.DEFAULT_CHANNEL_TYPE) == 0:
chunk.set_voxel(4, hs + x, y, hs + z, VoxelChunk.DEFAULT_CHANNEL_TYPE)
chunk.set_voxel(10, hs + x, y, hs + z, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
for x in [-5, 5]:
for z in range(-5, 4):
for y in range(0, randi() % 5):
if chunk.get_voxel(hs + x, y, hs + z, VoxelChunk.DEFAULT_CHANNEL_TYPE) == 0:
chunk.set_voxel(4, hs + x, y, hs + z, VoxelChunk.DEFAULT_CHANNEL_TYPE)
chunk.set_voxel(10, hs + x, y, hs + z, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
# var num : int = randi() % 10 + 7
# for i in range(num):
# var x : int = randi() % 12 - 6
# var z : int = randi() % 12 - 6
#
# for y in range(4, 1, -1):
# if chunk.get_voxel(hs + x, y, hs + z, VoxelChunk.DEFAULT_CHANNEL_TYPE) != 0:
# chunk.set_voxel(1, hs + x, y + 1, hs + z, VoxelChunk.DEFAULT_CHANNEL_TYPE)
# chunk.set_voxel(100, hs + x, y + 1, hs + z, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
# break
for y in range(chunk.data_size_y):
for x in range(0, 2):
for z in range(0, 2):
chunk.set_voxel(0, hs + x, y, hs + z, VoxelChunk.DEFAULT_CHANNEL_TYPE)
for y in range(3, chunk.get_size_y() / 2):
chunk.set_voxel(4, hs, y, hs, VoxelChunk.DEFAULT_CHANNEL_TYPE)
chunk.set_voxel((16 - y) * 8, hs, y, hs, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
if chunk.position_y == -1:
var hs : int = chunk.get_size_y() / 2 - sizex / 2
for y in range(chunk.get_size_y() / 2, chunk.get_size_y()):
chunk.set_voxel(0, 10, y, 10, VoxelChunk.DEFAULT_CHANNEL_TYPE)
for y in range(hs, hs * 2):
for x in range(hs, hs * 2):
for z in range(hs, hs * 2):
chunk.set_voxel(0, x, y, z, VoxelChunk.DEFAULT_CHANNEL_TYPE)
for y in range(chunk.get_size_y() - sizey - 1, chunk.get_size_y()):
for x in range(hs - 1, hs + sizex + 1):
for z in range(hs - 1, hs + sizez + 1):
chunk.set_voxel(4, x, y, z, VoxelChunk.DEFAULT_CHANNEL_TYPE)
chunk.set_voxel(255, x, y, z, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)
for y in range(chunk.get_size_y() - sizey + 1, chunk.data_size_y):
for x in range(0, 2):
for z in range(0, 2):
chunk.set_voxel(0, hs + x, y, hs + z, VoxelChunk.DEFAULT_CHANNEL_TYPE)
for y in range(chunk.get_size_y() - sizey, chunk.get_size_y() - 1):
for x in range(hs, hs + sizex):
for z in range(hs, hs + sizez):
chunk.set_voxel(0, x, y, z, VoxelChunk.DEFAULT_CHANNEL_TYPE)
for x in range(0, 2):
for z in range(0, 2):
chunk.set_voxel(3, hs + x, chunk.get_size_y() - sizey, hs + z, VoxelChunk.DEFAULT_CHANNEL_TYPE)
chunk.set_voxel(30, x, chunk.get_size_y() - sizey, z, VoxelChunk.DEFAULT_CHANNEL_ISOLEVEL)