diff --git a/code/pawn/Pawn.cs b/code/pawn/Pawn.cs
index 1317a2b..5a47c91 100644
--- a/code/pawn/Pawn.cs
+++ b/code/pawn/Pawn.cs
@@ -75,6 +75,8 @@ public BBox Hull
public override Ray AimRay => new Ray( EyePosition, EyeRotation.Forward );
+ public AnimatedEntity ShadowModel;
+
///
/// Called when the entity is first created
///
@@ -91,6 +93,13 @@ public override void Spawn()
CameraHelper.SetParent( this, "CameraJoint" );
PostProcessing = Camera.Main.FindOrCreateHook();
+
+ EnableShadowCasting = false;
+
+ ShadowModel = new( "models/faith_shadow.vmdl" );
+ ShadowModel.SetParent( this, true );
+ ShadowModel.EnableShadowOnly = true;
+ ShadowModel.EnableShadowCasting = true;
}
public void UpdatePostProcessing()
@@ -264,4 +273,11 @@ protected void SimulateRotation()
EyeRotation = ViewAngles.ToRotation();
Rotation = ViewAngles.WithPitch( 0f ).ToRotation();
}
+
+ protected override void OnDestroy()
+ {
+ base.OnDestroy();
+
+ ShadowModel?.Delete();
+ }
}
diff --git a/materials/faith_arms/faith_merged.vmat b/materials/faith_arms/faith_merged.vmat
new file mode 100644
index 0000000..cf3b8ff
--- /dev/null
+++ b/materials/faith_arms/faith_merged.vmat
@@ -0,0 +1,42 @@
+// THIS FILE IS AUTO-GENERATED
+
+Layer0
+{
+ shader "shaders/complex.shader"
+
+ //---- PBR ----
+ F_SPECULAR 1
+
+ //---- Ambient Occlusion ----
+ g_flAmbientOcclusionDirectDiffuse "0.000"
+ g_flAmbientOcclusionDirectSpecular "0.000"
+ TextureAmbientOcclusion "materials/default/default_ao.tga"
+
+ //---- Color ----
+ g_flModelTintAmount "1.000"
+ g_vColorTint "[1.000000 1.000000 1.000000 0.000000]"
+ TextureColor "textures/faith_body/asia_fixer_merged_color.tga"
+
+ //---- Fade ----
+ g_flFadeExponent "1.000"
+
+ //---- Fog ----
+ g_bFogEnabled "1"
+
+ //---- Metalness ----
+ g_flMetalness "0.000"
+
+ //---- Normal ----
+ TextureNormal "textures/faith_body/asia_fixer_merged_normal.tga"
+
+ //---- Roughness ----
+ g_flRoughnessScaleFactor "1.000"
+ TextureRoughness "textures/faith_body/asia_fixer_merged_roughness.tga"
+
+ //---- Texture Coordinates ----
+ g_nScaleTexCoordUByModelScaleAxis "0"
+ g_nScaleTexCoordVByModelScaleAxis "0"
+ g_vTexCoordOffset "[0.000 0.000]"
+ g_vTexCoordScale "[1.000 1.000]"
+ g_vTexCoordScrollSpeed "[0.000 0.000]"
+}
\ No newline at end of file
diff --git a/materials/faith_arms/mi_female_arm_glove.vmat b/materials/faith_arms/mi_female_arm_glove.vmat
index 0050b48..a7f7b34 100644
--- a/materials/faith_arms/mi_female_arm_glove.vmat
+++ b/materials/faith_arms/mi_female_arm_glove.vmat
@@ -1,21 +1,42 @@
-"Layer0"
+// THIS FILE IS AUTO-GENERATED
+
+Layer0
{
- "shader" "shaders/complex.shader"
- "g_flAmbientOcclusionDirectDiffuse" "0.000000"
- "g_flAmbientOcclusionDirectSpecular" "0.000000"
- "TextureAmbientOcclusion" "materials/default/default_ao.tga"
- "g_flModelTintAmount" "1.000000"
- "g_vColorTint" "[1.000000 1.000000 1.000000 0.000000]"
- "TextureColor" "textures/faith_arms/faith_glove_c.tga"
- "g_flFadeExponent" "1.000000"
- "g_bFogEnabled" "1"
- "g_flMetalness" "0.000000"
- "TextureNormal" "textures/faith_arms/faith_glove_n.tga"
- "g_flRoughnessScaleFactor" "1.000000"
- "TextureRoughness" "textures/faith_arms/faith_glove_s.tga"
- "g_nScaleTexCoordUByModelScaleAxis" "0"
- "g_nScaleTexCoordVByModelScaleAxis" "0"
- "g_vTexCoordOffset" "[0.000 0.000]"
- "g_vTexCoordScale" "[1.000 1.000]"
- "g_vTexCoordScrollSpeed" "[0.000 0.000]"
-}
+ shader "shaders/complex.shader"
+
+ //---- PBR ----
+ F_SPECULAR 1
+
+ //---- Ambient Occlusion ----
+ g_flAmbientOcclusionDirectDiffuse "0.000"
+ g_flAmbientOcclusionDirectSpecular "0.000"
+ TextureAmbientOcclusion "materials/default/default_ao.tga"
+
+ //---- Color ----
+ g_flModelTintAmount "1.000"
+ g_vColorTint "[1.000000 1.000000 1.000000 0.000000]"
+ TextureColor "textures/faith_arms/faith_glove_c.tga"
+
+ //---- Fade ----
+ g_flFadeExponent "1.000"
+
+ //---- Fog ----
+ g_bFogEnabled "1"
+
+ //---- Metalness ----
+ g_flMetalness "0.000"
+
+ //---- Normal ----
+ TextureNormal "textures/faith_arms/faith_glove_n.tga"
+
+ //---- Roughness ----
+ g_flRoughnessScaleFactor "1.000"
+ TextureRoughness "textures/faith_arms/faith_glove_rough.tga"
+
+ //---- Texture Coordinates ----
+ g_nScaleTexCoordUByModelScaleAxis "0"
+ g_nScaleTexCoordVByModelScaleAxis "0"
+ g_vTexCoordOffset "[0.000 0.000]"
+ g_vTexCoordScale "[1.000 1.000]"
+ g_vTexCoordScrollSpeed "[0.000 0.000]"
+}
\ No newline at end of file
diff --git a/materials/faith_arms/mi_female_arm_skinn.vmat b/materials/faith_arms/mi_female_arm_skinn.vmat
index b98dd52..08317c1 100644
--- a/materials/faith_arms/mi_female_arm_skinn.vmat
+++ b/materials/faith_arms/mi_female_arm_skinn.vmat
@@ -1,21 +1,42 @@
-"Layer0"
+// THIS FILE IS AUTO-GENERATED
+
+Layer0
{
- "shader" "shaders/complex.shader"
- "g_flAmbientOcclusionDirectDiffuse" "0.000000"
- "g_flAmbientOcclusionDirectSpecular" "0.000000"
- "TextureAmbientOcclusion" "materials/default/default_ao.tga"
- "g_flModelTintAmount" "1.000000"
- "g_vColorTint" "[1.000000 1.000000 1.000000 0.000000]"
- "TextureColor" "textures/faith_arms/female_1p_c.tga"
- "g_flFadeExponent" "1.000000"
- "g_bFogEnabled" "1"
- "g_flMetalness" "0.000000"
- "TextureNormal" "textures/faith_arms/female_1p_n.tga"
- "g_flRoughnessScaleFactor" "1.000000"
- "TextureRoughness" "textures/faith_arms/female_1p_s.tga"
- "g_nScaleTexCoordUByModelScaleAxis" "0"
- "g_nScaleTexCoordVByModelScaleAxis" "0"
- "g_vTexCoordOffset" "[0.000 0.000]"
- "g_vTexCoordScale" "[1.000 1.000]"
- "g_vTexCoordScrollSpeed" "[0.000 0.000]"
-}
+ shader "shaders/complex.shader"
+
+ //---- PBR ----
+ F_SPECULAR 1
+
+ //---- Ambient Occlusion ----
+ g_flAmbientOcclusionDirectDiffuse "0.000"
+ g_flAmbientOcclusionDirectSpecular "0.000"
+ TextureAmbientOcclusion "materials/default/default_ao.tga"
+
+ //---- Color ----
+ g_flModelTintAmount "1.000"
+ g_vColorTint "[1.000000 1.000000 1.000000 0.000000]"
+ TextureColor "textures/faith_arms/female_1p_c.tga"
+
+ //---- Fade ----
+ g_flFadeExponent "1.000"
+
+ //---- Fog ----
+ g_bFogEnabled "1"
+
+ //---- Metalness ----
+ g_flMetalness "0.000"
+
+ //---- Normal ----
+ TextureNormal "textures/faith_arms/female_1p_n.tga"
+
+ //---- Roughness ----
+ g_flRoughnessScaleFactor "1.000"
+ TextureRoughness "textures/faith_arms/female_1p_roughness.tga"
+
+ //---- Texture Coordinates ----
+ g_nScaleTexCoordUByModelScaleAxis "0"
+ g_nScaleTexCoordVByModelScaleAxis "0"
+ g_vTexCoordOffset "[0.000 0.000]"
+ g_vTexCoordScale "[1.000 1.000]"
+ g_vTexCoordScrollSpeed "[0.000 0.000]"
+}
\ No newline at end of file
diff --git a/model_source/faith_v2/faith_3p.dmx b/model_source/faith_v2/faith_3p.dmx
new file mode 100644
index 0000000..c2d054d
Binary files /dev/null and b/model_source/faith_v2/faith_3p.dmx differ
diff --git a/model_source/faith_v2/faith_shadow_full.dmx b/model_source/faith_v2/faith_shadow_full.dmx
new file mode 100644
index 0000000..6d40c03
Binary files /dev/null and b/model_source/faith_v2/faith_shadow_full.dmx differ
diff --git a/model_source/faith_v2/faithv2.dmx b/model_source/faith_v2/faithv2.dmx
new file mode 100644
index 0000000..117bb43
Binary files /dev/null and b/model_source/faith_v2/faithv2.dmx differ
diff --git a/models/faith_shadow.vmdl b/models/faith_shadow.vmdl
new file mode 100644
index 0000000..52a1ee8
--- /dev/null
+++ b/models/faith_shadow.vmdl
@@ -0,0 +1,69 @@
+
+{
+ rootNode =
+ {
+ _class = "RootNode"
+ children =
+ [
+ {
+ _class = "ModelModifierList"
+ children =
+ [
+ {
+ _class = "ModelModifier_ScaleAndMirror"
+ scale = 39.369999
+ mirror_x = false
+ mirror_y = false
+ mirror_z = false
+ flip_bone_forward = false
+ swap_left_and_right_bones = false
+ },
+ ]
+ },
+ {
+ _class = "MaterialGroupList"
+ children =
+ [
+ {
+ _class = "DefaultMaterialGroup"
+ remaps =
+ [
+ {
+ from = "shadow.vmat"
+ to = "materials/tools/toolsblocklight.vmat"
+ },
+ ]
+ use_global_default = false
+ global_default_material = ""
+ },
+ ]
+ },
+ {
+ _class = "RenderMeshList"
+ children =
+ [
+ {
+ _class = "RenderMeshFile"
+ filename = "model_source/faith_v2/faith_shadow_full.dmx"
+ import_translation = [ 0.0, 0.0, 0.0 ]
+ import_rotation = [ 0.0, 0.0, 0.0 ]
+ import_scale = 1.0
+ align_origin_x_type = "None"
+ align_origin_y_type = "None"
+ align_origin_z_type = "None"
+ parent_bone = ""
+ import_filter =
+ {
+ exclude_by_default = false
+ exception_list = [ ]
+ }
+ },
+ ]
+ },
+ ]
+ model_archetype = ""
+ primary_associated_entity = ""
+ anim_graph_name = "animgraphs/faith_arms.vanmgrph"
+ base_model_name = ""
+ }
+}
\ No newline at end of file
diff --git a/models/faith_v2.vmdl b/models/faith_v2.vmdl
index 7d22807..d984adf 100644
--- a/models/faith_v2.vmdl
+++ b/models/faith_v2.vmdl
@@ -11,17 +11,13 @@
[
{
_class = "ModelModifier_ScaleAndMirror"
- scale = 35.0
+ scale = 39.369999
mirror_x = false
mirror_y = false
mirror_z = false
flip_bone_forward = false
swap_left_and_right_bones = false
},
- {
- _class = "ModelModifier_Translate"
- translation = [ 0.0, 0.0, 0.0 ]
- },
]
},
{
@@ -41,12 +37,8 @@
to = "materials/faith_arms/mi_female_arm_skinn.vmat"
},
{
- from = "mi_faith_lowres_upper.vmat"
- to = "materials/faith_arms/mi_faith_lowres_upper.vmat"
- },
- {
- from = "mi_shtest.vmat"
- to = "materials/faith_arms/mi_shtest.vmat"
+ from = "faith_merged.vmat"
+ to = "materials/faith_arms/faith_merged.vmat"
},
]
use_global_default = false
@@ -60,7 +52,7 @@
[
{
_class = "RenderMeshFile"
- filename = "model_source/faith_v2/Collection.dmx"
+ filename = "model_source/faith_v2/faithv2.dmx"
import_translation = [ 0.0, 0.0, 0.0 ]
import_rotation = [ 0.0, 0.0, 0.0 ]
import_scale = 1.0
diff --git a/textures/faith_arms/Faith_Glove_C.tga b/textures/faith_arms/Faith_Glove_C.tga
index c9aa40c..76d1620 100644
Binary files a/textures/faith_arms/Faith_Glove_C.tga and b/textures/faith_arms/Faith_Glove_C.tga differ
diff --git a/textures/faith_arms/Faith_Glove_Rough.tga b/textures/faith_arms/Faith_Glove_Rough.tga
new file mode 100644
index 0000000..22971da
Binary files /dev/null and b/textures/faith_arms/Faith_Glove_Rough.tga differ
diff --git a/textures/faith_arms/Female_1p_Roughness.tga b/textures/faith_arms/Female_1p_Roughness.tga
new file mode 100644
index 0000000..229f7a1
Binary files /dev/null and b/textures/faith_arms/Female_1p_Roughness.tga differ
diff --git a/textures/faith_body/Asia_Fixer_Merged_Color.tga b/textures/faith_body/Asia_Fixer_Merged_Color.tga
new file mode 100644
index 0000000..8e21900
Binary files /dev/null and b/textures/faith_body/Asia_Fixer_Merged_Color.tga differ
diff --git a/textures/faith_body/Asia_Fixer_Merged_Normal.tga b/textures/faith_body/Asia_Fixer_Merged_Normal.tga
new file mode 100644
index 0000000..0ca706f
Binary files /dev/null and b/textures/faith_body/Asia_Fixer_Merged_Normal.tga differ
diff --git a/textures/faith_body/Asia_Fixer_Merged_Roughness.tga b/textures/faith_body/Asia_Fixer_Merged_Roughness.tga
new file mode 100644
index 0000000..cfe9b76
Binary files /dev/null and b/textures/faith_body/Asia_Fixer_Merged_Roughness.tga differ
diff --git a/textures/faith_body/Asia_Fixer_Merged_Specular.tga b/textures/faith_body/Asia_Fixer_Merged_Specular.tga
new file mode 100644
index 0000000..e13e243
Binary files /dev/null and b/textures/faith_body/Asia_Fixer_Merged_Specular.tga differ
diff --git a/textures/faith_body/asia_fixer_merged_color.tga.meta b/textures/faith_body/asia_fixer_merged_color.tga.meta
new file mode 100644
index 0000000..f88a9a5
--- /dev/null
+++ b/textures/faith_body/asia_fixer_merged_color.tga.meta
@@ -0,0 +1,3 @@
+{
+ "nocompress": 1
+}
\ No newline at end of file