Added dead shrubs

master
Marc Gilleron 2020-08-05 20:06:19 +01:00
parent 099ad1dfcd
commit f2eeb2c6c7
7 changed files with 110 additions and 17 deletions

View File

@ -144,6 +144,14 @@ func _init():
"voxels": ["leaves"],
"transparent": true
})
_create_block({
"name": "dead_shrub",
"gui_model": "dead_shrub.obj",
"rotation_type": ROTATION_TYPE_NONE,
"voxels": ["dead_shrub"],
"transparent": true,
"backface_culling": false
})
func get_block(id: int) -> Block:

View File

@ -0,0 +1,24 @@
# Blender v2.83.0 OBJ File: 'blocks.blend'
# www.blender.org
o DeadShrub_Cube.030
v 0.887023 0.812500 0.887023
v 0.887023 0.000000 0.887023
v 0.112977 0.812500 0.887023
v 0.112977 0.000000 0.887023
v 0.887023 0.812500 0.112977
v 0.887023 0.000000 0.112977
v 0.112977 0.812500 0.112977
v 0.112977 0.000000 0.112977
vt 0.375000 0.875000
vt 0.437500 0.875000
vt 0.437500 0.933594
vt 0.375000 0.933594
vt 0.437500 0.933594
vt 0.375000 0.933594
vt 0.375000 0.875000
vt 0.437500 0.875000
vn 0.7071 0.0000 0.7071
vn -0.7071 0.0000 0.7071
s off
f 4/1/1 6/2/1 5/3/1 3/4/1
f 1/5/2 7/6/2 8/7/2 2/8/2

View File

@ -0,0 +1,19 @@
[remap]
importer="wavefront_obj"
type="Mesh"
path="res://.import/dead_shrub.obj-4db4a9c737c4cc4564f5f637fbf26f2d.mesh"
[deps]
files=[ "res://.import/dead_shrub.obj-4db4a9c737c4cc4564f5f637fbf26f2d.mesh" ]
source_file="res://blocky_game/blocks/dead_shrub/dead_shrub.obj"
dest_files=[ "res://.import/dead_shrub.obj-4db4a9c737c4cc4564f5f637fbf26f2d.mesh", "res://.import/dead_shrub.obj-4db4a9c737c4cc4564f5f637fbf26f2d.mesh" ]
[params]
generate_tangents=true
scale_mesh=Vector3( 1, 1, 1 )
offset_mesh=Vector3( 0, 0, 0 )
optimize_mesh=true

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/dead_shrub_sprite.png-ef4435cfec4a4c09b52713f461e46357.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://blocky_game/blocks/dead_shrub/dead_shrub_sprite.png"
dest_files=[ "res://.import/dead_shrub_sprite.png-ef4435cfec4a4c09b52713f461e46357.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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

@ -1,4 +1,4 @@
[gd_resource type="VoxelLibrary" load_steps=52 format=2]
[gd_resource type="VoxelLibrary" load_steps=54 format=2]
[ext_resource path="res://blocky_game/blocks/grass/grass.obj" type="ArrayMesh" id=1]
[ext_resource path="res://blocky_game/blocks/dirt/dirt.obj" type="ArrayMesh" id=2]
@ -25,6 +25,7 @@
[ext_resource path="res://blocky_game/blocks/rail/rail_turn_pz.obj" type="ArrayMesh" id=23]
[ext_resource path="res://blocky_game/blocks/rail/rail_slope_nx.obj" type="ArrayMesh" id=24]
[ext_resource path="res://blocky_game/blocks/leaves/leaves.obj" type="ArrayMesh" id=25]
[ext_resource path="res://blocky_game/blocks/dead_shrub/dead_shrub.obj" type="ArrayMesh" id=26]
[sub_resource type="Voxel" id=1]
voxel_name = "air"
@ -166,7 +167,7 @@ custom_mesh = ExtResource( 17 )
collision_aabbs = [ AABB( 0, 0, 0, 1, 0.125, 1 ) ]
collision_mask = 2
[sub_resource type="Voxel" id=26]
[sub_resource type="Voxel" id=19]
voxel_name = "leaves"
transparent = true
material_id = 2
@ -174,46 +175,52 @@ geometry_type = 2
custom_mesh = ExtResource( 25 )
collision_aabbs = [ AABB( 0, 0, 0, 1, 1, 1 ) ]
[sub_resource type="Voxel" id=19]
[sub_resource type="Voxel" id=27]
voxel_name = "dead_shrub"
material_id = 2
geometry_type = 2
custom_mesh = ExtResource( 26 )
[sub_resource type="Voxel" id=20]
voxel_name = "log_x"
random_tickable = true
geometry_type = 2
custom_mesh = ExtResource( 4 )
collision_aabbs = [ AABB( 0, 0, 0, 1, 1, 1 ) ]
[sub_resource type="Voxel" id=20]
[sub_resource type="Voxel" id=21]
voxel_name = "log_y"
random_tickable = true
geometry_type = 2
custom_mesh = ExtResource( 3 )
collision_aabbs = [ AABB( 0, 0, 0, 1, 1, 1 ) ]
[sub_resource type="Voxel" id=21]
[sub_resource type="Voxel" id=22]
voxel_name = "log_z"
random_tickable = true
geometry_type = 2
custom_mesh = ExtResource( 5 )
collision_aabbs = [ AABB( 0, 0, 0, 1, 1, 1 ) ]
[sub_resource type="Voxel" id=22]
[sub_resource type="Voxel" id=23]
voxel_name = "stairs_nx"
geometry_type = 2
custom_mesh = ExtResource( 6 )
collision_aabbs = [ AABB( 0, 0, 0, 1, 1, 1 ) ]
[sub_resource type="Voxel" id=23]
[sub_resource type="Voxel" id=24]
voxel_name = "planks"
geometry_type = 2
custom_mesh = ExtResource( 7 )
collision_aabbs = [ AABB( 0, 0, 0, 1, 1, 1 ) ]
[sub_resource type="Voxel" id=24]
[sub_resource type="Voxel" id=25]
voxel_name = "tall_grass"
material_id = 2
geometry_type = 2
custom_mesh = ExtResource( 8 )
[sub_resource type="Voxel" id=25]
[sub_resource type="Voxel" id=26]
voxel_name = "stairs_nz"
geometry_type = 2
custom_mesh = ExtResource( 11 )
@ -223,13 +230,13 @@ collision_aabbs = [ AABB( 0, 0, 0, 1, 1, 1 ) ]
voxels/0 = SubResource( 1 )
voxels/1 = SubResource( 2 )
voxels/2 = SubResource( 13 )
voxels/3 = SubResource( 19 )
voxels/4 = SubResource( 20 )
voxels/5 = SubResource( 21 )
voxels/6 = SubResource( 22 )
voxels/7 = SubResource( 23 )
voxels/8 = SubResource( 24 )
voxels/9 = SubResource( 25 )
voxels/3 = SubResource( 20 )
voxels/4 = SubResource( 21 )
voxels/5 = SubResource( 22 )
voxels/6 = SubResource( 23 )
voxels/7 = SubResource( 24 )
voxels/8 = SubResource( 25 )
voxels/9 = SubResource( 26 )
voxels/10 = SubResource( 3 )
voxels/11 = SubResource( 4 )
voxels/12 = SubResource( 5 )
@ -245,4 +252,5 @@ voxels/21 = SubResource( 15 )
voxels/22 = SubResource( 16 )
voxels/23 = SubResource( 17 )
voxels/24 = SubResource( 18 )
voxels/25 = SubResource( 26 )
voxels/25 = SubResource( 19 )
voxels/26 = SubResource( 27 )