-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial Commit of Codebase from prior repo
- Loading branch information
Showing
131 changed files
with
9,332 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
extends Spatial | ||
class_name Chunk | ||
|
||
|
||
const subd_level = 0.1 | ||
const height_scalar = 60 | ||
|
||
|
||
var mesh_instance | ||
var noise | ||
var x | ||
var z | ||
var chunk_size | ||
var should_remove = true | ||
|
||
# ctor | ||
func _init(noise, x, z, chunk_size): | ||
self.noise = noise | ||
self.x = x | ||
self.z = z | ||
self.chunk_size = chunk_size | ||
|
||
|
||
func _ready(): | ||
generate_chunk() | ||
|
||
func generate_chunk(): | ||
var plane_mesh = PlaneMesh.new() | ||
plane_mesh.size = Vector2(chunk_size, chunk_size) | ||
plane_mesh.subdivide_depth = chunk_size * subd_level | ||
plane_mesh.subdivide_width = chunk_size * subd_level | ||
|
||
plane_mesh.material = load("res://Chunk/Chunk.material") | ||
|
||
var surface_tool = SurfaceTool.new() | ||
var data_tool = MeshDataTool.new() | ||
|
||
surface_tool.create_from(plane_mesh, 0) | ||
var array_plane = surface_tool.commit() | ||
var error = data_tool.create_from_surface(array_plane, 0) | ||
|
||
for i in range(data_tool.get_vertex_count()): | ||
var vertex = data_tool.get_vertex(i) | ||
|
||
vertex.y = noise.get_noise_3d(vertex.x + x, vertex.y, vertex.z + z) * height_scalar | ||
|
||
data_tool.set_vertex(i, vertex) | ||
|
||
for s in range(array_plane.get_surface_count()): | ||
array_plane.surface_remove(s) | ||
|
||
data_tool.commit_to_surface(array_plane) | ||
surface_tool.begin(Mesh.PRIMITIVE_TRIANGLES) | ||
surface_tool.create_from(array_plane, 0) | ||
surface_tool.generate_normals() | ||
|
||
mesh_instance = MeshInstance.new() | ||
mesh_instance.mesh = surface_tool.commit() | ||
mesh_instance.create_trimesh_collision() | ||
mesh_instance.cast_shadow = GeometryInstance.SHADOW_CASTING_SETTING_OFF | ||
add_child(mesh_instance) | ||
|
||
|
||
|
||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[gd_scene load_steps=2 format=2] | ||
|
||
[ext_resource path="res://Chunk/Chunk.gd" type="Script" id=1] | ||
|
||
[node name="Chunk" type="Spatial"] | ||
script = ExtResource( 1 ) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="StreamTexture" | ||
path="res://.import/Corpusim_Logo_20220105.png-40be108785361fc5503ee1679e686094.stex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://Images/Corpusim_Logo_20220105.png" | ||
dest_files=[ "res://.import/Corpusim_Logo_20220105.png-40be108785361fc5503ee1679e686094.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 | ||
process/normal_map_invert_y=false | ||
stream=false | ||
size_limit=0 | ||
detect_3d=true | ||
svg/scale=1.0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="StreamTexture" | ||
path.s3tc="res://.import/Bark001_1K_Color.jpg-ac84f2789a6ec3a122d2af29a84b5d48.s3tc.stex" | ||
path.etc2="res://.import/Bark001_1K_Color.jpg-ac84f2789a6ec3a122d2af29a84b5d48.etc2.stex" | ||
metadata={ | ||
"imported_formats": [ "s3tc", "etc2" ], | ||
"vram_texture": true | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://Materials/Bark/Bark001_1K_Color.jpg" | ||
dest_files=[ "res://.import/Bark001_1K_Color.jpg-ac84f2789a6ec3a122d2af29a84b5d48.s3tc.stex", "res://.import/Bark001_1K_Color.jpg-ac84f2789a6ec3a122d2af29a84b5d48.etc2.stex" ] | ||
|
||
[params] | ||
|
||
compress/mode=2 | ||
compress/lossy_quality=0.7 | ||
compress/hdr_mode=0 | ||
compress/bptc_ldr=0 | ||
compress/normal_map=0 | ||
flags/repeat=true | ||
flags/filter=true | ||
flags/mipmaps=true | ||
flags/anisotropic=false | ||
flags/srgb=1 | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/HDR_as_SRGB=false | ||
process/invert_color=false | ||
process/normal_map_invert_y=false | ||
stream=false | ||
size_limit=0 | ||
detect_3d=false | ||
svg/scale=1.0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="StreamTexture" | ||
path.s3tc="res://.import/Bark001_1K_Displacement.jpg-2c8211d01cef53da8fc528a79f04c187.s3tc.stex" | ||
path.etc2="res://.import/Bark001_1K_Displacement.jpg-2c8211d01cef53da8fc528a79f04c187.etc2.stex" | ||
metadata={ | ||
"imported_formats": [ "s3tc", "etc2" ], | ||
"vram_texture": true | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://Materials/Bark/Bark001_1K_Displacement.jpg" | ||
dest_files=[ "res://.import/Bark001_1K_Displacement.jpg-2c8211d01cef53da8fc528a79f04c187.s3tc.stex", "res://.import/Bark001_1K_Displacement.jpg-2c8211d01cef53da8fc528a79f04c187.etc2.stex" ] | ||
|
||
[params] | ||
|
||
compress/mode=2 | ||
compress/lossy_quality=0.7 | ||
compress/hdr_mode=0 | ||
compress/bptc_ldr=0 | ||
compress/normal_map=0 | ||
flags/repeat=true | ||
flags/filter=true | ||
flags/mipmaps=true | ||
flags/anisotropic=false | ||
flags/srgb=1 | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/HDR_as_SRGB=false | ||
process/invert_color=false | ||
process/normal_map_invert_y=false | ||
stream=false | ||
size_limit=0 | ||
detect_3d=false | ||
svg/scale=1.0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="StreamTexture" | ||
path.s3tc="res://.import/Bark001_1K_NormalGL.jpg-c140188b36ae61577638814add33e438.s3tc.stex" | ||
path.etc2="res://.import/Bark001_1K_NormalGL.jpg-c140188b36ae61577638814add33e438.etc2.stex" | ||
metadata={ | ||
"imported_formats": [ "s3tc", "etc2" ], | ||
"vram_texture": true | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://Materials/Bark/Bark001_1K_NormalGL.jpg" | ||
dest_files=[ "res://.import/Bark001_1K_NormalGL.jpg-c140188b36ae61577638814add33e438.s3tc.stex", "res://.import/Bark001_1K_NormalGL.jpg-c140188b36ae61577638814add33e438.etc2.stex" ] | ||
|
||
[params] | ||
|
||
compress/mode=2 | ||
compress/lossy_quality=0.7 | ||
compress/hdr_mode=0 | ||
compress/bptc_ldr=0 | ||
compress/normal_map=1 | ||
flags/repeat=true | ||
flags/filter=true | ||
flags/mipmaps=true | ||
flags/anisotropic=false | ||
flags/srgb=2 | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/HDR_as_SRGB=false | ||
process/invert_color=false | ||
process/normal_map_invert_y=false | ||
stream=false | ||
size_limit=0 | ||
detect_3d=false | ||
svg/scale=1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="StreamTexture" | ||
path.s3tc="res://.import/Bark001_1K_NormalGL.png-7f6051b757606434896cdb4cc7b7aecf.s3tc.stex" | ||
path.etc2="res://.import/Bark001_1K_NormalGL.png-7f6051b757606434896cdb4cc7b7aecf.etc2.stex" | ||
metadata={ | ||
"imported_formats": [ "s3tc", "etc2" ], | ||
"vram_texture": true | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://Materials/Bark/Bark001_1K_NormalGL.png" | ||
dest_files=[ "res://.import/Bark001_1K_NormalGL.png-7f6051b757606434896cdb4cc7b7aecf.s3tc.stex", "res://.import/Bark001_1K_NormalGL.png-7f6051b757606434896cdb4cc7b7aecf.etc2.stex" ] | ||
|
||
[params] | ||
|
||
compress/mode=2 | ||
compress/lossy_quality=0.7 | ||
compress/hdr_mode=0 | ||
compress/bptc_ldr=0 | ||
compress/normal_map=1 | ||
flags/repeat=true | ||
flags/filter=true | ||
flags/mipmaps=true | ||
flags/anisotropic=false | ||
flags/srgb=2 | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/HDR_as_SRGB=false | ||
process/invert_color=false | ||
process/normal_map_invert_y=false | ||
stream=false | ||
size_limit=0 | ||
detect_3d=false | ||
svg/scale=1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[gd_resource type="SpatialMaterial" load_steps=3 format=2] | ||
|
||
[ext_resource path="res://Materials/Lava005/Lava005_1K_Roughness.png" type="Texture" id=1] | ||
[ext_resource path="res://Materials/Lava005/Lava005_1K_NormalGL.png" type="Texture" id=2] | ||
|
||
[resource] | ||
albedo_color = Color( 0.843137, 0.54902, 0.486275, 1 ) | ||
albedo_texture = ExtResource( 1 ) | ||
normal_enabled = true | ||
normal_scale = 1.0 | ||
normal_texture = ExtResource( 2 ) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="StreamTexture" | ||
path.s3tc="res://.import/Lava005_1K_Displacement.png-129b0c07f682807678782c1dfdeae2df.s3tc.stex" | ||
path.etc2="res://.import/Lava005_1K_Displacement.png-129b0c07f682807678782c1dfdeae2df.etc2.stex" | ||
metadata={ | ||
"imported_formats": [ "s3tc", "etc2" ], | ||
"vram_texture": true | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://Materials/Lava005/Lava005_1K_Displacement.png" | ||
dest_files=[ "res://.import/Lava005_1K_Displacement.png-129b0c07f682807678782c1dfdeae2df.s3tc.stex", "res://.import/Lava005_1K_Displacement.png-129b0c07f682807678782c1dfdeae2df.etc2.stex" ] | ||
|
||
[params] | ||
|
||
compress/mode=2 | ||
compress/lossy_quality=0.7 | ||
compress/hdr_mode=0 | ||
compress/bptc_ldr=0 | ||
compress/normal_map=0 | ||
flags/repeat=true | ||
flags/filter=true | ||
flags/mipmaps=true | ||
flags/anisotropic=false | ||
flags/srgb=1 | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/HDR_as_SRGB=false | ||
process/invert_color=false | ||
process/normal_map_invert_y=false | ||
stream=false | ||
size_limit=0 | ||
detect_3d=false | ||
svg/scale=1.0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="StreamTexture" | ||
path.s3tc="res://.import/Lava005_1K_NormalGL.png-4263c82a32da1bb6e8678426ae6f0786.s3tc.stex" | ||
path.etc2="res://.import/Lava005_1K_NormalGL.png-4263c82a32da1bb6e8678426ae6f0786.etc2.stex" | ||
metadata={ | ||
"imported_formats": [ "s3tc", "etc2" ], | ||
"vram_texture": true | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://Materials/Lava005/Lava005_1K_NormalGL.png" | ||
dest_files=[ "res://.import/Lava005_1K_NormalGL.png-4263c82a32da1bb6e8678426ae6f0786.s3tc.stex", "res://.import/Lava005_1K_NormalGL.png-4263c82a32da1bb6e8678426ae6f0786.etc2.stex" ] | ||
|
||
[params] | ||
|
||
compress/mode=2 | ||
compress/lossy_quality=0.7 | ||
compress/hdr_mode=0 | ||
compress/bptc_ldr=0 | ||
compress/normal_map=1 | ||
flags/repeat=true | ||
flags/filter=true | ||
flags/mipmaps=true | ||
flags/anisotropic=false | ||
flags/srgb=2 | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/HDR_as_SRGB=false | ||
process/invert_color=false | ||
process/normal_map_invert_y=false | ||
stream=false | ||
size_limit=0 | ||
detect_3d=false | ||
svg/scale=1.0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="StreamTexture" | ||
path.s3tc="res://.import/Lava005_1K_Roughness.png-38e15f9abc6e1202a3227d88973b4801.s3tc.stex" | ||
path.etc2="res://.import/Lava005_1K_Roughness.png-38e15f9abc6e1202a3227d88973b4801.etc2.stex" | ||
metadata={ | ||
"imported_formats": [ "s3tc", "etc2" ], | ||
"vram_texture": true | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://Materials/Lava005/Lava005_1K_Roughness.png" | ||
dest_files=[ "res://.import/Lava005_1K_Roughness.png-38e15f9abc6e1202a3227d88973b4801.s3tc.stex", "res://.import/Lava005_1K_Roughness.png-38e15f9abc6e1202a3227d88973b4801.etc2.stex" ] | ||
|
||
[params] | ||
|
||
compress/mode=2 | ||
compress/lossy_quality=0.7 | ||
compress/hdr_mode=0 | ||
compress/bptc_ldr=0 | ||
compress/normal_map=0 | ||
flags/repeat=true | ||
flags/filter=true | ||
flags/mipmaps=true | ||
flags/anisotropic=false | ||
flags/srgb=1 | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/HDR_as_SRGB=false | ||
process/invert_color=false | ||
process/normal_map_invert_y=false | ||
stream=false | ||
size_limit=0 | ||
detect_3d=false | ||
svg/scale=1.0 |
Oops, something went wrong.