Loads of stuff
This commit is contained in:
parent
f3af522683
commit
66ce3ff503
413 changed files with 14802 additions and 0 deletions
63
Common/animations/Mixamo BoneMap.tres
Normal file
63
Common/animations/Mixamo BoneMap.tres
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
[gd_resource type="BoneMap" load_steps=2 format=3 uid="uid://jsmvf7l3e2tg"]
|
||||
|
||||
[sub_resource type="SkeletonProfileHumanoid" id="SkeletonProfileHumanoid_eq0yh"]
|
||||
|
||||
[resource]
|
||||
profile = SubResource("SkeletonProfileHumanoid_eq0yh")
|
||||
bonemap = null
|
||||
bone_map/Root = &""
|
||||
bone_map/Hips = &"mixamorig_Hips"
|
||||
bone_map/Spine = &"mixamorig_Spine"
|
||||
bone_map/Chest = &"mixamorig_Spine1"
|
||||
bone_map/UpperChest = &"mixamorig_Spine2"
|
||||
bone_map/Neck = &"mixamorig_Neck"
|
||||
bone_map/Head = &"mixamorig_Head"
|
||||
bone_map/LeftEye = &""
|
||||
bone_map/RightEye = &""
|
||||
bone_map/Jaw = &""
|
||||
bone_map/LeftShoulder = &"mixamorig_LeftShoulder"
|
||||
bone_map/LeftUpperArm = &"mixamorig_LeftArm"
|
||||
bone_map/LeftLowerArm = &"mixamorig_LeftForeArm"
|
||||
bone_map/LeftHand = &"mixamorig_LeftHand"
|
||||
bone_map/LeftThumbMetacarpal = &"mixamorig_LeftHandThumb2"
|
||||
bone_map/LeftThumbProximal = &"mixamorig_LeftHandThumb3"
|
||||
bone_map/LeftThumbDistal = &"mixamorig_LeftHandThumb4"
|
||||
bone_map/LeftIndexProximal = &"mixamorig_LeftHandIndex2"
|
||||
bone_map/LeftIndexIntermediate = &"mixamorig_LeftHandIndex3"
|
||||
bone_map/LeftIndexDistal = &"mixamorig_LeftHandIndex4"
|
||||
bone_map/LeftMiddleProximal = &"mixamorig_LeftHandMiddle2"
|
||||
bone_map/LeftMiddleIntermediate = &"mixamorig_LeftHandMiddle3"
|
||||
bone_map/LeftMiddleDistal = &"mixamorig_LeftHandMiddle4"
|
||||
bone_map/LeftRingProximal = &"mixamorig_LeftHandRing2"
|
||||
bone_map/LeftRingIntermediate = &"mixamorig_LeftHandRing3"
|
||||
bone_map/LeftRingDistal = &"mixamorig_LeftHandRing4"
|
||||
bone_map/LeftLittleProximal = &"mixamorig_LeftHandPinky2"
|
||||
bone_map/LeftLittleIntermediate = &"mixamorig_LeftHandPinky3"
|
||||
bone_map/LeftLittleDistal = &"mixamorig_LeftHandPinky4"
|
||||
bone_map/RightShoulder = &"mixamorig_RightShoulder"
|
||||
bone_map/RightUpperArm = &"mixamorig_RightArm"
|
||||
bone_map/RightLowerArm = &"mixamorig_RightForeArm"
|
||||
bone_map/RightHand = &"mixamorig_RightHand"
|
||||
bone_map/RightThumbMetacarpal = &"mixamorig_RightHandThumb2"
|
||||
bone_map/RightThumbProximal = &"mixamorig_RightHandThumb3"
|
||||
bone_map/RightThumbDistal = &"mixamorig_RightHandThumb4"
|
||||
bone_map/RightIndexProximal = &"mixamorig_RightHandIndex2"
|
||||
bone_map/RightIndexIntermediate = &"mixamorig_RightHandIndex3"
|
||||
bone_map/RightIndexDistal = &"mixamorig_RightHandIndex4"
|
||||
bone_map/RightMiddleProximal = &"mixamorig_RightHandMiddle2"
|
||||
bone_map/RightMiddleIntermediate = &"mixamorig_RightHandMiddle3"
|
||||
bone_map/RightMiddleDistal = &"mixamorig_RightHandMiddle4"
|
||||
bone_map/RightRingProximal = &"mixamorig_RightHandRing2"
|
||||
bone_map/RightRingIntermediate = &"mixamorig_RightHandRing3"
|
||||
bone_map/RightRingDistal = &"mixamorig_RightHandRing4"
|
||||
bone_map/RightLittleProximal = &"mixamorig_RightHandPinky2"
|
||||
bone_map/RightLittleIntermediate = &"mixamorig_RightHandPinky3"
|
||||
bone_map/RightLittleDistal = &"mixamorig_RightHandPinky4"
|
||||
bone_map/LeftUpperLeg = &"mixamorig_LeftUpLeg"
|
||||
bone_map/LeftLowerLeg = &"mixamorig_LeftLeg"
|
||||
bone_map/LeftFoot = &"mixamorig_LeftFoot"
|
||||
bone_map/LeftToes = &"mixamorig_LeftToeBase"
|
||||
bone_map/RightUpperLeg = &"mixamorig_RightUpLeg"
|
||||
bone_map/RightLowerLeg = &"mixamorig_RightLeg"
|
||||
bone_map/RightFoot = &"mixamorig_RightFoot"
|
||||
bone_map/RightToes = &"mixamorig_RightToeBase"
|
||||
BIN
Common/animations/YbotPacked.glb
Normal file
BIN
Common/animations/YbotPacked.glb
Normal file
Binary file not shown.
43
Common/animations/YbotPacked.glb.import
Normal file
43
Common/animations/YbotPacked.glb.import
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://cpfj1pxueabmh"
|
||||
path="res://.godot/imported/YbotPacked.glb-130f94c236840a667089df3d8e3daf02.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Common/animations/YbotPacked.glb"
|
||||
dest_files=["res://.godot/imported/YbotPacked.glb-130f94c236840a667089df3d8e3daf02.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
_subresources={
|
||||
"nodes": {
|
||||
"PATH:Armature/Skeleton3D": {
|
||||
"retarget/bone_map": Resource("res://common/animations/Mixamo BoneMap.tres")
|
||||
}
|
||||
}
|
||||
}
|
||||
gltf/naming_version=1
|
||||
gltf/embedded_image_handling=1
|
||||
BIN
Common/animations/basic-movement.res
Normal file
BIN
Common/animations/basic-movement.res
Normal file
Binary file not shown.
90
Common/shaders/outline.gdshader
Normal file
90
Common/shaders/outline.gdshader
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
shader_type spatial;
|
||||
render_mode unshaded;
|
||||
|
||||
uniform sampler2D screen_texture : source_color, hint_screen_texture, filter_nearest;
|
||||
uniform sampler2D depth_texture : source_color, hint_depth_texture, filter_nearest;
|
||||
uniform sampler2D normal_texture : source_color, hint_normal_roughness_texture, filter_nearest;
|
||||
|
||||
uniform float depth_threshold : hint_range(0, 1) = 0.05;
|
||||
uniform float reverse_depth_threshold : hint_range(0, 1) = 0.25;
|
||||
uniform float normal_threshold : hint_range(0, 1) = 0.6;
|
||||
|
||||
uniform float darken_amount : hint_range(0, 1, 0.01) = 0.3;
|
||||
uniform float lighten_amount : hint_range(0, 10, 0.01) = 1.5;
|
||||
|
||||
uniform vec3 normal_edge_bias = vec3(1, 1, 1);
|
||||
uniform vec3 light_direction = vec3(-0.96, -0.18, 0.2);
|
||||
|
||||
float get_depth(vec2 screen_uv, mat4 inv_projection_matrix) {
|
||||
float depth = texture(depth_texture, screen_uv).r;
|
||||
vec3 ndc = vec3(screen_uv * 2.0 - 1.0, depth);
|
||||
vec4 view = inv_projection_matrix * vec4(ndc, 1.0);
|
||||
view.xyz /= view.w;
|
||||
return -view.z;
|
||||
}
|
||||
|
||||
void vertex() {
|
||||
POSITION = vec4(VERTEX.xy, 1.0, 1.0);
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
float depth = get_depth(SCREEN_UV, INV_PROJECTION_MATRIX);
|
||||
vec3 normal = texture(normal_texture, SCREEN_UV).xyz * 2.0 - 1.0;
|
||||
vec2 texel_size = 1.0 / VIEWPORT_SIZE.xy;
|
||||
|
||||
vec2 uvs[4];
|
||||
uvs[0] = vec2(SCREEN_UV.x, min(1.0 - 0.001, SCREEN_UV.y + texel_size.y));
|
||||
uvs[1] = vec2(SCREEN_UV.x, max(0.0, SCREEN_UV.y - texel_size.y));
|
||||
uvs[2] = vec2(min(1.0 - 0.001, SCREEN_UV.x + texel_size.x), SCREEN_UV.y);
|
||||
uvs[3] = vec2(max(0.0, SCREEN_UV.x - texel_size.x), SCREEN_UV.y);
|
||||
|
||||
float depth_diff = 0.0;
|
||||
float depth_diff_reversed = 0.0;
|
||||
float nearest_depth = depth;
|
||||
vec2 nearest_uv = SCREEN_UV;
|
||||
|
||||
float normal_sum = 0.0;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
float d = get_depth(uvs[i], INV_PROJECTION_MATRIX);
|
||||
depth_diff += depth - d;
|
||||
depth_diff_reversed += d - depth;
|
||||
|
||||
if (d < nearest_depth) {
|
||||
nearest_depth = d;
|
||||
nearest_uv = uvs[i];
|
||||
}
|
||||
|
||||
vec3 n = texture(normal_texture, uvs[i]).xyz * 2.0 - 1.0;
|
||||
vec3 normal_diff = normal - n;
|
||||
|
||||
// Edge pixels should yield to the normal closest to the bias direction
|
||||
float normal_bias_diff = dot(normal_diff, normal_edge_bias);
|
||||
float normal_indicator = smoothstep(-0.01, 0.01, normal_bias_diff);
|
||||
|
||||
normal_sum += dot(normal_diff, normal_diff) * normal_indicator;
|
||||
}
|
||||
float depth_edge = step(depth_threshold, depth_diff);
|
||||
|
||||
// The reverse depth sum produces depth lines inside of the object, but they don't look as nice as the normal depth_diff
|
||||
// Instead, we can use this value to mask the normal edge along the outside of the object
|
||||
float reverse_depth_edge = step(reverse_depth_threshold, depth_diff_reversed);
|
||||
|
||||
float indicator = sqrt(normal_sum);
|
||||
float normal_edge = step(normal_threshold, indicator - reverse_depth_edge);
|
||||
|
||||
vec3 original = texture(screen_texture, SCREEN_UV).rgb;
|
||||
vec3 nearest = texture(screen_texture, nearest_uv).rgb;
|
||||
|
||||
mat3 view_to_world_normal_mat = mat3(
|
||||
INV_VIEW_MATRIX[0].xyz,
|
||||
INV_VIEW_MATRIX[1].xyz,
|
||||
INV_VIEW_MATRIX[2].xyz
|
||||
);
|
||||
float ld = dot((view_to_world_normal_mat * normal), normalize(light_direction));
|
||||
|
||||
vec3 depth_col = nearest * darken_amount;
|
||||
vec3 normal_col = original * (ld > 0.0 ? darken_amount : lighten_amount);
|
||||
vec3 edge_mix = mix(normal_col, depth_col, depth_edge);
|
||||
|
||||
ALBEDO = mix(original, edge_mix, (depth_edge > 0.0 ? depth_edge : normal_edge));
|
||||
}
|
||||
1
Common/shaders/outline.gdshader.uid
Normal file
1
Common/shaders/outline.gdshader.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bsemnmdracd4m
|
||||
Loading…
Add table
Add a link
Reference in a new issue