From d2f47e754fde8531b17a204574b03ee1834afa82 Mon Sep 17 00:00:00 2001 From: FakeShemp Date: Thu, 3 Mar 2016 14:46:01 +0100 Subject: [PATCH 01/18] Remove shitty commented out thingie causing an error --- src/Engine/Rendering/FrameBuffer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Engine/Rendering/FrameBuffer.cpp b/src/Engine/Rendering/FrameBuffer.cpp index ee02db94..143e9697 100644 --- a/src/Engine/Rendering/FrameBuffer.cpp +++ b/src/Engine/Rendering/FrameBuffer.cpp @@ -65,8 +65,7 @@ void FrameBuffer::Generate() } GLERROR("2"); - // Need GL_DEPTH_ATTACHMENT for shadows - if (/*(*it)->m_Attachment != GL_DEPTH_ATTACHMENT &&*/ (*it)->m_Attachment != GL_STENCIL_ATTACHMENT && (*it)->m_Attachment != GL_DEPTH_STENCIL_ATTACHMENT) { + if ((*it)->m_Attachment != GL_DEPTH_ATTACHMENT && (*it)->m_Attachment != GL_STENCIL_ATTACHMENT && (*it)->m_Attachment != GL_DEPTH_STENCIL_ATTACHMENT) { attachments.push_back((*it)->m_Attachment); } GLERROR("Attachment"); From 4ee52b74bf3e8d37b2d22b6c68826d3dc59a2eed Mon Sep 17 00:00:00 2001 From: FakeShemp Date: Thu, 3 Mar 2016 15:04:10 +0100 Subject: [PATCH 02/18] Fix broken shader in. --- resources/Shaders/ForwardPlusSplatMapRGBShieldCheck.frag.glsl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/Shaders/ForwardPlusSplatMapRGBShieldCheck.frag.glsl b/resources/Shaders/ForwardPlusSplatMapRGBShieldCheck.frag.glsl index d61726fe..f3050714 100644 --- a/resources/Shaders/ForwardPlusSplatMapRGBShieldCheck.frag.glsl +++ b/resources/Shaders/ForwardPlusSplatMapRGBShieldCheck.frag.glsl @@ -1,6 +1,7 @@ #version 430 #define MIN_AMBIENT_LIGHT 0.3 +#define MAX_SPLITS 4 uniform mat4 M; uniform mat4 V; @@ -84,6 +85,7 @@ in VertexData{ vec2 TextureCoordinate; vec4 ExplosionColor; float ExplosionPercentageElapsed; + vec4 PositionLightSpace[MAX_SPLITS]; }Input; out vec4 sceneColor; From 315eac1af9d18a37b4bfc03d41fbb07e96f2887c Mon Sep 17 00:00:00 2001 From: FakeShemp Date: Thu, 3 Mar 2016 15:10:27 +0100 Subject: [PATCH 03/18] try not to assume things. --- resources/Shaders/ExplosionEffect.geom.glsl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/resources/Shaders/ExplosionEffect.geom.glsl b/resources/Shaders/ExplosionEffect.geom.glsl index ffc78900..cdc109bf 100644 --- a/resources/Shaders/ExplosionEffect.geom.glsl +++ b/resources/Shaders/ExplosionEffect.geom.glsl @@ -149,7 +149,10 @@ void main() Output.TextureCoordinate = Input[i].TextureCoordinate; Output.Tangent = Input[i].Tangent; Output.BiTangent = Input[i].BiTangent; - Output.PositionLightSpace = Input[i].PositionLightSpace; + for (int i = 0; i < MAX_SPLITS; i++) + { + Output.PositionLightSpace[i] = Input[i].PositionLightSpace[i]; + } // convert to model space for the gravity to always be in -y vec4 ExplodedPositionInModelSpace = M * vec4(ExplodedPosition, 1.0); @@ -191,7 +194,10 @@ void main() Output.TextureCoordinate = Input[i].TextureCoordinate; Output.Tangent = Input[i].Tangent; Output.BiTangent = Input[i].BiTangent; - Output.PositionLightSpace = Input[i].PositionLightSpace; + for (int i = 0; i < MAX_SPLITS; i++) + { + Output.PositionLightSpace[i] = Input[i].PositionLightSpace[i]; + } // no change in position, pass through vertex gl_Position = gl_in[i].gl_Position; From b38ebbe67658fefe69cf5bdbe86cf5b24ed129c1 Mon Sep 17 00:00:00 2001 From: Teejoon Date: Mon, 7 Mar 2016 14:00:08 +0100 Subject: [PATCH 04/18] Shadows now working on NVIDIA cards too --- include/Engine/Rendering/ExplosionEffectJob.h | 4 +- include/Engine/Rendering/FrameBuffer.h | 10 + include/Engine/Rendering/ModelJob.h | 5 +- resources/Schema/Components/Model.xml | 1 + resources/Schema/Components/Model.xsd | 3 + resources/Shaders/ExplosionEffect.geom.glsl | 8 +- resources/Shaders/ForwardPlus.frag.glsl | 2 +- .../Shaders/ForwardPlusSplatMapRGB.frag.glsl | 179 +++++++++++++++++- src/Engine/Editor/EditorRenderSystem.cpp | 2 +- src/Engine/Rendering/DrawFinalPass.cpp | 5 +- src/Engine/Rendering/FrameBuffer.cpp | 7 + src/Engine/Rendering/RenderSystem.cpp | 6 +- src/Engine/Rendering/ShadowPass.cpp | 12 +- 13 files changed, 227 insertions(+), 17 deletions(-) diff --git a/include/Engine/Rendering/ExplosionEffectJob.h b/include/Engine/Rendering/ExplosionEffectJob.h index 695a8dfe..a86b59af 100644 --- a/include/Engine/Rendering/ExplosionEffectJob.h +++ b/include/Engine/Rendering/ExplosionEffectJob.h @@ -15,8 +15,8 @@ struct ExplosionEffectJob : ModelJob { - ExplosionEffectJob(ComponentWrapper explosionEffectComponent, ::Model* model, Camera* camera, glm::mat4 matrix, ::RawModel::MaterialProperties matGroup, ComponentWrapper modelComponent, ::World* world, glm::vec4 fillColor, float fillPercentage, bool isShielded) - : ModelJob(model, camera, matrix, matGroup, modelComponent, world, fillColor, fillPercentage, isShielded) + ExplosionEffectJob(ComponentWrapper explosionEffectComponent, ::Model* model, Camera* camera, glm::mat4 matrix, ::RawModel::MaterialProperties matGroup, ComponentWrapper modelComponent, ::World* world, glm::vec4 fillColor, float fillPercentage, bool isShielded, bool shadow) + : ModelJob(model, camera, matrix, matGroup, modelComponent, world, fillColor, fillPercentage, isShielded, shadow) { ExplosionOrigin = (glm::vec3)explosionEffectComponent["ExplosionOrigin"]; TimeSinceDeath = (double)explosionEffectComponent["TimeSinceDeath"]; diff --git a/include/Engine/Rendering/FrameBuffer.h b/include/Engine/Rendering/FrameBuffer.h index cf63b6c6..e9171894 100644 --- a/include/Engine/Rendering/FrameBuffer.h +++ b/include/Engine/Rendering/FrameBuffer.h @@ -43,6 +43,16 @@ public: ~RenderBuffer(); }; +class Texture2DArray : public ResourceType +{ +public: + Texture2DArray(GLuint* resourceHandle, GLenum attachment) + : ResourceType(resourceHandle, attachment) + { }; + + ~Texture2DArray(); +}; + class FrameBuffer { public: diff --git a/include/Engine/Rendering/ModelJob.h b/include/Engine/Rendering/ModelJob.h index 58993ea1..1bb44715 100644 --- a/include/Engine/Rendering/ModelJob.h +++ b/include/Engine/Rendering/ModelJob.h @@ -18,7 +18,7 @@ struct ModelJob : RenderJob { - ModelJob(Model* model, Camera* camera, glm::mat4 matrix, ::RawModel::MaterialProperties matProp, ComponentWrapper modelComponent, World* world, glm::vec4 fillColor, float fillPercentage, bool isShielded) + ModelJob(Model* model, Camera* camera, glm::mat4 matrix, ::RawModel::MaterialProperties matProp, ComponentWrapper modelComponent, World* world, glm::vec4 fillColor, float fillPercentage, bool isShielded, bool shadow) : RenderJob() { Model = model; @@ -114,6 +114,7 @@ struct ModelJob : RenderJob glm::vec3 worldpos = glm::vec3(camera->ViewMatrix() * glm::vec4(abspos, 1)); Depth = worldpos.z; World = world; + Shadow = shadow; FillColor = fillColor; FillPercentage = fillPercentage; @@ -182,6 +183,8 @@ struct ModelJob : RenderJob glm::vec4 FillColor = glm::vec4(0); float FillPercentage = 0.0; bool IsShielded; + bool Shadow; + void CalculateHash() override { Hash = ShaderID << 20 + ModelID << 10 + TextureID; diff --git a/resources/Schema/Components/Model.xml b/resources/Schema/Components/Model.xml index f81c8210..35b05b69 100644 --- a/resources/Schema/Components/Model.xml +++ b/resources/Schema/Components/Model.xml @@ -8,5 +8,6 @@ true true true + true 3.0 \ No newline at end of file diff --git a/resources/Schema/Components/Model.xsd b/resources/Schema/Components/Model.xsd index 31203ff6..29f65613 100644 --- a/resources/Schema/Components/Model.xsd +++ b/resources/Schema/Components/Model.xsd @@ -36,6 +36,9 @@ Intensity of the glow map + + Whether the object cast/recieve shadows or not + diff --git a/resources/Shaders/ExplosionEffect.geom.glsl b/resources/Shaders/ExplosionEffect.geom.glsl index cdc109bf..19944cac 100644 --- a/resources/Shaders/ExplosionEffect.geom.glsl +++ b/resources/Shaders/ExplosionEffect.geom.glsl @@ -149,9 +149,9 @@ void main() Output.TextureCoordinate = Input[i].TextureCoordinate; Output.Tangent = Input[i].Tangent; Output.BiTangent = Input[i].BiTangent; - for (int i = 0; i < MAX_SPLITS; i++) + for (int j = 0; j < MAX_SPLITS; j++) { - Output.PositionLightSpace[i] = Input[i].PositionLightSpace[i]; + Output.PositionLightSpace[j] = Input[i].PositionLightSpace[j]; } // convert to model space for the gravity to always be in -y @@ -194,9 +194,9 @@ void main() Output.TextureCoordinate = Input[i].TextureCoordinate; Output.Tangent = Input[i].Tangent; Output.BiTangent = Input[i].BiTangent; - for (int i = 0; i < MAX_SPLITS; i++) + for (int j = 0; j < MAX_SPLITS; j++) { - Output.PositionLightSpace[i] = Input[i].PositionLightSpace[i]; + Output.PositionLightSpace[j] = Input[i].PositionLightSpace[j]; } // no change in position, pass through vertex diff --git a/resources/Shaders/ForwardPlus.frag.glsl b/resources/Shaders/ForwardPlus.frag.glsl index f7ddd00c..33fc588b 100644 --- a/resources/Shaders/ForwardPlus.frag.glsl +++ b/resources/Shaders/ForwardPlus.frag.glsl @@ -27,7 +27,7 @@ layout (binding = 2) uniform sampler2D NormalMapTexture; layout (binding = 3) uniform sampler2D SpecularMapTexture; layout (binding = 4) uniform sampler2D GlowMapTexture; layout (binding = 5) uniform samplerCube CubeMap; -layout (binding = 13) uniform sampler2DArrayShadow DepthMap; +layout (binding = 30) uniform sampler2DArrayShadow DepthMap; #define TILE_SIZE 16 diff --git a/resources/Shaders/ForwardPlusSplatMapRGB.frag.glsl b/resources/Shaders/ForwardPlusSplatMapRGB.frag.glsl index f933a605..af692c99 100644 --- a/resources/Shaders/ForwardPlusSplatMapRGB.frag.glsl +++ b/resources/Shaders/ForwardPlusSplatMapRGB.frag.glsl @@ -13,6 +13,10 @@ uniform vec4 FillColor; uniform vec4 Color; uniform vec4 AmbientColor; uniform int SSAOQuality; +uniform float FarDistance[MAX_SPLITS]; + +layout (binding = 0) uniform sampler2D AOTexture; +layout (binding = 30) uniform sampler2DArrayShadow DepthMap; //Get bineded at the same time as the textures uniform vec2 DiffuseUVRepeat1; @@ -27,7 +31,6 @@ uniform vec2 SpecularUVRepeat3; uniform vec2 GlowUVRepeat1; uniform vec2 GlowUVRepeat2; uniform vec2 GlowUVRepeat3; -layout (binding = 0) uniform sampler2D AOTexture; layout (binding = 1) uniform sampler2D SplatMapTexture; layout (binding = 2) uniform sampler2D DiffuseTexture1; layout (binding = 3) uniform sampler2D DiffuseTexture2; @@ -95,6 +98,25 @@ struct LightResult { vec4 Specular; }; +vec2 poissonDisk[16] = vec2[]( + vec2( -0.94201624, -0.39906216 ), + vec2( 0.94558609, -0.76890725 ), + vec2( -0.094184101, -0.92938870 ), + vec2( 0.34495938, 0.29387760 ), + vec2( -0.91588581, 0.45771432 ), + vec2( -0.81544232, -0.87912464 ), + vec2( -0.38277543, 0.27676845 ), + vec2( 0.97484398, 0.75648379 ), + vec2( 0.44323325, -0.97511554 ), + vec2( 0.53742981, -0.47373420 ), + vec2( -0.26496911, -0.41893023 ), + vec2( 0.79197514, 0.19090188 ), + vec2( -0.24188840, 0.99706507 ), + vec2( -0.81409955, 0.91437590 ), + vec2( 0.19984126, 0.78641367 ), + vec2( 0.14383161, -0.14100790 ) + ); + float CalcAttenuation(float radius, float dist, float falloff) { return 1.0 - smoothstep(radius * 0.3, radius, dist); } @@ -178,6 +200,154 @@ vec4 CalcBlendedNormal(vec4 blendValue, sampler2D R, sampler2D G, sampler2D B, return vec4(TBN * normalize(Normal_result), 0.0); } +// Returns a "random" value. +float Random(vec3 seed, int i) +{ + vec4 seed4 = vec4(seed, i); + float dot_product = dot(seed4, vec4(12.9898, 78.233, 45.164, 94.673)); + return fract(sin(dot_product) * 43758.5453); +} + +int getShadowIndex(float far_distance[1]) +{ + return 0; +} + +int getShadowIndex(float far_distance[2]) +{ + float depth = gl_FragCoord.z / gl_FragCoord.w; + + int index = 1; + if ( depth < far_distance[0] ) + { + index = 0; + } + + return index; +} + +int getShadowIndex(float far_distance[3]) +{ + float depth = gl_FragCoord.z / gl_FragCoord.w; + + int index = 2; + if ( depth < far_distance[0] ) + { + index = 0; + } + else if ( depth < far_distance[1] && depth > far_distance[0] ) + { + index = 1; + } + + return index; +} + +int getShadowIndex(float far_distance[4]) +{ + float depth = gl_FragCoord.z / gl_FragCoord.w; + + int index = 3; + if ( depth < far_distance[0] ) + { + index = 0; + } + else if ( depth < far_distance[1] && depth > far_distance[0] ) + { + index = 1; + } + else if ( depth < far_distance[2] && depth > far_distance[1] ) + { + index = 2; + } + + return index; +} + +// Standard hardware-calculated PCF method +float PCFShadow(sampler2DArrayShadow depth_texture_array, vec3 projection_coords, int layer_index) +{ + return texture(depth_texture_array, vec4(projection_coords.xy, layer_index, projection_coords.z)); +} + +// PCF + Poisson model method +float PoissonShadow(sampler2DArrayShadow depth_texture_array, vec3 projection_coords, int layer_index, int taps, float spread) +{ + int loop; + float multiplier = 1.0 / float(taps); + float shadowMapDepth; + + for (int i = 0; i < taps; i++) + { + loop = i; + vec3 newProjCoords = projection_coords + vec3(poissonDisk[loop], 0.0) / (spread * (1.0 + layer_index)); + shadowMapDepth += multiplier * texture(depth_texture_array, vec4(newProjCoords.xy, layer_index, newProjCoords.z)); + } + + return shadowMapDepth; +} + +// PCF + Poisson + RandomSample model method +float PoissonDotShadow(sampler2DArrayShadow depth_texture_array, vec3 projection_coords, int layer_index, int taps, float spread) +{ + int loop; + float multiplier = 1.0 / float(taps); + float shadowMapDepth; + + for (int i = 0; i < taps; i++) + { + loop = int(16.0 * Random(gl_FragCoord.xyy, i)) % 16; + vec3 newProjCoords = projection_coords + vec3(poissonDisk[loop], 0.0) / (spread * (1.0 + layer_index)); + shadowMapDepth += multiplier * texture(depth_texture_array, vec4(newProjCoords.xy, layer_index, newProjCoords.z)); + } + + return shadowMapDepth; +} + +// Hardware PCF + Additional software PCF method +float SoftwarePCF(sampler2DArrayShadow depth_texture_array, vec3 projection_coords, int layer_index, float bias) +{ + float shadow = 0.0; + + vec3 texelSize = 1.0 / textureSize(depth_texture_array, 0); + for(int x = -1; x <= 1; x++) + { + for(int y = -1; y <= 1; y++) + { + shadow += texture(depth_texture_array, vec4(projection_coords.xy + vec2(x, y) * texelSize.xy / (1.0 + layer_index), layer_index, projection_coords.z)); + } + } + + return shadow / 9.0; +} + +float CalcShadowValue(vec4 light_space_pos, vec3 normal, vec3 light_dir, sampler2DArrayShadow depth_texture_array, int layer_index) +{ + float shadowMapDepth; + float bias = 0.005; + + // Various bias methods. + + //bias = max(0.05 * (1.0 - dot(normal, light_dir)), bias); + //bias = bias * tan(acos(clamp(dot(normal, -light_dir), 0.0, 1.0))); + bias = bias + bias * tan(acos(clamp(dot(normal, -light_dir), 0.0, 1.0))); + + // Calculate coordinates in projection space. + + vec3 projCoords = vec3(light_space_pos.xy, light_space_pos.z + bias) / light_space_pos.w; + projCoords = projCoords * 0.5 + 0.5; + //projCoords = (floor(projCoords * 255.0)) / 255.0; + + // Various methods for shadow calculation in fastest to slowest order. + + //shadowMapDepth = PCFShadow(depth_texture_array, projCoords, layer_index); + //shadowMapDepth = PoissonShadow(depth_texture_array, projCoords, layer_index, 4, 25.0 * FarDistance[MAX_SPLITS - 1]); + //shadowMapDepth = PoissonDotShadow(depth_texture_array, projCoords, layer_index, 4, 25.0 * FarDistance[MAX_SPLITS - 1]); + shadowMapDepth = SoftwarePCF(depth_texture_array, projCoords, layer_index, bias); + + return shadowMapDepth; +} + void main() { float ao = texelFetch(AOTexture, ivec2(gl_FragCoord.xy) >> int(SSAOQuality), 0).r; @@ -210,6 +380,8 @@ void main() int start = int(LightGrids.Data[currentTile].Start); int amount = int(LightGrids.Data[currentTile].Amount); + float shadowFactor = 0.0; + for(int i = start; i < start + amount; i++) { int l = int(LightIndex[i]); @@ -220,12 +392,17 @@ void main() if(light.Type == 1) { // point light_result = CalcPointLightSource(V * light.Position, light.Radius, light.Color, light.Intensity, viewVec, position, normal, light.Falloff); } else if (light.Type == 2) { //Directional + int DepthMapIndex = getShadowIndex(FarDistance); light_result = CalcDirectionalLightSource(V * light.Direction, light.Color, light.Intensity, viewVec, normal); + shadowFactor = CalcShadowValue(Input.PositionLightSpace[DepthMapIndex], Input.Normal, vec3(light.Direction), DepthMap, DepthMapIndex); } totalLighting.Diffuse += vec4(light_result.Diffuse.rgb * ao, light_result.Diffuse.a); totalLighting.Specular += vec4(light_result.Specular.rgb * ao, light_result.Specular.a); } + totalLighting.Diffuse *= vec4(min(vec3(shadowFactor) + AmbientColor.xyz, vec3(1.0)), 1.0); + totalLighting.Specular *= vec4(min(vec3(shadowFactor) + AmbientColor.xyz, vec3(1.0)), 1.0); + vec4 color_result = mix((Color * diffuseTexel * DiffuseColor), Input.ExplosionColor, Input.ExplosionPercentageElapsed); color_result = color_result * (totalLighting.Diffuse + (totalLighting.Specular * specularTexel)); //vec4 color_result = (DiffuseColor + Input.ExplosionColor) * (totalLighting.Diffuse + (totalLighting.Specular * specularTexel)) * diffuseTexel * Color; diff --git a/src/Engine/Editor/EditorRenderSystem.cpp b/src/Engine/Editor/EditorRenderSystem.cpp index f5fcc1a1..16b6bc93 100644 --- a/src/Engine/Editor/EditorRenderSystem.cpp +++ b/src/Engine/Editor/EditorRenderSystem.cpp @@ -54,7 +54,7 @@ void EditorRenderSystem::Update(double dt) EntityWrapper entity(m_World, cModel.EntityID); glm::mat4 modelMatrix = Transform::ModelMatrix(entity.ID, entity.World); for (auto matGroup : model->MaterialGroups()) { - std::shared_ptr modelJob = std::make_shared(model, scene.Camera, modelMatrix, matGroup, cModel, entity.World, glm::vec4(0), 0.f, false); + std::shared_ptr modelJob = std::make_shared(model, scene.Camera, modelMatrix, matGroup, cModel, entity.World, glm::vec4(0), 0.f, false, false); if (cModel["Transparent"]) { scene.Jobs.TransparentObjects.push_back(modelJob); } else { diff --git a/src/Engine/Rendering/DrawFinalPass.cpp b/src/Engine/Rendering/DrawFinalPass.cpp index 510c665e..f1bbb67a 100644 --- a/src/Engine/Rendering/DrawFinalPass.cpp +++ b/src/Engine/Rendering/DrawFinalPass.cpp @@ -344,11 +344,10 @@ void DrawFinalPass::DrawModelRenderQueues(std::list>& glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, m_SSAOPass->SSAOTexture()); - glActiveTexture(GL_TEXTURE13); + glActiveTexture(GL_TEXTURE30); if (m_ShadowPass->DepthMap() != NULL) { glBindTexture(GL_TEXTURE_2D_ARRAY, m_ShadowPass->DepthMap()); - } - else { + } else { glBindTexture(GL_TEXTURE_2D_ARRAY, m_WhiteTexture->m_Texture); } diff --git a/src/Engine/Rendering/FrameBuffer.cpp b/src/Engine/Rendering/FrameBuffer.cpp index 143e9697..c94423ba 100644 --- a/src/Engine/Rendering/FrameBuffer.cpp +++ b/src/Engine/Rendering/FrameBuffer.cpp @@ -24,6 +24,13 @@ RenderBuffer::~RenderBuffer() } } +Texture2DArray::~Texture2DArray() +{ + if (m_ResourceHandle != 0) { + glDeleteTextures(1, m_ResourceHandle); + } +} + FrameBuffer::~FrameBuffer() { diff --git a/src/Engine/Rendering/RenderSystem.cpp b/src/Engine/Rendering/RenderSystem.cpp index a1f00c88..0f16d5af 100644 --- a/src/Engine/Rendering/RenderSystem.cpp +++ b/src/Engine/Rendering/RenderSystem.cpp @@ -258,7 +258,8 @@ void RenderSystem::fillModels(RenderScene::Queues &Jobs) m_World, fillColor, fillPercentage, - isShielded + isShielded, + false )); if (m_World->HasComponent(cModel.EntityID, "Shield")){ explosionEffectJob->CalculateHash(); @@ -296,7 +297,8 @@ void RenderSystem::fillModels(RenderScene::Queues &Jobs) m_World, fillColor, fillPercentage, - isShielded + isShielded, + (bool)cModel["Shadow"] )); if (m_World->HasComponent(cModel.EntityID, "Shield")) { modelJob->CalculateHash(); diff --git a/src/Engine/Rendering/ShadowPass.cpp b/src/Engine/Rendering/ShadowPass.cpp index daf63ef2..15f03587 100644 --- a/src/Engine/Rendering/ShadowPass.cpp +++ b/src/Engine/Rendering/ShadowPass.cpp @@ -131,7 +131,7 @@ void ShadowPass::InitializeFrameBuffers() glBindTexture(GL_TEXTURE_2D_ARRAY, m_DepthMap); glTexStorage3D(GL_TEXTURE_2D_ARRAY, 1, GL_DEPTH_COMPONENT16, m_ResolutionSizeWidth, m_ResolutionSizeHeight, m_CurrentNrOfSplits); - glTexSubImage3D(GL_TEXTURE_2D_ARRAY, 0, 0, 0, 0, m_ResolutionSizeWidth, m_ResolutionSizeHeight, m_CurrentNrOfSplits, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, nullptr); + //glTexSubImage3D(GL_TEXTURE_2D_ARRAY, 0, 0, 0, 0, m_ResolutionSizeWidth, m_ResolutionSizeHeight, m_CurrentNrOfSplits, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, nullptr); glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_FILTER, GL_LINEAR); @@ -141,7 +141,7 @@ void ShadowPass::InitializeFrameBuffers() glTexParameterfv(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_BORDER_COLOR, glm::vec4(1.f).data); glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); - m_DepthBuffer.AddResource(std::shared_ptr(new Texture2D(&m_DepthMap, GL_DEPTH_ATTACHMENT))); + m_DepthBuffer.AddResource(std::shared_ptr(new Texture2DArray(&m_DepthMap, GL_DEPTH_ATTACHMENT))); m_DepthBuffer.Generate(); GLERROR("depthMap failed END"); @@ -241,6 +241,10 @@ void ShadowPass::Draw(RenderScene & scene) if (!std::dynamic_pointer_cast(objectJob)) { auto modelJob = std::dynamic_pointer_cast(objectJob); + if (!modelJob->Shadow) { + continue; + } + glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "M"), 1, GL_FALSE, glm::value_ptr(modelJob->Matrix)); glUniform1f(glGetUniformLocation(shaderHandle, "Alpha"), 1.f); @@ -257,6 +261,10 @@ void ShadowPass::Draw(RenderScene & scene) if (!std::dynamic_pointer_cast(objectJob)) { auto modelJob = std::dynamic_pointer_cast(objectJob); + if (!modelJob->Shadow) { + continue; + } + glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "M"), 1, GL_FALSE, glm::value_ptr(modelJob->Matrix)); glUniform1f(glGetUniformLocation(shaderHandle, "Alpha"), modelJob->Color.a); From 2049d630e9d5caada8e7221a7d5198780c5cc9ca Mon Sep 17 00:00:00 2001 From: FakeShemp Date: Mon, 7 Mar 2016 19:45:46 +0100 Subject: [PATCH 05/18] Revert "Revert "Shadows"" This reverts commit 73b8bff1f3ebfad3de5e22d06d53ce2cb1779c4f. --- include/Engine/Rendering/DrawFinalPass.h | 4 +- include/Engine/Rendering/Renderer.h | 2 + include/Engine/Rendering/ShadowPass.h | 87 + include/Engine/Rendering/ShadowPassState.h | 15 + resources/Schema/Entities/GameMap.xml | 7 + resources/Schema/Entities/OliviaTestWorld.xml | 1558 +++++++++++++++++ .../Schema/Entities/QualityAssurance.xml | 4 +- resources/Shaders/ExplosionEffect.geom.glsl | 6 + resources/Shaders/ForwardPlus.frag.glsl | 179 +- resources/Shaders/ForwardPlus.vert.glsl | 10 + .../Shaders/ForwardPlusShieldCheck.frag.glsl | 2 + .../Shaders/ForwardPlusSkinned.vert.glsl | 10 + .../Shaders/ForwardPlusSplatMap.frag.glsl | 3 + .../Shaders/ForwardPlusSplatMapRGB.frag.glsl | 2 + resources/Shaders/Shadow.frag.glsl | 22 + resources/Shaders/Shadow.vert.glsl | 18 + src/Engine/Rendering/DrawFinalPass.cpp | 20 +- src/Engine/Rendering/FrameBuffer.cpp | 8 +- src/Engine/Rendering/Renderer.cpp | 8 +- src/Engine/Rendering/ShadowPass.cpp | 305 ++++ src/Engine/Rendering/ShadowPassState.cpp | 19 + 21 files changed, 2280 insertions(+), 9 deletions(-) create mode 100644 include/Engine/Rendering/ShadowPass.h create mode 100644 include/Engine/Rendering/ShadowPassState.h create mode 100644 resources/Schema/Entities/OliviaTestWorld.xml create mode 100644 resources/Shaders/Shadow.frag.glsl create mode 100644 resources/Shaders/Shadow.vert.glsl create mode 100644 src/Engine/Rendering/ShadowPass.cpp create mode 100644 src/Engine/Rendering/ShadowPassState.cpp diff --git a/include/Engine/Rendering/DrawFinalPass.h b/include/Engine/Rendering/DrawFinalPass.h index cfddd5c6..c5b937c6 100644 --- a/include/Engine/Rendering/DrawFinalPass.h +++ b/include/Engine/Rendering/DrawFinalPass.h @@ -11,11 +11,12 @@ #include "Util/UnorderedMapVec2.h" #include "Util/CommonFunctions.h" #include "Texture.h" +#include "ShadowPass.h" class DrawFinalPass { public: - DrawFinalPass(IRenderer* renderer, LightCullingPass* lightCullingPass, CubeMapPass* cubeMapPass, SSAOPass* ssaoPass); + DrawFinalPass(IRenderer* renderer, LightCullingPass* lightCullingPass, CubeMapPass* cubeMapPass, SSAOPass* ssaoPass, ShadowPass* shadowPass); ~DrawFinalPass() { } void InitializeTextures(); void InitializeFrameBuffers(); @@ -65,6 +66,7 @@ private: const LightCullingPass* m_LightCullingPass; const CubeMapPass* m_CubeMapPass; const SSAOPass* m_SSAOPass; + const ShadowPass* m_ShadowPass; ShaderProgram* m_ForwardPlusProgram; ShaderProgram* m_ExplosionEffectProgram; diff --git a/include/Engine/Rendering/Renderer.h b/include/Engine/Rendering/Renderer.h index a64a4aa3..fd3b215e 100644 --- a/include/Engine/Rendering/Renderer.h +++ b/include/Engine/Rendering/Renderer.h @@ -26,6 +26,7 @@ #include "TextPass.h" #include "Util/CommonFunctions.h" #include "Core/PerformanceTimer.h" +#include "ShadowPass.h" class Renderer : public IRenderer { @@ -75,6 +76,7 @@ private: DrawColorCorrectionPass* m_DrawColorCorrectionPass; SSAOPass* m_SSAOPass; CubeMapPass* m_CubeMapPass; + ShadowPass* m_ShadowPass; //----------------------Functions----------------------// void InitializeWindow(); diff --git a/include/Engine/Rendering/ShadowPass.h b/include/Engine/Rendering/ShadowPass.h new file mode 100644 index 00000000..6db8a624 --- /dev/null +++ b/include/Engine/Rendering/ShadowPass.h @@ -0,0 +1,87 @@ +#ifndef ShadowPass_h__ +#define ShadowPass_h__ + +#include "IRenderer.h" +#include "FrameBuffer.h" +#include "ShaderProgram.h" +#include "../Core/EventBroker.h" +#include "../Core/World.h" +#include "ShadowPassState.h" +#include "imgui/imgui.h" + +#define MAX_SPLITS 4 + +enum NearFar { NEAR = 0, FAR = 1 }; +enum LRBT { LEFT = 0, RIGHT = 1, BOTTOM = 2, TOP = 3 }; + +struct ShadowFrustum +{ + float NearClip; + float FarClip; + float FOV; + float AspectRatio; + glm::vec3 MiddlePoint; + float Radius; + std::array LRBT; + std::array CornerPoint; +}; + +class ShadowPass +{ +public: + ShadowPass(IRenderer* renderer); + ShadowPass(IRenderer * renderer, int ShadowResX, int ShadowResY); + ~ShadowPass(); + + void InitializeFrameBuffers(); + void InitializeShaderPrograms(); + void ClearBuffer(); + void Draw(RenderScene& scene); + + void DebugGUI(); + + GLuint DepthMap() const { return m_DepthMap; } + std::array LightP() const { return m_LightProjection; } + std::array LightV() const { return m_LightView; } + std::array FarDistance() const { std::array f; for (int i = 0; i < MAX_SPLITS; i++) f[i] = m_shadowFrusta[i].FarClip; return f; } + int CurrentNrOfSplits() const { return m_CurrentNrOfSplits; } + + void SetSplitWeight(float split_weight) { m_SplitWeight = split_weight; }; +private: + void InitializeCameras(RenderScene & scene); + void UpdateSplitDist(std::array& frusta, float near_distance, float far_distance); + void UpdateFrustumPoints(ShadowFrustum& frustum, glm::vec3 camera_position, glm::vec3 view_dir); + void UpdateFrustumPoints(ShadowFrustum& frustum, glm::mat4 p, glm::mat4 v); + + void PointsToLightspace(ShadowFrustum& frustum, glm::mat4 v); + + float FindRadius(ShadowFrustum& frustum); + void RadiusToLightspace(ShadowFrustum& frustum); + + EventBroker* m_EventBroker; + const IRenderer* m_Renderer; + + GLuint m_DepthMap; + FrameBuffer m_DepthBuffer; + ShaderProgram* m_ShadowProgram; + + std::array m_LightProjection; + std::array m_LightView; + + GLfloat m_NearFarPlane[2] = { -34.f, 27.f }; + GLuint m_ResolutionSizeWidth = 1024 * 2; + GLuint m_ResolutionSizeHeight = 1024 * 2; + + bool m_TransparentObjects = false; + bool m_TexturedShadows = false; + bool m_EnableShadows = true; + + int m_CurrentNrOfSplits = 4; + float m_SplitWeight = 0.962f; + + std::array m_shadowFrusta; + + Texture* m_WhiteTexture = ResourceManager::Load("Textures/Core/White.png"); +}; + +#endif \ No newline at end of file diff --git a/include/Engine/Rendering/ShadowPassState.h b/include/Engine/Rendering/ShadowPassState.h new file mode 100644 index 00000000..f881b48e --- /dev/null +++ b/include/Engine/Rendering/ShadowPassState.h @@ -0,0 +1,15 @@ +#ifndef ShadowPassState_h_ +#define ShadowPassState_h_ + +#include "Rendering/RenderState.h" + +class ShadowPassState : public RenderState +{ +public: + ShadowPassState(GLuint frameBuffer); + ~ShadowPassState(); + +private: +}; + +#endif \ No newline at end of file diff --git a/resources/Schema/Entities/GameMap.xml b/resources/Schema/Entities/GameMap.xml index c3a16361..473b9037 100644 --- a/resources/Schema/Entities/GameMap.xml +++ b/resources/Schema/Entities/GameMap.xml @@ -245,6 +245,13 @@ + + + + + + + diff --git a/resources/Schema/Entities/OliviaTestWorld.xml b/resources/Schema/Entities/OliviaTestWorld.xml new file mode 100644 index 00000000..23c2b283 --- /dev/null +++ b/resources/Schema/Entities/OliviaTestWorld.xml @@ -0,0 +1,1558 @@ + + + + + + + + + + + + + + + + Models/Core/UnitPlane.mesh + + + + + + + + + + + 90 + + + + + + + + + + + + 1 + + + + + + + + + + + Audio/crosscounter.wav + true + + + + + + + + + + SoundEmitter + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + Sound Test + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + 0.80000001192092896 + + + Models/DirectionalLightWidget.mesh + + + 1 + + + + + + + + + + + + + + + + + + + + + Run + + 1 + + + models/AssaultAnimated.mesh + + + + + + + + + + + Walk + + 1 + + + models/AssaultAnimated.mesh + + + + + + + + + Animation test + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + + + + + + + + + + 0.5 + + + + + + + + + + + Run + + 1 + + + Models/AssaultAnimated.mesh + + + + + + + + + + + + + + + + + + + + + + + + models/NormSpecIncdMapSphere.mesh + + + + + + + + + 1 + + + + + + + + + + + Models/Core/UnitSphere.mesh + + + + 3 + 1.1399998664855957 + + + + + + + + + + + + Models/Core/UnitSphere.mesh + + + + 5.0100002288818359 + 0.69999998807907104 + + + + + + + + + + + + Models/Core/UnitSphere.mesh + + + + 4 + 0.80000001192092896 + + + + + + + + + + + + + + 1 + + + + + + + + + + + Models/NormalMapSphere.mesh + + + + + + + + + + + Models/SpecularMapSphere.mesh + + + + + + + + + + 1 + + + + + + + + + + + Models/Core/UnitSphere.mesh + + + + 3 + 1.1399998664855957 + + + + + + + + + + + + + + + + Models/IncandescenceMapSphere.mesh + + + + + + + + + + + + + TextureMap's Test + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + 1.3999999761581421 + + + + + + + + + + + + + + + + + Schema/Entities/Player.xml + + + + + + + + + + + + + + + + Models/Assault.mesh + + + + + + + + + + + + + Models/Assault.mesh + + + + + + + + + + + + + Models/Assault.mesh + + + + + + + + + + + + + Models/Assault.mesh + + + + + + + + + + + + + + + Schema/Entities/Player.xml + + + + + + + + + + + + + + + + + Models/Assault.mesh + + + + + + + + + + + + + Models/Assault.mesh + + + + + + + + + + + + + Models/Assault.mesh + + + + + + + + + + + + + Models/Assault.mesh + + + + + + + + + + + + + + Spawn Test + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + true + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + Models/Core/UnitRaptor.mesh + + true + + + + + + + + + + + Models/Assault.mesh + + true + + + + + + + + + + + + Models/Core/UnitCube.mesh + + true + + + + + + + + + + + + + Transparency Test + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + + + + + + + + + + 0.5 + + + + + + + + + + + Models/AssaultBlueWeapon.mesh + + + + + + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + + + + + + + + + + 0.5 + + + + + + + + + + + Models/AssaultRedWeapon.mesh + + + + + + + + + + + + + + + + Asset Test + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + + + + + + + + + + 0.5 + + + + + + + + + + + Models/SecondaryWeapon.mesh + + + + + + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + + + + + + + + + + 0.5 + + + + + + + + + + + Models/AssualtSoft.mesh + + + + + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + + + + + + + + + + 0.5 + + + + + + + + + + + Models/DefenderGunBlue.mesh + + + + + + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + + + + + + + + + + 0.5 + + + + + + + + + + + Models/DefenderGunRed.mesh + + + + + + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + + + + + + + + + + 0.5 + + + + + + + + + + + Models/Assualt.mesh + + + + + + + + + + + + + + + + + + + + + + + + CapturePoint Test + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + Models/CapturePoint.mesh + + + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + true + + + + + + + + + + + + + + + + + + Red team home point + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Models/CapturePoint.mesh + + + + + + + + + + + 1 + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + + RedMiddle Point + Fonts/DroidSans.ttf + + + + + + + + + + + + + + + Models/CapturePoint.mesh + + + + + + + + + 2 + + + Models/Core/UnitCube.mesh + true + + + + + + + + + + + + + + Middle Point + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Models/CapturePoint.mesh + + + + + + + + + + + -12.033302729641917 + 3 + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + + BlueMiddle Point + Fonts/DroidSans.ttf + + + + + + + + + + + + + + + Models/CapturePoint.mesh + + + + + + + + + + + + + + 4 + + + Models/Core/UnitCube.mesh + + true + + + + + + + + + + + + + + + + + + Blue team home point + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Models/Test/ObstacleCourse.mesh + + + + + + + + + + + Collision Test + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + + + + + + + + + + 0.5 + + + + + + + + + + + true + + 2.3331127968986038 + 3.7999999523162842 + + true + + + Models/AssaultWeaponBlue.mesh + true + + + + + + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + + + + + + + + + + 0.5 + + + + + + + + + + + + + 0.28322599621543532 + + + Models/Assault.mesh + true + + + + + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + + + + + + + + + + 0.5 + + + + + + + + + + + Walk + + 1 + + + true + + + 1.8831113377486872 + + true + + + Models/AssaultAnimated.mesh + true + + + + + + + + + + + + + + + ExplosionEffect Test + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + Remember to pick random entities. + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + diff --git a/resources/Schema/Entities/QualityAssurance.xml b/resources/Schema/Entities/QualityAssurance.xml index 04cc288a..0d9421ab 100644 --- a/resources/Schema/Entities/QualityAssurance.xml +++ b/resources/Schema/Entities/QualityAssurance.xml @@ -559,8 +559,8 @@ - Models/Core/UnitCube.mesh - + Models/BushAlive.mesh + true diff --git a/resources/Shaders/ExplosionEffect.geom.glsl b/resources/Shaders/ExplosionEffect.geom.glsl index 44b44aa6..ffc78900 100644 --- a/resources/Shaders/ExplosionEffect.geom.glsl +++ b/resources/Shaders/ExplosionEffect.geom.glsl @@ -1,5 +1,7 @@ #version 430 +#define MAX_SPLITS 4 + uniform mat4 M; uniform mat4 V; uniform mat4 P; @@ -22,6 +24,7 @@ in VertexData{ vec2 TextureCoordinate; vec4 ExplosionColor; float ExplosionPercentageElapsed; + vec4 PositionLightSpace[MAX_SPLITS]; }Input[]; out VertexData{ @@ -32,6 +35,7 @@ out VertexData{ vec2 TextureCoordinate; vec4 ExplosionColor; float ExplosionPercentageElapsed; + vec4 PositionLightSpace[MAX_SPLITS]; }Output; layout(triangles) in; @@ -145,6 +149,7 @@ void main() Output.TextureCoordinate = Input[i].TextureCoordinate; Output.Tangent = Input[i].Tangent; Output.BiTangent = Input[i].BiTangent; + Output.PositionLightSpace = Input[i].PositionLightSpace; // convert to model space for the gravity to always be in -y vec4 ExplodedPositionInModelSpace = M * vec4(ExplodedPosition, 1.0); @@ -186,6 +191,7 @@ void main() Output.TextureCoordinate = Input[i].TextureCoordinate; Output.Tangent = Input[i].Tangent; Output.BiTangent = Input[i].BiTangent; + Output.PositionLightSpace = Input[i].PositionLightSpace; // no change in position, pass through vertex gl_Position = gl_in[i].gl_Position; diff --git a/resources/Shaders/ForwardPlus.frag.glsl b/resources/Shaders/ForwardPlus.frag.glsl index 8f0f7deb..9d6624fa 100644 --- a/resources/Shaders/ForwardPlus.frag.glsl +++ b/resources/Shaders/ForwardPlus.frag.glsl @@ -1,6 +1,7 @@ #version 430 #define MIN_AMBIENT_LIGHT 0.3 +#define MAX_SPLITS 4 uniform mat4 M; uniform mat4 V; @@ -14,6 +15,7 @@ uniform float FillPercentage; uniform float GlowIntensity = 10; uniform vec3 CameraPosition; uniform int SSAOQuality; +uniform float FarDistance[MAX_SPLITS]; uniform vec2 DiffuseUVRepeat; uniform vec2 NormalUVRepeat; @@ -25,6 +27,7 @@ layout (binding = 2) uniform sampler2D NormalMapTexture; layout (binding = 3) uniform sampler2D SpecularMapTexture; layout (binding = 4) uniform sampler2D GlowMapTexture; layout (binding = 5) uniform samplerCube CubeMap; +layout (binding = 13) uniform sampler2DArrayShadow DepthMap; #define TILE_SIZE 16 @@ -59,7 +62,6 @@ layout (std430, binding = 4) buffer LightIndexBuffer float LightIndex[]; }; - in VertexData{ vec3 Position; vec3 Normal; @@ -68,6 +70,7 @@ in VertexData{ vec2 TextureCoordinate; vec4 ExplosionColor; float ExplosionPercentageElapsed; + vec4 PositionLightSpace[MAX_SPLITS]; }Input; out vec4 sceneColor; @@ -78,6 +81,25 @@ struct LightResult { vec4 Specular; }; +vec2 poissonDisk[16] = vec2[]( + vec2( -0.94201624, -0.39906216 ), + vec2( 0.94558609, -0.76890725 ), + vec2( -0.094184101, -0.92938870 ), + vec2( 0.34495938, 0.29387760 ), + vec2( -0.91588581, 0.45771432 ), + vec2( -0.81544232, -0.87912464 ), + vec2( -0.38277543, 0.27676845 ), + vec2( 0.97484398, 0.75648379 ), + vec2( 0.44323325, -0.97511554 ), + vec2( 0.53742981, -0.47373420 ), + vec2( -0.26496911, -0.41893023 ), + vec2( 0.79197514, 0.19090188 ), + vec2( -0.24188840, 0.99706507 ), + vec2( -0.81409955, 0.91437590 ), + vec2( 0.19984126, 0.78641367 ), + vec2( 0.14383161, -0.14100790 ) + ); + float CalcAttenuation(float radius, float dist, float falloff) { return 1.0 - smoothstep(radius * falloff, radius, dist); } @@ -124,6 +146,154 @@ vec4 CalcNormalMappedValue(vec3 normal, vec3 tangent, vec3 bitangent, vec2 textu return vec4(TBN * normalize(NormalMap), 0.0); } +// Returns a "random" value. +float Random(vec3 seed, int i) +{ + vec4 seed4 = vec4(seed, i); + float dot_product = dot(seed4, vec4(12.9898, 78.233, 45.164, 94.673)); + return fract(sin(dot_product) * 43758.5453); +} + +int getShadowIndex(float far_distance[1]) +{ + return 0; +} + +int getShadowIndex(float far_distance[2]) +{ + float depth = gl_FragCoord.z / gl_FragCoord.w; + + int index = 1; + if ( depth < far_distance[0] ) + { + index = 0; + } + + return index; +} + +int getShadowIndex(float far_distance[3]) +{ + float depth = gl_FragCoord.z / gl_FragCoord.w; + + int index = 2; + if ( depth < far_distance[0] ) + { + index = 0; + } + else if ( depth < far_distance[1] && depth > far_distance[0] ) + { + index = 1; + } + + return index; +} + +int getShadowIndex(float far_distance[4]) +{ + float depth = gl_FragCoord.z / gl_FragCoord.w; + + int index = 3; + if ( depth < far_distance[0] ) + { + index = 0; + } + else if ( depth < far_distance[1] && depth > far_distance[0] ) + { + index = 1; + } + else if ( depth < far_distance[2] && depth > far_distance[1] ) + { + index = 2; + } + + return index; +} + +// Standard hardware-calculated PCF method +float PCFShadow(sampler2DArrayShadow depth_texture_array, vec3 projection_coords, int layer_index) +{ + return texture(depth_texture_array, vec4(projection_coords.xy, layer_index, projection_coords.z)); +} + +// PCF + Poisson model method +float PoissonShadow(sampler2DArrayShadow depth_texture_array, vec3 projection_coords, int layer_index, int taps, float spread) +{ + int loop; + float multiplier = 1.0 / float(taps); + float shadowMapDepth; + + for (int i = 0; i < taps; i++) + { + loop = i; + vec3 newProjCoords = projection_coords + vec3(poissonDisk[loop], 0.0) / (spread * (1.0 + layer_index)); + shadowMapDepth += multiplier * texture(depth_texture_array, vec4(newProjCoords.xy, layer_index, newProjCoords.z)); + } + + return shadowMapDepth; +} + +// PCF + Poisson + RandomSample model method +float PoissonDotShadow(sampler2DArrayShadow depth_texture_array, vec3 projection_coords, int layer_index, int taps, float spread) +{ + int loop; + float multiplier = 1.0 / float(taps); + float shadowMapDepth; + + for (int i = 0; i < taps; i++) + { + loop = int(16.0 * Random(gl_FragCoord.xyy, i)) % 16; + vec3 newProjCoords = projection_coords + vec3(poissonDisk[loop], 0.0) / (spread * (1.0 + layer_index)); + shadowMapDepth += multiplier * texture(depth_texture_array, vec4(newProjCoords.xy, layer_index, newProjCoords.z)); + } + + return shadowMapDepth; +} + +// Hardware PCF + Additional software PCF method +float SoftwarePCF(sampler2DArrayShadow depth_texture_array, vec3 projection_coords, int layer_index, float bias) +{ + float shadow = 0.0; + + vec3 texelSize = 1.0 / textureSize(depth_texture_array, 0); + for(int x = -1; x <= 1; x++) + { + for(int y = -1; y <= 1; y++) + { + shadow += texture(depth_texture_array, vec4(projection_coords.xy + vec2(x, y) * texelSize.xy / (1.0 + layer_index), layer_index, projection_coords.z)); + } + } + + return shadow / 9.0; +} + +float CalcShadowValue(vec4 light_space_pos, vec3 normal, vec3 light_dir, sampler2DArrayShadow depth_texture_array, int layer_index) +{ + float shadowMapDepth; + float bias = 0.005; + + // Various bias methods. + + //bias = max(0.05 * (1.0 - dot(normal, light_dir)), bias); + //bias = bias * tan(acos(clamp(dot(normal, -light_dir), 0.0, 1.0))); + bias = bias + bias * tan(acos(clamp(dot(normal, -light_dir), 0.0, 1.0))); + + // Calculate coordinates in projection space. + + vec3 projCoords = vec3(light_space_pos.xy, light_space_pos.z + bias) / light_space_pos.w; + projCoords = projCoords * 0.5 + 0.5; + //projCoords = (floor(projCoords * 255.0)) / 255.0; + + // Various methods for shadow calculation in fastest to slowest order. + + //shadowMapDepth = PCFShadow(depth_texture_array, projCoords, layer_index); + //shadowMapDepth = PoissonShadow(depth_texture_array, projCoords, layer_index, 4, 25.0 * FarDistance[MAX_SPLITS - 1]); + //shadowMapDepth = PoissonDotShadow(depth_texture_array, projCoords, layer_index, 4, 25.0 * FarDistance[MAX_SPLITS - 1]); + shadowMapDepth = SoftwarePCF(depth_texture_array, projCoords, layer_index, bias); + + return shadowMapDepth; +} + void main() { float ao = texelFetch(AOTexture, ivec2(gl_FragCoord.xy) >> int(SSAOQuality), 0).r; @@ -151,6 +321,8 @@ void main() int start = int(LightGrids.Data[currentTile].Start); int amount = int(LightGrids.Data[currentTile].Amount); + + float shadowFactor = 0.0; for(int i = start; i < start + amount; i++) { @@ -162,11 +334,16 @@ void main() if(light.Type == 1) { // point light_result = CalcPointLightSource(V * light.Position, light.Radius, light.Color, light.Intensity, viewVec, position, normal, light.Falloff); } else if (light.Type == 2) { //Directional + int DepthMapIndex = getShadowIndex(FarDistance); light_result = CalcDirectionalLightSource(V * light.Direction, light.Color, light.Intensity, viewVec, normal); + shadowFactor = CalcShadowValue(Input.PositionLightSpace[DepthMapIndex], Input.Normal, vec3(light.Direction), DepthMap, DepthMapIndex); } totalLighting.Diffuse += vec4(light_result.Diffuse.rgb * ao, light_result.Diffuse.a); totalLighting.Specular += vec4(light_result.Specular.rgb * ao, light_result.Specular.a); } + + totalLighting.Diffuse *= vec4(min(vec3(shadowFactor) + AmbientColor.xyz, vec3(1.0)), 1.0); + totalLighting.Specular *= vec4(min(vec3(shadowFactor) + AmbientColor.xyz, vec3(1.0)), 1.0); vec4 color_result = mix((Color * diffuseTexel * DiffuseColor), Input.ExplosionColor, Input.ExplosionPercentageElapsed); color_result = color_result * (totalLighting.Diffuse + (totalLighting.Specular * specularTexel)); diff --git a/resources/Shaders/ForwardPlus.vert.glsl b/resources/Shaders/ForwardPlus.vert.glsl index 26686222..2a54415b 100644 --- a/resources/Shaders/ForwardPlus.vert.glsl +++ b/resources/Shaders/ForwardPlus.vert.glsl @@ -1,8 +1,12 @@ #version 430 +#define MAX_SPLITS 4 + uniform mat4 M; uniform mat4 V; uniform mat4 P; +uniform mat4 LightV[MAX_SPLITS]; +uniform mat4 LightP[MAX_SPLITS]; layout(location = 0) in vec3 Position; layout(location = 1) in vec3 Normal; @@ -18,6 +22,7 @@ out VertexData{ vec2 TextureCoordinate; vec4 ExplosionColor; float ExplosionPercentageElapsed; + vec4 PositionLightSpace[MAX_SPLITS]; }Output; void main() @@ -31,4 +36,9 @@ void main() Output.BiTangent = vec3(TIM * vec4(BiTangent, 0.0)); Output.ExplosionColor = vec4(1.0); Output.ExplosionPercentageElapsed = 0.0; + + for(int i = 0; i < MAX_SPLITS; i++) + { + Output.PositionLightSpace[i] = LightP[i] * LightV[i] * M * vec4(Position, 1.0); + } } \ No newline at end of file diff --git a/resources/Shaders/ForwardPlusShieldCheck.frag.glsl b/resources/Shaders/ForwardPlusShieldCheck.frag.glsl index 5995facb..c3abd6b1 100644 --- a/resources/Shaders/ForwardPlusShieldCheck.frag.glsl +++ b/resources/Shaders/ForwardPlusShieldCheck.frag.glsl @@ -1,6 +1,7 @@ #version 430 #define MIN_AMBIENT_LIGHT 0.3 +#define MAX_SPLITS 4 uniform mat4 M; uniform mat4 V; @@ -69,6 +70,7 @@ in VertexData{ vec2 TextureCoordinate; vec4 ExplosionColor; float ExplosionPercentageElapsed; + vec4 PositionLightSpace[MAX_SPLITS]; }Input; out vec4 sceneColor; diff --git a/resources/Shaders/ForwardPlusSkinned.vert.glsl b/resources/Shaders/ForwardPlusSkinned.vert.glsl index 5fd55a8c..12b3c406 100644 --- a/resources/Shaders/ForwardPlusSkinned.vert.glsl +++ b/resources/Shaders/ForwardPlusSkinned.vert.glsl @@ -1,9 +1,13 @@ #version 430 +#define MAX_SPLITS 4 + uniform mat4 M; uniform mat4 V; uniform mat4 P; uniform mat4 Bones[100]; +uniform mat4 LightV[MAX_SPLITS]; +uniform mat4 LightP[MAX_SPLITS]; layout(location = 0) in vec3 Position; layout(location = 1) in vec3 Normal; @@ -21,6 +25,7 @@ out VertexData{ vec2 TextureCoordinate; vec4 ExplosionColor; float ExplosionPercentageElapsed; + vec4 PositionLightSpace[MAX_SPLITS]; }Output; void main() @@ -43,4 +48,9 @@ void main() Output.BiTangent = vec3(M * vec4(BiTangent, 0.0)); Output.ExplosionColor = vec4(1.0); Output.ExplosionPercentageElapsed = 0.0; + + for(int i = 0; i < MAX_SPLITS; i++) + { + Output.PositionLightSpace[i] = LightP[i] * LightV[i] * M * boneTransform * vec4(Position, 1.0); + } } \ No newline at end of file diff --git a/resources/Shaders/ForwardPlusSplatMap.frag.glsl b/resources/Shaders/ForwardPlusSplatMap.frag.glsl index 239c51b5..655f5502 100644 --- a/resources/Shaders/ForwardPlusSplatMap.frag.glsl +++ b/resources/Shaders/ForwardPlusSplatMap.frag.glsl @@ -1,5 +1,7 @@ #version 430 +#define MAX_SPLITS 4 + uniform mat4 M; uniform mat4 V; uniform mat4 P; @@ -95,6 +97,7 @@ in VertexData{ vec2 TextureCoordinate; vec4 ExplosionColor; float ExplosionPercentageElapsed; + vec4 PositionLightSpace[MAX_SPLITS]; }Input; out vec4 sceneColor; diff --git a/resources/Shaders/ForwardPlusSplatMapRGB.frag.glsl b/resources/Shaders/ForwardPlusSplatMapRGB.frag.glsl index c67a9c99..f933a605 100644 --- a/resources/Shaders/ForwardPlusSplatMapRGB.frag.glsl +++ b/resources/Shaders/ForwardPlusSplatMapRGB.frag.glsl @@ -1,6 +1,7 @@ #version 430 #define MIN_AMBIENT_LIGHT 0.3 +#define MAX_SPLITS 4 uniform mat4 M; uniform mat4 V; @@ -83,6 +84,7 @@ in VertexData{ vec2 TextureCoordinate; vec4 ExplosionColor; float ExplosionPercentageElapsed; + vec4 PositionLightSpace[MAX_SPLITS]; }Input; out vec4 sceneColor; diff --git a/resources/Shaders/Shadow.frag.glsl b/resources/Shaders/Shadow.frag.glsl new file mode 100644 index 00000000..c7d153c3 --- /dev/null +++ b/resources/Shaders/Shadow.frag.glsl @@ -0,0 +1,22 @@ +#version 430 + +#define ALPHA_CUTOFF 0.3 + +layout (binding = 24) uniform sampler2D DiffuseTexture; +uniform float Alpha; + +in VertexData{ + vec2 TextureCoordinate; +}Input; + +layout (location = 0) out float ShadowMap; + +void main() +{ + vec4 diffuseTexel = texture(DiffuseTexture, Input.TextureCoordinate) * Alpha; + + if (diffuseTexel.a < ALPHA_CUTOFF) + { + discard; + } +} \ No newline at end of file diff --git a/resources/Shaders/Shadow.vert.glsl b/resources/Shaders/Shadow.vert.glsl new file mode 100644 index 00000000..7b1b26fb --- /dev/null +++ b/resources/Shaders/Shadow.vert.glsl @@ -0,0 +1,18 @@ +#version 430 + +uniform mat4 M; +uniform mat4 V; +uniform mat4 P; + +layout (location = 0) in vec3 Position; +layout (location = 4) in vec2 TextureCoords; + +out VertexData{ + vec2 TextureCoordinate; +}Output; + +void main() +{ + gl_Position = P * V * M * vec4(Position, 1.0); + Output.TextureCoordinate = TextureCoords; +} \ No newline at end of file diff --git a/src/Engine/Rendering/DrawFinalPass.cpp b/src/Engine/Rendering/DrawFinalPass.cpp index a610fab1..a62c167c 100644 --- a/src/Engine/Rendering/DrawFinalPass.cpp +++ b/src/Engine/Rendering/DrawFinalPass.cpp @@ -1,9 +1,10 @@ #include "Rendering/DrawFinalPass.h" -DrawFinalPass::DrawFinalPass(IRenderer* renderer, LightCullingPass* lightCullingPass, CubeMapPass* cubeMapPass, SSAOPass* ssaoPass) +DrawFinalPass::DrawFinalPass(IRenderer* renderer, LightCullingPass* lightCullingPass, CubeMapPass* cubeMapPass, SSAOPass* ssaoPass, ShadowPass* shadowPass) : m_Renderer(renderer) , m_LightCullingPass(lightCullingPass) , m_CubeMapPass(cubeMapPass) , m_SSAOPass(ssaoPass) + , m_ShadowPass(shadowPass) { //TODO: Make sure that uniforms are not sent into shader if not needed. m_ShieldPixelRate = 8; @@ -343,6 +344,14 @@ void DrawFinalPass::DrawModelRenderQueues(std::list>& glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, m_SSAOPass->SSAOTexture()); + glActiveTexture(GL_TEXTURE13); + if (m_ShadowPass->DepthMap() != NULL) { + glBindTexture(GL_TEXTURE_2D_ARRAY, m_ShadowPass->DepthMap()); + } + else { + glBindTexture(GL_TEXTURE_2D_ARRAY, m_WhiteTexture->m_Texture); + } + for (auto &job : jobs) { auto explosionEffectJob = std::dynamic_pointer_cast(job); if (explosionEffectJob) { @@ -1077,6 +1086,10 @@ void DrawFinalPass::BindExplosionUniforms(GLuint shaderHandle, std::shared_ptrGlowIntensity); + + glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "LightP"), MAX_SPLITS, GL_FALSE, glm::value_ptr(*m_ShadowPass->LightP().data())); + glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "LightV"), MAX_SPLITS, GL_FALSE, glm::value_ptr(*m_ShadowPass->LightV().data())); + glUniform1fv(glGetUniformLocation(shaderHandle, "FarDistance"), MAX_SPLITS, m_ShadowPass->FarDistance().data()); GLERROR("END"); } @@ -1115,8 +1128,11 @@ void DrawFinalPass::BindModelUniforms(GLuint shaderHandle, std::shared_ptrGlowIntensity); - glUniform1f(Location_GlowIntensity, job->GlowIntensity); + glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "LightP"), MAX_SPLITS, GL_FALSE, glm::value_ptr(*m_ShadowPass->LightP().data())); + glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "LightV"), MAX_SPLITS, GL_FALSE, glm::value_ptr(*m_ShadowPass->LightV().data())); + glUniform1fv(glGetUniformLocation(shaderHandle, "FarDistance"), MAX_SPLITS, m_ShadowPass->FarDistance().data()); GLERROR("END"); } diff --git a/src/Engine/Rendering/FrameBuffer.cpp b/src/Engine/Rendering/FrameBuffer.cpp index da438e7a..ee02db94 100644 --- a/src/Engine/Rendering/FrameBuffer.cpp +++ b/src/Engine/Rendering/FrameBuffer.cpp @@ -53,16 +53,20 @@ void FrameBuffer::Generate() case GL_TEXTURE_2D: glFramebufferTexture2D(GL_FRAMEBUFFER, (*it)->m_Attachment, (*it)->m_ResourceType, *(*it)->m_ResourceHandle, 0); GLERROR("FrameBuffer generate: glFramebufferTexture2D"); - break; case GL_RENDERBUFFER: glFramebufferRenderbuffer(GL_FRAMEBUFFER, (*it)->m_Attachment, (*it)->m_ResourceType, *(*it)->m_ResourceHandle); GLERROR("FrameBuffer generate: glFramebufferRenderbuffer"); break; + case GL_TEXTURE_2D_ARRAY: + glFramebufferTexture(GL_FRAMEBUFFER, (*it)->m_Attachment, *(*it)->m_ResourceHandle, 0); + GLERROR("FrameBuffer generate: glFramebufferTexture2DArray"); + break; } GLERROR("2"); - if ((*it)->m_Attachment != GL_DEPTH_ATTACHMENT && (*it)->m_Attachment != GL_STENCIL_ATTACHMENT && (*it)->m_Attachment != GL_DEPTH_STENCIL_ATTACHMENT) { + // Need GL_DEPTH_ATTACHMENT for shadows + if (/*(*it)->m_Attachment != GL_DEPTH_ATTACHMENT &&*/ (*it)->m_Attachment != GL_STENCIL_ATTACHMENT && (*it)->m_Attachment != GL_DEPTH_STENCIL_ATTACHMENT) { attachments.push_back((*it)->m_Attachment); } GLERROR("Attachment"); diff --git a/src/Engine/Rendering/Renderer.cpp b/src/Engine/Rendering/Renderer.cpp index 7e11f3b2..2095a2f9 100644 --- a/src/Engine/Rendering/Renderer.cpp +++ b/src/Engine/Rendering/Renderer.cpp @@ -133,6 +133,8 @@ void Renderer::Draw(RenderFrame& frame) m_DrawFinalPass->ClearBuffer(); m_DrawBloomPass->ClearBuffer(); m_SSAOPass->ClearBuffer(); + m_ShadowPass->ClearBuffer(); + m_ShadowPass->DebugGUI(); PerformanceTimer::StopTimer("Renderer-ClearBuffers"); GLERROR("ClearBuffers"); for (auto scene : frame.RenderScenes) { @@ -148,6 +150,9 @@ void Renderer::Draw(RenderFrame& frame) PerformanceTimer::StartTimer("Renderer-Depth"); SortRenderJobsByDepth(*scene); GLERROR("SortByDepth"); + PerformanceTimer::StartTimerAndStopPrevious("Draw shadow maps"); + m_ShadowPass->Draw(*scene); + GLERROR("Draw shadow maps"); PerformanceTimer::StartTimerAndStopPrevious("Renderer-Generate Frustrums"); m_LightCullingPass->GenerateNewFrustum(*scene); GLERROR("Generate frustums"); @@ -244,7 +249,8 @@ void Renderer::InitializeRenderPasses() m_LightCullingPass = new LightCullingPass(this); m_CubeMapPass = new CubeMapPass(this); m_SSAOPass = new SSAOPass(this, m_Config); - m_DrawFinalPass = new DrawFinalPass(this, m_LightCullingPass, m_CubeMapPass, m_SSAOPass); + m_ShadowPass = new ShadowPass(this); + m_DrawFinalPass = new DrawFinalPass(this, m_LightCullingPass, m_CubeMapPass, m_SSAOPass, m_ShadowPass); m_DrawScreenQuadPass = new DrawScreenQuadPass(this); m_DrawBloomPass = new DrawBloomPass(this, m_Config); m_DrawColorCorrectionPass = new DrawColorCorrectionPass(this); diff --git a/src/Engine/Rendering/ShadowPass.cpp b/src/Engine/Rendering/ShadowPass.cpp new file mode 100644 index 00000000..daf63ef2 --- /dev/null +++ b/src/Engine/Rendering/ShadowPass.cpp @@ -0,0 +1,305 @@ +#include "Rendering/ShadowPass.h" + +ShadowPass::ShadowPass(IRenderer * renderer, int shadow_res_x, int shadow_res_y) +{ + m_Renderer = renderer; + m_ResolutionSizeWidth = shadow_res_x; + m_ResolutionSizeHeight = shadow_res_y; + + InitializeFrameBuffers(); + InitializeShaderPrograms(); +} + +ShadowPass::ShadowPass(IRenderer * renderer) +{ + m_Renderer = renderer; + + InitializeFrameBuffers(); + InitializeShaderPrograms(); +} + +ShadowPass::~ShadowPass() +{ + +} + +void ShadowPass::DebugGUI() +{ + ImGui::Checkbox("EnableShadows", &m_EnableShadows); + ImGui::DragFloat2("ShadowMapNearFar", m_NearFarPlane, 1.f, -1000.f, 1000.f); + ImGui::DragFloat("ShadowClippingWeight", &m_SplitWeight, 0.001f, 0.f, 1.f); + ImGui::Checkbox("ShadowTransparentObjects", &m_TransparentObjects); + ImGui::Checkbox("ShadowOnTextureAlphas", &m_TexturedShadows); +} + +void ShadowPass::InitializeCameras(RenderScene & scene) +{ + for (int i = 0; i < m_CurrentNrOfSplits; i++) { + m_shadowFrusta[i].AspectRatio = scene.Camera->AspectRatio(); + m_shadowFrusta[i].FOV = scene.Camera->FOV(); + } +} + +// UpdateSplitDist computes the near and far distances for every frustum slice +// in camera eye space - that is, at what distance does a slice start and end +void ShadowPass::UpdateSplitDist(std::array& frusta, float near_distance, float far_distance) +{ + float lambda = m_SplitWeight; + float ratio = far_distance / near_distance; + + frusta[0].NearClip = near_distance; + + for (int i = 1; i < m_CurrentNrOfSplits; i++) { + float si = i / static_cast(m_CurrentNrOfSplits); + + frusta[i].NearClip = lambda * (near_distance * powf(ratio, si)) + (1 - lambda) * (near_distance + (far_distance - near_distance) * si); + frusta[i - 1].FarClip = frusta[i].NearClip * 1.005f; + } + + frusta[m_CurrentNrOfSplits - 1].FarClip = far_distance; +} + +void ShadowPass::UpdateFrustumPoints(ShadowFrustum& frustum, glm::mat4 p, glm::mat4 v) +{ + std::array CornerPoint = { + glm::vec4(-1.f, -1.f, -1.f, 1.f), + glm::vec4(-1.f, 1.f, -1.f, 1.f), + glm::vec4(1.f, 1.f, -1.f, 1.f), + glm::vec4(1.f, -1.f, -1.f, 1.f), + glm::vec4(-1.f, -1.f, 1.f, 1.f), + glm::vec4(-1.f, 1.f, 1.f, 1.f), + glm::vec4(1.f, 1.f, 1.f, 1.f), + glm::vec4(1.f, -1.f, 1.f, 1.f) + }; + + for (int i = 0; i < 8; i++) { + glm::vec4 NDC = glm::inverse(p) * CornerPoint[i]; + NDC = NDC / NDC.w; + frustum.CornerPoint[i] = glm::vec3(glm::inverse(v) * NDC); + } +} + +// Compute the 8 corner points of the current view frustum in world space +void ShadowPass::UpdateFrustumPoints(ShadowFrustum& frustum, glm::vec3 camera_position, glm::vec3 view_dir) +{ + glm::vec3 up = glm::vec3(0.f, 1.f, 0.f); + glm::vec3 right = glm::normalize(glm::cross(view_dir, up)); + + glm::vec3 far_center = camera_position + glm::normalize(view_dir) * frustum.FarClip; + glm::vec3 near_center = camera_position + glm::normalize(view_dir) * frustum.NearClip; + frustum.MiddlePoint = near_center + (far_center - near_center) * 0.5f; + + up = glm::normalize(glm::cross(right, view_dir)); + + // these heights and widths are half the heights and widths of the near and far plane rectangles. + float near_height = tan(frustum.FOV / 2.f) * frustum.NearClip; + float near_width = near_height * frustum.AspectRatio; + float far_height = tan(frustum.FOV / 2.f) * frustum.FarClip; + float far_width = far_height * frustum.AspectRatio; + + frustum.CornerPoint[0] = near_center - up * near_height - right * near_width; + frustum.CornerPoint[1] = near_center + up * near_height - right * near_width; + frustum.CornerPoint[2] = near_center + up * near_height + right * near_width; + frustum.CornerPoint[3] = near_center - up * near_height + right * near_width; + + frustum.CornerPoint[4] = far_center - up * far_height - right * far_width; + frustum.CornerPoint[5] = far_center + up * far_height - right * far_width; + frustum.CornerPoint[6] = far_center + up * far_height + right * far_width; + frustum.CornerPoint[7] = far_center - up * far_height + right * far_width; +} + +float ShadowPass::FindRadius(ShadowFrustum& frustum) +{ + float radius = 0.f; + + for (int i = 0; i < 8; i++) { + float distance = glm::distance(frustum.MiddlePoint, frustum.CornerPoint[i]); + if (distance > radius) { + radius = distance; + } + } + + frustum.Radius = radius; + return radius; +} + +void ShadowPass::InitializeFrameBuffers() +{ + // Depth texture + glGenTextures(1, &m_DepthMap); + + glBindTexture(GL_TEXTURE_2D_ARRAY, m_DepthMap); + glTexStorage3D(GL_TEXTURE_2D_ARRAY, 1, GL_DEPTH_COMPONENT16, m_ResolutionSizeWidth, m_ResolutionSizeHeight, m_CurrentNrOfSplits); + + glTexSubImage3D(GL_TEXTURE_2D_ARRAY, 0, 0, 0, 0, m_ResolutionSizeWidth, m_ResolutionSizeHeight, m_CurrentNrOfSplits, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, nullptr); + + glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); + glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER); + glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE); + glTexParameterfv(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_BORDER_COLOR, glm::vec4(1.f).data); + glTexParameteri(GL_TEXTURE_2D_ARRAY, GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL); + + m_DepthBuffer.AddResource(std::shared_ptr(new Texture2D(&m_DepthMap, GL_DEPTH_ATTACHMENT))); + m_DepthBuffer.Generate(); + + GLERROR("depthMap failed END"); +} + +void ShadowPass::InitializeShaderPrograms() +{ + m_ShadowProgram = ResourceManager::Load("#ShadowProgram"); + m_ShadowProgram->AddShader(std::shared_ptr(new VertexShader("Shaders/Shadow.vert.glsl"))); + m_ShadowProgram->AddShader(std::shared_ptr(new FragmentShader("Shaders/Shadow.frag.glsl"))); + m_ShadowProgram->Compile(); + m_ShadowProgram->BindFragDataLocation(0, "ShadowMap"); + m_ShadowProgram->Link(); + + +} + +void ShadowPass::ClearBuffer() +{ + m_DepthBuffer.Bind(); + + for (int i = 0; i < m_CurrentNrOfSplits; i++) { + glFramebufferTextureLayer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, m_DepthMap, 0, i); + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + } + + m_DepthBuffer.Unbind(); +} + +void ShadowPass::PointsToLightspace(ShadowFrustum& frustum, glm::mat4 v) +{ + float left = INFINITY; + float right = -INFINITY; + float bottom = INFINITY; + float top = -INFINITY; + + for (int i = 0; i < 8; i++) + { + glm::vec3 tempPoint = glm::vec3(v * glm::vec4(frustum.CornerPoint[i], 1.f)); + + if (tempPoint.x < left) { left = tempPoint.x; } + if (tempPoint.x > right) { right = tempPoint.x; } + if (tempPoint.y < bottom) { bottom = tempPoint.y; } + if (tempPoint.y > top) { top = tempPoint.y; } + } + + frustum.LRBT = { left, right, bottom, top }; +} + +void ShadowPass::RadiusToLightspace(ShadowFrustum& frustum) +{ + float quantizationStep = 1.0f / m_ResolutionSizeHeight; + + float left = -frustum.Radius; + float right = frustum.Radius; + float bottom = -frustum.Radius; + float top = frustum.Radius; + + frustum.LRBT = { left, right, bottom, top }; +} + +void ShadowPass::Draw(RenderScene & scene) +{ + if (m_EnableShadows) { + InitializeCameras(scene); + UpdateSplitDist(m_shadowFrusta, scene.Camera->NearClip(), scene.Camera->FarClip()); + + ShadowPassState* state = new ShadowPassState(m_DepthBuffer.GetHandle()); + + m_ShadowProgram->Bind(); + GLuint shaderHandle = m_ShadowProgram->GetHandle(); + glViewport(0, 0, m_ResolutionSizeWidth, m_ResolutionSizeHeight); + + for (int i = 0; i < m_CurrentNrOfSplits; i++) { + UpdateFrustumPoints(m_shadowFrusta[i], scene.Camera->Position(), scene.Camera->Forward()); + + glFramebufferTextureLayer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, m_DepthMap, 0, i); + + for (auto &job : scene.Jobs.DirectionalLight) { + auto directionalLightJob = std::dynamic_pointer_cast(job); + + if (directionalLightJob) { + m_LightView[i] = glm::lookAt(glm::vec3(-directionalLightJob->Direction) + m_shadowFrusta[i].MiddlePoint, m_shadowFrusta[i].MiddlePoint, glm::vec3(0.f, 1.f, 0.f)); + + PointsToLightspace(m_shadowFrusta[i], m_LightView[i]); + //FindRadius(m_shadowFrusta[i]); + //RadiusToLightspace(m_shadowFrusta[i]); + m_LightProjection[i] = glm::ortho(m_shadowFrusta[i].LRBT[LEFT], m_shadowFrusta[i].LRBT[RIGHT], m_shadowFrusta[i].LRBT[BOTTOM], m_shadowFrusta[i].LRBT[TOP], m_NearFarPlane[NEAR], m_NearFarPlane[FAR]); + + glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "P"), 1, GL_FALSE, glm::value_ptr(m_LightProjection[i])); + glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "V"), 1, GL_FALSE, glm::value_ptr(m_LightView[i])); + + GLERROR("ShadowLight ERROR"); + + for (auto &objectJob : scene.Jobs.OpaqueObjects) { + if (!std::dynamic_pointer_cast(objectJob)) { + auto modelJob = std::dynamic_pointer_cast(objectJob); + + glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "M"), 1, GL_FALSE, glm::value_ptr(modelJob->Matrix)); + glUniform1f(glGetUniformLocation(shaderHandle, "Alpha"), 1.f); + + glBindVertexArray(modelJob->Model->VAO); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, modelJob->Model->ElementBuffer); + glDrawElements(GL_TRIANGLES, modelJob->EndIndex - modelJob->StartIndex + 1, GL_UNSIGNED_INT, (void*)(modelJob->StartIndex * sizeof(unsigned int))); + + GLERROR("Shadow Draw ERROR"); + } + } + if (m_TransparentObjects) { + state->CullFace(GL_BACK); + for (auto &objectJob : scene.Jobs.TransparentObjects) { + if (!std::dynamic_pointer_cast(objectJob)) { + auto modelJob = std::dynamic_pointer_cast(objectJob); + + glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "M"), 1, GL_FALSE, glm::value_ptr(modelJob->Matrix)); + glUniform1f(glGetUniformLocation(shaderHandle, "Alpha"), modelJob->Color.a); + + if (m_TexturedShadows) { + switch (modelJob->Type) { + case RawModel::MaterialType::SingleTextures: + case RawModel::MaterialType::Basic: + { + glActiveTexture(GL_TEXTURE24); + if (modelJob->DiffuseTexture.size() > 0 && modelJob->DiffuseTexture[0]->Texture != nullptr) { + glBindTexture(GL_TEXTURE_2D, modelJob->DiffuseTexture[0]->Texture->m_Texture); + glUniform2fv(glGetUniformLocation(shaderHandle, "DiffuseUVRepeat"), 1, glm::value_ptr(modelJob->DiffuseTexture[0]->UVRepeat)); + } + else { + glBindTexture(GL_TEXTURE_2D, m_WhiteTexture->m_Texture); + glUniform2fv(glGetUniformLocation(shaderHandle, "DiffuseUVRepeat"), 1, glm::value_ptr(glm::vec2(1.0f, 1.0f))); + } + break; + } + case RawModel::MaterialType::SplatMapping: + { + glActiveTexture(GL_TEXTURE24); + glBindTexture(GL_TEXTURE_2D, m_WhiteTexture->m_Texture); + glUniform2fv(glGetUniformLocation(shaderHandle, "DiffuseUVRepeat"), 1, glm::value_ptr(glm::vec2(1.0f, 1.0f))); + break; + } + } + } + + glBindVertexArray(modelJob->Model->VAO); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, modelJob->Model->ElementBuffer); + glDrawElements(GL_TRIANGLES, modelJob->EndIndex - modelJob->StartIndex + 1, GL_UNSIGNED_INT, (void*)(modelJob->StartIndex * sizeof(unsigned int))); + + GLERROR("Shadow Draw ERROR"); + } + } + state->CullFace(GL_FRONT); + } + } + } + } + glViewport(0, 0, m_Renderer->GetViewportSize().Width, m_Renderer->GetViewportSize().Height); + m_DepthBuffer.Unbind(); + delete state; + } +} \ No newline at end of file diff --git a/src/Engine/Rendering/ShadowPassState.cpp b/src/Engine/Rendering/ShadowPassState.cpp new file mode 100644 index 00000000..2211e3ab --- /dev/null +++ b/src/Engine/Rendering/ShadowPassState.cpp @@ -0,0 +1,19 @@ +#include "Rendering/ShadowPassState.h" + +ShadowPassState::ShadowPassState(GLuint frameBuffer) +{ + BindFramebuffer(frameBuffer); + Enable(GL_DEPTH_TEST); + Enable(GL_CULL_FACE); + Disable(GL_BLEND); + Disable(GL_TEXTURE_2D); + CullFace(GL_FRONT); + ClearColor(glm::vec4(0.f, 0.f, 0.f, 0.f)); + //Enable(GL_ALPHA_TEST); + //glAlphaFunc(GL_GREATER, 0.9f); +} + +ShadowPassState::~ShadowPassState() +{ + +} \ No newline at end of file From 2ba245368b6ecad9e4f83905bf77aa40a8c66be9 Mon Sep 17 00:00:00 2001 From: viktorljung Date: Tue, 8 Mar 2016 11:21:40 +0100 Subject: [PATCH 06/18] Improved movement animaitons Added a SetBlendWeight event that sets the weight for all nodes with a name. --- .../Engine/Input/FirstPersonInputController.h | 57 +++-- include/Engine/Rendering/AnimationSystem.h | 9 + include/Engine/Rendering/AutoBlendQueue.h | 2 + include/Engine/Rendering/BlendTree.h | 9 +- .../Engine/Rendering/EAutoAnimationBlend.h | 1 - include/Engine/Rendering/ESetBlendWeight.h | 20 ++ resources/Schema/Entities/DashEffect.xml | 11 +- resources/Schema/Entities/Player.xml | 14 +- src/Engine/Rendering/AnimationSystem.cpp | 197 ++++++++++++++---- src/Engine/Rendering/AutoBlendQueue.cpp | 3 +- src/Engine/Rendering/BlendTree.cpp | 57 ++++- src/Engine/Rendering/Skeleton.cpp | 2 + src/Game/Systems/PlayerMovementSystem.cpp | 30 ++- 13 files changed, 331 insertions(+), 81 deletions(-) create mode 100644 include/Engine/Rendering/ESetBlendWeight.h diff --git a/include/Engine/Input/FirstPersonInputController.h b/include/Engine/Input/FirstPersonInputController.h index 00f36ac7..d9b0d3e8 100644 --- a/include/Engine/Input/FirstPersonInputController.h +++ b/include/Engine/Input/FirstPersonInputController.h @@ -7,6 +7,7 @@ #include "../Game/Events/EDashAbility.h" #include "InputHandler.h" #include "Rendering/EAutoAnimationBlend.h" +#include "Rendering/ESetBlendWeight.h" template class FirstPersonInputController : public InputController @@ -45,7 +46,6 @@ protected: bool m_Crouching = false; //assault dash membervariables - needed to calculate the doubletap- and dashlogic double m_AssaultDashDoubleTapDeltaTime = 0.0; - double m_DashEffectResetTimer = 0.0; //i will let m_AssaultDashDoubleTapSensitivityTimer stay hardcoded, its not really a gamevariable (more an inputvariable), //and its very unlikely that someone wants to change that value const float m_AssaultDashDoubleTapSensitivityTimer = 0.25f; @@ -137,6 +137,7 @@ bool FirstPersonInputController::OnCommand(const Events::InputComm } aeb.RootNode = playerModel; aeb.Start = true; + aeb.SingleLevelBlend = true; m_EventBroker->Publish(aeb); } else if (val < 0) { Events::AutoAnimationBlend aeb; @@ -148,6 +149,7 @@ bool FirstPersonInputController::OnCommand(const Events::InputComm } aeb.RootNode = playerModel; aeb.Start = true; + aeb.SingleLevelBlend = true; aeb.Reverse = true; m_EventBroker->Publish(aeb); } else { @@ -169,6 +171,7 @@ bool FirstPersonInputController::OnCommand(const Events::InputComm aeb.Duration = 0.1; aeb.NodeName = "Right"; aeb.RootNode = playerModel; + aeb.SingleLevelBlend = true; aeb.Start = true; m_EventBroker->Publish(aeb); } else if (val < 0) { @@ -176,6 +179,7 @@ bool FirstPersonInputController::OnCommand(const Events::InputComm aeb.Duration = 0.1; aeb.NodeName = "Left"; aeb.RootNode = playerModel; + aeb.SingleLevelBlend = true; aeb.Start = true; m_EventBroker->Publish(aeb); } else { @@ -186,16 +190,28 @@ bool FirstPersonInputController::OnCommand(const Events::InputComm } } - if (glm::length2(m_Movement) > 0) { - m_Movement = glm::normalize(m_Movement); + + + if (glm::length2(m_Movement) < 0.1f) { + if (m_PlayerEntity.Valid()) { + EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel"); + + if (playerModel.Valid()) { + Events::AutoAnimationBlend aeb; + aeb.Duration = 0.2; + aeb.NodeName = "Idle"; + aeb.RootNode = playerModel; + m_EventBroker->Publish(aeb); + } + } } else { if (m_PlayerEntity.Valid()) { EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel"); if (playerModel.Valid()) { Events::AutoAnimationBlend aeb; - aeb.Duration = 0.1; - aeb.NodeName = "Idle"; + aeb.Duration = 0.2; + aeb.NodeName = "MovementBlend"; aeb.RootNode = playerModel; m_EventBroker->Publish(aeb); } @@ -203,6 +219,29 @@ bool FirstPersonInputController::OnCommand(const Events::InputComm } } + + if (glm::length2(m_Movement) > 0) { + m_Movement = glm::normalize(m_Movement); + + if (m_PlayerEntity.Valid()) { + EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel"); + + if (playerModel.Valid()) { + glm::vec2 direction = glm::normalize(glm::vec2(m_Movement.x, m_Movement.z)); + + double weight = glm::abs(glm::dot(glm::vec2(1, 0), direction)); + LOG_INFO("Weight %f", weight); + Events::SetBlendWeight sbw; + sbw.NodeName = "MovementBlend"; + sbw.Weight = weight; + sbw.RootNode = playerModel; + m_EventBroker->Publish(sbw); + } + } + } + + + if (e.Command == "Forward" || e.Command == "Right") { if (e.Value != 0) { m_CurrentDirectionVector = e.Command == "Right" ? (e.Value > 0 ? "Right" : "Left") : (e.Value > 0 ? "Forward" : "Backward"); @@ -288,17 +327,10 @@ bool FirstPersonInputController::OnLockMouse(const Events::LockMou template void FirstPersonInputController::AssaultDashCheck(double dt, bool isJumping, double assaultDashCoolDownMaxTimer, double& assaultDashCoolDownTimer, EntityID playerID) { m_AssaultDashDoubleTapDeltaTime += dt; - m_DashEffectResetTimer += dt; assaultDashCoolDownTimer -= dt; //cooldown = assaultDashCoolDownMaxTimer sec, pretend the dash lasts 0.25 sec (for friction to do its work) if (assaultDashCoolDownTimer > (assaultDashCoolDownMaxTimer - 0.25f)) { m_PlayerIsDashing = true; - if (m_DashEffectResetTimer > 0.05) { - Events::DashAbility e; - e.Player = playerID; - m_EventBroker->Publish(e); - m_DashEffectResetTimer = 0.0; - } } else { m_PlayerIsDashing = false; } @@ -310,6 +342,7 @@ void FirstPersonInputController::AssaultDashCheck(double dt, bool assaultDashCoolDownTimer = assaultDashCoolDownMaxTimer; m_AssaultDashDoubleTapped = true; m_AssaultDashDoubleTapDeltaTime = 0.f; + Events::DashAbility e; e.Player = playerID; m_EventBroker->Publish(e); diff --git a/include/Engine/Rendering/AnimationSystem.h b/include/Engine/Rendering/AnimationSystem.h index 30c6fce5..0305e7c7 100644 --- a/include/Engine/Rendering/AnimationSystem.h +++ b/include/Engine/Rendering/AnimationSystem.h @@ -13,6 +13,8 @@ #include "../Core/EntityWrapper.h" #include "Rendering/AutoBlendQueue.h" #include "../Input/EInputCommand.h" +#include "../Core/EEntityDeleted.h" +#include "Rendering/ESetBlendWeight.h" #include "imgui/imgui.h" class AnimationSystem : public ImpureSystem @@ -28,6 +30,13 @@ private: EventRelay m_EAutoAnimationBlend; bool OnAutoAnimationBlend(Events::AutoAnimationBlend& e); + + EventRelay m_EEntityDeleted; + bool OnEntityDeleted(Events::EntityDeleted& e); + + EventRelay m_ESetBlendWeight; + bool OnSetBlendWeight(Events::SetBlendWeight& e); + std::unordered_map m_AutoBlendQueues; }; diff --git a/include/Engine/Rendering/AutoBlendQueue.h b/include/Engine/Rendering/AutoBlendQueue.h index 3c808408..71fe46d8 100644 --- a/include/Engine/Rendering/AutoBlendQueue.h +++ b/include/Engine/Rendering/AutoBlendQueue.h @@ -37,6 +37,8 @@ public: std::shared_ptr GetBlendTree(); AutoBlendQueue::AutoBlendJob& GetActiveBlendJob(); + + bool Empty() { return m_BlendQueue.empty(); } private: std::list m_BlendQueue; diff --git a/include/Engine/Rendering/BlendTree.h b/include/Engine/Rendering/BlendTree.h index 02f4a348..502a1cc9 100644 --- a/include/Engine/Rendering/BlendTree.h +++ b/include/Engine/Rendering/BlendTree.h @@ -75,7 +75,6 @@ public: std::vector GetFinalPose() { return m_FinalPose; } glm::mat4 GetBoneTransform(int boneID); bool IsValid() { return (m_Root == nullptr ? false : true); } - void PrintTree(); BlendTree::AutoBlendInfo AutoBlendStep(AutoBlendInfo blendInfo); @@ -84,16 +83,20 @@ public: EntityWrapper GetSubTreeRoot(std::string nodeName); + std::vector GetSingleLevelRoots(std::string name); + std::vector GetEntitesByName(std::string name); + + void SetWeightByName(std::string name, double weight); + private: Skeleton* m_Skeleton = nullptr; Node* m_Root = nullptr; std::vector m_FinalPose; std::map m_FinalBoneTransforms; - + std::vector FindNodesByName(std::string name); std::vector AccumulateFinalPose(); BlendTree::Node* FillTreeByName(Node* parentNode, std::string name, EntityWrapper parentEntity); - std::vector FindNodesByName(std::string name); void Blend(std::map& pose); }; diff --git a/include/Engine/Rendering/EAutoAnimationBlend.h b/include/Engine/Rendering/EAutoAnimationBlend.h index 29d3d612..86921f0f 100644 --- a/include/Engine/Rendering/EAutoAnimationBlend.h +++ b/include/Engine/Rendering/EAutoAnimationBlend.h @@ -18,7 +18,6 @@ struct AutoAnimationBlend : Event bool Reverse = false; bool Restart = false; bool SingleLevelBlend = false; - double Weight = -1.0; EntityWrapper AnimationEntity = EntityWrapper::Invalid; diff --git a/include/Engine/Rendering/ESetBlendWeight.h b/include/Engine/Rendering/ESetBlendWeight.h new file mode 100644 index 00000000..2a455d88 --- /dev/null +++ b/include/Engine/Rendering/ESetBlendWeight.h @@ -0,0 +1,20 @@ +#ifndef Events_SetBlendWeight_h__ +#define Events_SetBlendWeight_h__ + +#include "../Core/EventBroker.h" +#include "../Core/EntityWrapper.h" + +namespace Events +{ + +//Sets the blend weight for all nodes with "NodeName" +struct SetBlendWeight : Event +{ + EntityWrapper RootNode = EntityWrapper::Invalid; + std::string NodeName; + double Weight; +}; + +} + +#endif diff --git a/resources/Schema/Entities/DashEffect.xml b/resources/Schema/Entities/DashEffect.xml index 9dfdc14c..6f28784d 100644 --- a/resources/Schema/Entities/DashEffect.xml +++ b/resources/Schema/Entities/DashEffect.xml @@ -2,17 +2,12 @@ - 0.5 - - - 0 - 0.5 - - - + + + diff --git a/resources/Schema/Entities/Player.xml b/resources/Schema/Entities/Player.xml index 475acf78..16b7ccd1 100644 --- a/resources/Schema/Entities/Player.xml +++ b/resources/Schema/Entities/Player.xml @@ -875,7 +875,7 @@ RunF - 1 + 1.5 true @@ -899,7 +899,7 @@ StrafeRightF - 1 + 2 true @@ -911,7 +911,7 @@ StrafeLeftF - 1 + 2 true @@ -986,7 +986,7 @@ DashForwardF - 2 + 3 false @@ -998,7 +998,7 @@ DashBackwardF - 2 + 3 false @@ -1022,7 +1022,7 @@ DashLeftF - 2 + 3 false @@ -1034,7 +1034,7 @@ DashRightF - 2 + 3 false diff --git a/src/Engine/Rendering/AnimationSystem.cpp b/src/Engine/Rendering/AnimationSystem.cpp index 005778e7..be00a0f4 100644 --- a/src/Engine/Rendering/AnimationSystem.cpp +++ b/src/Engine/Rendering/AnimationSystem.cpp @@ -4,6 +4,8 @@ AnimationSystem::AnimationSystem(SystemParams params) : System(params) { EVENT_SUBSCRIBE_MEMBER(m_EAutoAnimationBlend, &AnimationSystem::OnAutoAnimationBlend); + EVENT_SUBSCRIBE_MEMBER(m_EEntityDeleted, &AnimationSystem::OnEntityDeleted); + EVENT_SUBSCRIBE_MEMBER(m_ESetBlendWeight, &AnimationSystem::OnSetBlendWeight); } void AnimationSystem::Update(double dt) @@ -122,16 +124,13 @@ void AnimationSystem::UpdateAnimations(double dt) } } - void AnimationSystem::UpdateWeights(double dt) { - for (auto& autoBlendQueue : m_AutoBlendQueues) { - - if(autoBlendQueue.second.HasActiveBlendJob()) { - AutoBlendQueue::AutoBlendJob& blendJob = autoBlendQueue.second.GetActiveBlendJob(); - - std::shared_ptr blendTree = autoBlendQueue.second.GetBlendTree(); + for (auto it = m_AutoBlendQueues.begin(); it != m_AutoBlendQueues.end(); ) { + if(it->second.HasActiveBlendJob()) { + AutoBlendQueue::AutoBlendJob& blendJob = it->second.GetActiveBlendJob(); + std::shared_ptr blendTree = it->second.GetBlendTree(); if (blendTree != nullptr) { if (blendJob.Duration != 0.0) { blendJob.BlendInfo.progress = glm::clamp(blendJob.CurrentTime / blendJob.Duration, 0.0, 1.0); @@ -140,10 +139,17 @@ void AnimationSystem::UpdateWeights(double dt) } blendJob.BlendInfo = blendTree->AutoBlendStep(blendJob.BlendInfo); + } else { + it = m_AutoBlendQueues.erase(it); + } + it++; + } else { + if (it->second.Empty()) { + it = m_AutoBlendQueues.erase(it); + } else { + it++; } - } - } } @@ -177,46 +183,163 @@ bool AnimationSystem::OnAutoAnimationBlend(Events::AutoAnimationBlend& e) return false; } + EntityWrapper subTreeRoot; - EntityWrapper subTreeRoot = blendTree->GetSubTreeRoot(e.NodeName); + if (e.SingleLevelBlend) { + subTreeRoot = blendTree->GetSubTreeRoot(e.NodeName); - if (!subTreeRoot.Valid()) { - return false; - } + if (!subTreeRoot.Valid()) { + return false; + } - AutoBlendQueue::AutoBlendJob abj; - abj.AnimationEntity = e.AnimationEntity; - abj.CurrentTime = 0.0; - abj.Delay = e.Delay; - abj.Duration = e.Duration; - abj.RootNode = e.RootNode; + AutoBlendQueue::AutoBlendJob abj; + abj.AnimationEntity = e.AnimationEntity; + abj.CurrentTime = 0.0; + abj.Delay = e.Delay; + abj.Duration = e.Duration; + abj.RootNode = e.RootNode; - abj.BlendInfo.NodeName = e.NodeName; - abj.BlendInfo.progress = 0.0; - abj.BlendInfo.Start = e.Start; - abj.BlendInfo.SingleBlend = e.SingleLevelBlend; - abj.BlendInfo.Weight = e.Weight; + abj.BlendInfo.NodeName = e.NodeName; + abj.BlendInfo.progress = 0.0; + abj.BlendInfo.Start = e.Start; + abj.BlendInfo.SingleBlend = e.SingleLevelBlend; + abj.BlendInfo.Weight = e.Weight; - EntityWrapper nodeEntity = subTreeRoot.FirstChildByName(e.NodeName); // more than one - if (nodeEntity.Valid()) { - if (nodeEntity.HasComponent("Animation")) { - const Skeleton::Animation* animation = skeleton->GetAnimation(nodeEntity["Animation"]["AnimationName"]); - (bool&)nodeEntity["Animation"]["Reverse"] = e.Reverse; + std::vector animationEntities = blendTree->GetEntitesByName(e.NodeName); // more than one + for(auto entity : animationEntities) + if (entity.Valid()) { + if (entity.HasComponent("Animation")) { + const Skeleton::Animation* animation = skeleton->GetAnimation(entity["Animation"]["AnimationName"]); + (bool&)entity["Animation"]["Reverse"] = e.Reverse; - if (e.Restart) { - if (animation != nullptr) { - if (e.Restart) { - if (e.Reverse) { - (double&)nodeEntity["Animation"]["Time"] = animation->Duration; - } else { - (double&)nodeEntity["Animation"]["Time"] = 0.0; + if (e.Restart) { + if (animation != nullptr) { + if (e.Restart) { + if (e.Reverse) { + (double&)entity["Animation"]["Time"] = animation->Duration; + } else { + (double&)entity["Animation"]["Time"] = 0.0; + } } } } } } + m_AutoBlendQueues[subTreeRoot].Insert(abj); + } else { + std::vector subtreeroots = blendTree->GetSingleLevelRoots(e.NodeName); + + for(auto entity : subtreeroots) { + subTreeRoot = entity; + + if (!subTreeRoot.Valid()) { + return false; + } + + AutoBlendQueue::AutoBlendJob abj; + abj.AnimationEntity = e.AnimationEntity; + abj.CurrentTime = 0.0; + abj.Delay = e.Delay; + abj.Duration = e.Duration; + abj.RootNode = e.RootNode; + + abj.BlendInfo.NodeName = e.NodeName; + abj.BlendInfo.progress = 0.0; + abj.BlendInfo.Start = e.Start; + abj.BlendInfo.SingleBlend = e.SingleLevelBlend; + abj.BlendInfo.Weight = e.Weight; + m_AutoBlendQueues[subTreeRoot].Insert(abj); + } + + std::vector animationEntities = blendTree->GetEntitesByName(e.NodeName); // more than one + for (auto entity : animationEntities) + if (entity.Valid()) { + if (entity.HasComponent("Animation")) { + const Skeleton::Animation* animation = skeleton->GetAnimation(entity["Animation"]["AnimationName"]); + (bool&)entity["Animation"]["Reverse"] = e.Reverse; + + if (e.Restart) { + if (animation != nullptr) { + if (e.Restart) { + if (e.Reverse) { + (double&)entity["Animation"]["Time"] = animation->Duration; + } else { + (double&)entity["Animation"]["Time"] = 0.0; + } + } + } + } + } + } } - m_AutoBlendQueues[subTreeRoot].Insert(abj); + + return true; } + +bool AnimationSystem::OnEntityDeleted(Events::EntityDeleted& e) +{ + EntityWrapper entity = EntityWrapper(m_World, e.DeletedEntity); + + if (entity.HasComponent("Model")) { + Model* model; + try { + model = ResourceManager::Load<::Model, true>(entity["Model"]["Resource"]); + } catch (const std::exception&) { + return false; + } + + Skeleton* skeleton = model->m_RawModel->m_Skeleton; + if (skeleton == nullptr) { + return false; + } + + if (skeleton->BlendTrees.find(entity) != skeleton->BlendTrees.end()) { + skeleton->BlendTrees.erase(entity); + } + + + } + +} + +bool AnimationSystem::OnSetBlendWeight(Events::SetBlendWeight& e) +{ + if (!e.RootNode.Valid()) { + return false; + } + + if (!e.RootNode.HasComponent("Model")) { + return false; + } + + Model* model; + try { + model = ResourceManager::Load<::Model, true>((std::string)e.RootNode["Model"]["Resource"]); + } catch (const std::exception&) { + return false; + } + + Skeleton* skeleton = model->m_RawModel->m_Skeleton; + if (skeleton == nullptr) { + return false; + } + + std::shared_ptr blendTree; + if (skeleton->BlendTrees.find(e.RootNode) != skeleton->BlendTrees.end()) { + blendTree = skeleton->BlendTrees.at(e.RootNode); + } else { + return false; + } + + if(e.Weight >= 0 && e.Weight <= 1) { + + blendTree->SetWeightByName(e.NodeName, e.Weight); + + return true; + } else { + return false; + } + +} diff --git a/src/Engine/Rendering/AutoBlendQueue.cpp b/src/Engine/Rendering/AutoBlendQueue.cpp index cafb7ee5..1c6907e8 100644 --- a/src/Engine/Rendering/AutoBlendQueue.cpp +++ b/src/Engine/Rendering/AutoBlendQueue.cpp @@ -75,7 +75,6 @@ void AutoBlendQueue::Insert(AutoBlendJob autoBlendJob) } } - m_BlendQueue.clear(); m_BlendQueue.push_back(blendNode); } @@ -124,7 +123,7 @@ bool AutoBlendQueue::HasActiveBlendJob() try { model = ResourceManager::Load<::Model, true>(blendJob.RootNode["Model"]["Resource"]); } catch (const std::exception&) { - m_BlendQueue.pop_front(); + //m_BlendQueue.pop_front(); return HasActiveBlendJob(); } diff --git a/src/Engine/Rendering/BlendTree.cpp b/src/Engine/Rendering/BlendTree.cpp index 29bbe7e6..1ecafc56 100644 --- a/src/Engine/Rendering/BlendTree.cpp +++ b/src/Engine/Rendering/BlendTree.cpp @@ -2,11 +2,8 @@ BlendTree::BlendTree(EntityWrapper ModelEntity, Skeleton* skeleton) { - m_Skeleton = skeleton; - - if (ModelEntity.HasComponent("Animation")) { const Skeleton::Animation* animation = skeleton->GetAnimation(ModelEntity["Animation"]["AnimationName"]); if (animation == nullptr) { @@ -270,7 +267,7 @@ BlendTree::AutoBlendInfo BlendTree::AutoBlendStep(AutoBlendInfo blendInfo) currentNode = currentNode->Parent; if (blendInfo.SingleBlend) { - break; + return blendInfo;; } } } else if(goalNodes.size() >= 2) { @@ -331,6 +328,9 @@ BlendTree::AutoBlendInfo BlendTree::AutoBlendStep(AutoBlendInfo blendInfo) lastNode = currentNode; currentNode = currentNode->Parent; + if (blendInfo.SingleBlend) { + return blendInfo; + } } } @@ -427,6 +427,55 @@ EntityWrapper BlendTree::GetSubTreeRoot(std::string nodeName) return subTreeRoots.front()->Entity; } + +std::vector BlendTree::GetSingleLevelRoots(std::string name) +{ + std::vector nodes = FindNodesByName(name); + std::vector entities; + + for (auto it = nodes.begin(); it != nodes.end(); it++) { + Node* currentNode = (*it)->Parent; + + if(currentNode->Entity.Valid()) { + entities.push_back(currentNode->Entity); + } + } + + return entities; +} + + +std::vector BlendTree::GetEntitesByName(std::string name) +{ + std::vector nodes = FindNodesByName(name); + std::vector entities; + + for (auto it = nodes.begin(); it != nodes.end(); it++) { + Node* currentNode = (*it); + + if (currentNode->Entity.Valid()) { + entities.push_back(currentNode->Entity); + } + } + + return entities; +} + + +void BlendTree::SetWeightByName(std::string name, double weight) +{ + std::vector nodes = FindNodesByName(name); + + for (auto node : nodes) { + EntityWrapper entity = node->Entity; + + if(entity.HasComponent("Blend")) { + entity["Blend"]["Weight"] = weight; + node->Weight = weight; + } + } +} + void BlendTree::Blend(std::map& pose) { Node* currentNode; diff --git a/src/Engine/Rendering/Skeleton.cpp b/src/Engine/Rendering/Skeleton.cpp index 592279ed..2883c53d 100644 --- a/src/Engine/Rendering/Skeleton.cpp +++ b/src/Engine/Rendering/Skeleton.cpp @@ -321,6 +321,8 @@ Skeleton::~Skeleton() for (auto &kv : Bones) { delete kv.second; } + + BlendTrees.clear(); } const Skeleton::Animation* Skeleton::GetAnimation(std::string name) diff --git a/src/Game/Systems/PlayerMovementSystem.cpp b/src/Game/Systems/PlayerMovementSystem.cpp index 3d897bf7..dbf3d889 100644 --- a/src/Game/Systems/PlayerMovementSystem.cpp +++ b/src/Game/Systems/PlayerMovementSystem.cpp @@ -443,18 +443,34 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e) } } } + + + /* EntityWrapper dashEffectModel; + dashEffectModel = playerModel.Clone(dashEffect); + player["Transform"].Copy(dashEffectModel["Transform"]); + + + dashEffectModel.AttachComponent("ExplosionEffect"); + dashEffectModel["ExplosionEffect"]["EndColor"] = (glm::vec4)playerModel["Model"]["Color"]; + ((glm::vec4&)dashEffectModel["ExplosionEffect"]["EndColor"]).w = 0.f; + (double&)dashEffectModel["ExplosionEffect"]["ExplosionDuration"] = dashEffect["Lifetime"]["Lifetime"]; + (glm::vec3&)dashEffectModel["ExplosionEffect"]["ExplosionOrigin"] = glm::vec3(0, 1, 0) + (0.2f * controller->Movement()); + + + + auto animationChildren = dashEffectModel.ChildrenWithComponent("Animation"); + + for (auto animationEntity : animationChildren) { + (bool&)animationEntity["Animation"]["Play"] = false; + }*/ } } } -/* - auto playerEntityAnimation = playerModel["Animation"]; - playerEntityModel.Copy(dashEffect["Model"]); - playerEntityAnimation.Copy(dashEffect["Animation"]); - dashEffect["ExplosionEffect"]["EndColor"] = (glm::vec4)playerEntityModel["Color"]; - ((glm::vec4&)dashEffect["ExplosionEffect"]["EndColor"]).w = 0.f; -*/ + + + From f77a6105195a65b7dce492b216b5a64f3c4e6f78 Mon Sep 17 00:00:00 2001 From: viktorljung Date: Tue, 8 Mar 2016 13:26:01 +0100 Subject: [PATCH 07/18] Dash now looking good --- .../Engine/Input/FirstPersonInputController.h | 114 +++++++++--------- resources/Schema/Entities/Player.xml | 8 +- src/Engine/Rendering/AnimationSystem.cpp | 2 + src/Engine/Rendering/AutoBlendQueue.cpp | 11 +- src/Game/Systems/PlayerMovementSystem.cpp | 48 +++----- 5 files changed, 88 insertions(+), 95 deletions(-) diff --git a/include/Engine/Input/FirstPersonInputController.h b/include/Engine/Input/FirstPersonInputController.h index d9b0d3e8..75726fd3 100644 --- a/include/Engine/Input/FirstPersonInputController.h +++ b/include/Engine/Input/FirstPersonInputController.h @@ -110,7 +110,6 @@ bool FirstPersonInputController::OnCommand(const Events::InputComm if (e.Command == "Pitch") { float val = glm::radians(e.Value); m_Rotation.x += -val; - //m_Rotation.x = glm::clamp(m_Rotation.x, -glm::half_pi(), glm::half_pi()); } if (e.Command == "Yaw") { @@ -123,14 +122,14 @@ bool FirstPersonInputController::OnCommand(const Events::InputComm float val = glm::clamp(e.Value, -1.f, 1.f); m_Movement.z = -val; + //Animation if (m_PlayerEntity.Valid()) { EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel"); if (playerModel.Valid()) { - if (val > 0) { + if (val > 0) { // Walk/Run Events::AutoAnimationBlend aeb; aeb.Duration = 0.1; - - if(m_Crouching) { + if (m_Crouching) { aeb.NodeName = "Walk"; } else { aeb.NodeName = "Run"; @@ -139,7 +138,7 @@ bool FirstPersonInputController::OnCommand(const Events::InputComm aeb.Start = true; aeb.SingleLevelBlend = true; m_EventBroker->Publish(aeb); - } else if (val < 0) { + } else if (val < 0) { // Walk/run Backwards Events::AutoAnimationBlend aeb; aeb.Duration = 0.1; if (m_Crouching) { @@ -152,8 +151,6 @@ bool FirstPersonInputController::OnCommand(const Events::InputComm aeb.SingleLevelBlend = true; aeb.Reverse = true; m_EventBroker->Publish(aeb); - } else { - } } } @@ -162,10 +159,11 @@ bool FirstPersonInputController::OnCommand(const Events::InputComm float val = glm::clamp(e.Value, -1.f, 1.f); m_Movement.x = val; + + //Animation if (m_PlayerEntity.Valid()) { EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel"); - - if (playerModel.Valid()) { + if (playerModel.Valid()) { //Right Strafe if (val > 0) { Events::AutoAnimationBlend aeb; aeb.Duration = 0.1; @@ -174,7 +172,7 @@ bool FirstPersonInputController::OnCommand(const Events::InputComm aeb.SingleLevelBlend = true; aeb.Start = true; m_EventBroker->Publish(aeb); - } else if (val < 0) { + } else if (val < 0) { //LeftStrafe Events::AutoAnimationBlend aeb; aeb.Duration = 0.1; aeb.NodeName = "Left"; @@ -182,63 +180,59 @@ bool FirstPersonInputController::OnCommand(const Events::InputComm aeb.SingleLevelBlend = true; aeb.Start = true; m_EventBroker->Publish(aeb); - } else { - - } } } - - } - - - if (glm::length2(m_Movement) < 0.1f) { - if (m_PlayerEntity.Valid()) { - EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel"); - - if (playerModel.Valid()) { - Events::AutoAnimationBlend aeb; - aeb.Duration = 0.2; - aeb.NodeName = "Idle"; - aeb.RootNode = playerModel; - m_EventBroker->Publish(aeb); - } - } - } else { - if (m_PlayerEntity.Valid()) { - EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel"); - - if (playerModel.Valid()) { - Events::AutoAnimationBlend aeb; - aeb.Duration = 0.2; - aeb.NodeName = "MovementBlend"; - aeb.RootNode = playerModel; - m_EventBroker->Publish(aeb); - } - } } } - - if (glm::length2(m_Movement) > 0) { - m_Movement = glm::normalize(m_Movement); - - if (m_PlayerEntity.Valid()) { - EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel"); - - if (playerModel.Valid()) { - glm::vec2 direction = glm::normalize(glm::vec2(m_Movement.x, m_Movement.z)); - - double weight = glm::abs(glm::dot(glm::vec2(1, 0), direction)); - LOG_INFO("Weight %f", weight); - Events::SetBlendWeight sbw; - sbw.NodeName = "MovementBlend"; - sbw.Weight = weight; - sbw.RootNode = playerModel; - m_EventBroker->Publish(sbw); - } + //Animation + if (glm::length2(m_Movement) < 0.1f) { + //Blend to Idle + if (m_PlayerEntity.Valid()) { + EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel"); + if (playerModel.Valid()) { + Events::AutoAnimationBlend aeb; + aeb.Duration = 0.2; + aeb.NodeName = "Idle"; + aeb.RootNode = playerModel; + m_EventBroker->Publish(aeb); } } + } else { + + //Blend to movement + if (m_PlayerEntity.Valid()) { + EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel"); + if (playerModel.Valid()) { + Events::AutoAnimationBlend aeb; + aeb.Duration = 0.2; + aeb.NodeName = "MovementBlend"; + aeb.RootNode = playerModel; + m_EventBroker->Publish(aeb); + } + } + } + + + if (glm::length2(m_Movement) > 0) { + m_Movement = glm::normalize(m_Movement); + + //Animation + // movement direction blend + if (m_PlayerEntity.Valid()) { + EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel"); + if (playerModel.Valid()) { + glm::vec2 direction = glm::normalize(glm::vec2(m_Movement.x, m_Movement.z)); + double weight = glm::abs(glm::dot(glm::vec2(1, 0), direction)); + Events::SetBlendWeight sbw; + sbw.NodeName = "MovementBlend"; + sbw.Weight = weight; + sbw.RootNode = playerModel; + m_EventBroker->Publish(sbw); + } + } + } @@ -274,6 +268,8 @@ bool FirstPersonInputController::OnCommand(const Events::InputComm if (e.Command == "Crouch") { m_Crouching = e.Value > 0; + + //Animation if (m_PlayerEntity.Valid()) { EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel"); if (playerModel.Valid()) { diff --git a/resources/Schema/Entities/Player.xml b/resources/Schema/Entities/Player.xml index 16b7ccd1..d51b8cc5 100644 --- a/resources/Schema/Entities/Player.xml +++ b/resources/Schema/Entities/Player.xml @@ -986,7 +986,7 @@ DashForwardF - 3 + 1.7999999523162842 false @@ -998,7 +998,7 @@ DashBackwardF - 3 + 1.7999999523162842 false @@ -1022,7 +1022,7 @@ DashLeftF - 3 + 1.7999999523162842 false @@ -1034,7 +1034,7 @@ DashRightF - 3 + 1.7999999523162842 false diff --git a/src/Engine/Rendering/AnimationSystem.cpp b/src/Engine/Rendering/AnimationSystem.cpp index be00a0f4..f6c91d46 100644 --- a/src/Engine/Rendering/AnimationSystem.cpp +++ b/src/Engine/Rendering/AnimationSystem.cpp @@ -127,6 +127,7 @@ void AnimationSystem::UpdateAnimations(double dt) void AnimationSystem::UpdateWeights(double dt) { for (auto it = m_AutoBlendQueues.begin(); it != m_AutoBlendQueues.end(); ) { + it->second.PrintQueue(); if(it->second.HasActiveBlendJob()) { AutoBlendQueue::AutoBlendJob& blendJob = it->second.GetActiveBlendJob(); @@ -151,6 +152,7 @@ void AnimationSystem::UpdateWeights(double dt) } } } + LOG_INFO(""); } bool AnimationSystem::OnAutoAnimationBlend(Events::AutoAnimationBlend& e) diff --git a/src/Engine/Rendering/AutoBlendQueue.cpp b/src/Engine/Rendering/AutoBlendQueue.cpp index 1c6907e8..f4a854ec 100644 --- a/src/Engine/Rendering/AutoBlendQueue.cpp +++ b/src/Engine/Rendering/AutoBlendQueue.cpp @@ -38,11 +38,14 @@ void AutoBlendQueue::Insert(AutoBlendJob autoBlendJob) double animationSpeed = (double)autoBlendJob.AnimationEntity["Animation"]["Speed"]; double animationTime = (double)autoBlendJob.AnimationEntity["Animation"]["Time"]; - - if ((bool)autoBlendJob.AnimationEntity["Animation"]["Reverse"]) { - AnimationDuration = (animation->Duration * animationSpeed) - (animation->Duration - animationTime); + if (animationSpeed != 0) { + if ((bool)autoBlendJob.AnimationEntity["Animation"]["Reverse"]) { + AnimationDuration = (animation->Duration / animationSpeed) - (animation->Duration - animationTime); + } else { + AnimationDuration = (animation->Duration / animationSpeed) - animationTime; + } } else { - AnimationDuration = (animation->Duration * animationSpeed) - animationTime; + return; } blendNode.StartTime += AnimationDuration; diff --git a/src/Game/Systems/PlayerMovementSystem.cpp b/src/Game/Systems/PlayerMovementSystem.cpp index dbf3d889..dad84932 100644 --- a/src/Game/Systems/PlayerMovementSystem.cpp +++ b/src/Game/Systems/PlayerMovementSystem.cpp @@ -358,7 +358,7 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e) if (controller->Movement().x > 0) { { Events::AutoAnimationBlend aeb; - aeb.Duration = 0.3; + aeb.Duration = 0.1; aeb.NodeName = "DashRight"; aeb.RootNode = playerModel; aeb.Restart = true; @@ -367,19 +367,19 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e) } { Events::AutoAnimationBlend aeb; - aeb.Duration = 0.3; + aeb.Duration = 0.2; aeb.NodeName = "StandCrouchBlend"; aeb.RootNode = playerModel; - aeb.Delay = -0.3; + aeb.Delay = 0.2; aeb.Start = true; aeb.Restart = false; - aeb.AnimationEntity = playerModel.FirstChildByName("DashForward"); + aeb.AnimationEntity = playerModel.FirstChildByName("DashRight"); m_EventBroker->Publish(aeb); } } else { { Events::AutoAnimationBlend aeb; - aeb.Duration = 0.3; + aeb.Duration = 0.1; aeb.NodeName = "DashLeft"; aeb.RootNode = playerModel; aeb.Restart = true; @@ -388,13 +388,13 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e) } { Events::AutoAnimationBlend aeb; - aeb.Duration = 0.3; + aeb.Duration = 0.2; aeb.NodeName = "StandCrouchBlend"; aeb.RootNode = playerModel; - aeb.Delay = -0.3; + aeb.Delay = 0.2; aeb.Start = true; aeb.Restart = false; - aeb.AnimationEntity = playerModel.FirstChildByName("DashForward"); + aeb.AnimationEntity = playerModel.FirstChildByName("DashLeft"); m_EventBroker->Publish(aeb); } } @@ -402,7 +402,7 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e) if (controller->Movement().z < 0) { { Events::AutoAnimationBlend aeb; - aeb.Duration = 0.3; + aeb.Duration = 0.1; aeb.NodeName = "DashForward"; aeb.RootNode = playerModel; aeb.Restart = true; @@ -411,10 +411,10 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e) } { Events::AutoAnimationBlend aeb; - aeb.Duration = 0.3; + aeb.Duration = 0.2; aeb.NodeName = "StandCrouchBlend"; aeb.RootNode = playerModel; - aeb.Delay = -0.3; + aeb.Delay = 0.2; aeb.Start = true; aeb.Restart = false; aeb.AnimationEntity = playerModel.FirstChildByName("DashForward"); @@ -423,7 +423,7 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e) } else { { Events::AutoAnimationBlend aeb; - aeb.Duration = 0.3; + aeb.Duration = 0.1; aeb.NodeName = "DashBackward"; aeb.RootNode = playerModel; aeb.Restart = true; @@ -432,29 +432,30 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e) } { Events::AutoAnimationBlend aeb; - aeb.Duration = 0.3; + aeb.Duration = 0.2; aeb.NodeName = "StandCrouchBlend"; aeb.RootNode = playerModel; - aeb.Delay = -0.3; + aeb.Delay = 0.2; aeb.Start = true; aeb.Restart = false; - aeb.AnimationEntity = playerModel.FirstChildByName("DashForward"); + aeb.AnimationEntity = playerModel.FirstChildByName("DashBackward"); m_EventBroker->Publish(aeb); } } } - /* EntityWrapper dashEffectModel; - dashEffectModel = playerModel.Clone(dashEffect); + EntityWrapper dashEffectModel; + dashEffectModel = playerModel.Clone(); player["Transform"].Copy(dashEffectModel["Transform"]); - dashEffectModel.AttachComponent("ExplosionEffect"); + /* dashEffectModel.AttachComponent("ExplosionEffect"); dashEffectModel["ExplosionEffect"]["EndColor"] = (glm::vec4)playerModel["Model"]["Color"]; ((glm::vec4&)dashEffectModel["ExplosionEffect"]["EndColor"]).w = 0.f; (double&)dashEffectModel["ExplosionEffect"]["ExplosionDuration"] = dashEffect["Lifetime"]["Lifetime"]; (glm::vec3&)dashEffectModel["ExplosionEffect"]["ExplosionOrigin"] = glm::vec3(0, 1, 0) + (0.2f * controller->Movement()); +*/ @@ -462,18 +463,9 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e) for (auto animationEntity : animationChildren) { (bool&)animationEntity["Animation"]["Play"] = false; - }*/ + } } } } - - - - - - - - - return true; } From 8d1877321a808848c0b4d048fe507b3b154b16b2 Mon Sep 17 00:00:00 2001 From: viktorljung Date: Tue, 8 Mar 2016 14:32:50 +0100 Subject: [PATCH 08/18] Fixed BoneAttachment offset rotation --- assets | 2 +- .../Schema/Entities/ModelCollisionTest.xml | 164 ++++++++++++++---- resources/Schema/Entities/MovementTest.xml | 47 ++++- src/Engine/Rendering/AnimationSystem.cpp | 2 - src/Engine/Rendering/BoneAttachmentSystem.cpp | 11 +- src/Game/Systems/PlayerMovementSystem.cpp | 8 +- 6 files changed, 193 insertions(+), 41 deletions(-) diff --git a/assets b/assets index 4205e927..22ccaf7a 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 4205e92755aa67c90db6d272047cd92037ae9f11 +Subproject commit 22ccaf7a8d51c4aee6b0a0a3cb1cff6945c01151 diff --git a/resources/Schema/Entities/ModelCollisionTest.xml b/resources/Schema/Entities/ModelCollisionTest.xml index c4a3f81b..2adcc989 100644 --- a/resources/Schema/Entities/ModelCollisionTest.xml +++ b/resources/Schema/Entities/ModelCollisionTest.xml @@ -2,64 +2,168 @@ - - - + - + - - + + + + + + + + Schema/Entities/PlayerAssaultFallbackRed.xml + - - - - - - - - - - - ../assets/Models/Core/Tri.obj - - - - - + + - ../assets/Models/Core/Tri.obj + Models/Characters/Assault/AssaultRed.mesh - + + + + + + + + + + Models/Characters/Assault/AssaultRed.mesh + + + + - + - - + + 0.5 + 4 + + - ../assets/Models/Core/UnitCube.obj + sModels/Widgets/Lights/DirectionalLightWidget.mesh - - + + + + + + + Models/Test/ObstacleCourse.mesh + + + + + + + + + + + + + + + Schema/Entities/Player.xml + + + + + + + + + + + Models/Characters/Assault/AssaultBlue.mesh + + + + + + + + + + + + + Models/Characters/Assault/AssaultBlue.mesh + + + + + + + + + + + + + + ActivateDeactive + + + + Models/Characters/Defender/FirstPersonDefenderBlue.mesh + + + + + + + + + + ActivateDeactiveShieldF + + 1 + true + + + + + + + + + R_Arm_Weapon_Joint + + + Models/Weapons/Blue/DefenderWeaponBlue.mesh + + + + + + + + + + diff --git a/resources/Schema/Entities/MovementTest.xml b/resources/Schema/Entities/MovementTest.xml index 90c943ef..ea34db86 100644 --- a/resources/Schema/Entities/MovementTest.xml +++ b/resources/Schema/Entities/MovementTest.xml @@ -98,7 +98,7 @@ - + @@ -111,7 +111,50 @@ - + + + + + + + + + + + ActivateDeactive + + + + Models/Characters/Defender/FirstPersonDefenderBlue.mesh + + + + + + + + + + ActivateDeactiveShieldF + + 1 + true + + + + + + + + + R_Arm_Weapon_Joint + + + Models/Weapons/Blue/DefenderWeaponBlue.mesh + + + + diff --git a/src/Engine/Rendering/AnimationSystem.cpp b/src/Engine/Rendering/AnimationSystem.cpp index f6c91d46..be00a0f4 100644 --- a/src/Engine/Rendering/AnimationSystem.cpp +++ b/src/Engine/Rendering/AnimationSystem.cpp @@ -127,7 +127,6 @@ void AnimationSystem::UpdateAnimations(double dt) void AnimationSystem::UpdateWeights(double dt) { for (auto it = m_AutoBlendQueues.begin(); it != m_AutoBlendQueues.end(); ) { - it->second.PrintQueue(); if(it->second.HasActiveBlendJob()) { AutoBlendQueue::AutoBlendJob& blendJob = it->second.GetActiveBlendJob(); @@ -152,7 +151,6 @@ void AnimationSystem::UpdateWeights(double dt) } } } - LOG_INFO(""); } bool AnimationSystem::OnAutoAnimationBlend(Events::AutoAnimationBlend& e) diff --git a/src/Engine/Rendering/BoneAttachmentSystem.cpp b/src/Engine/Rendering/BoneAttachmentSystem.cpp index 43dc8634..6c8eb338 100644 --- a/src/Engine/Rendering/BoneAttachmentSystem.cpp +++ b/src/Engine/Rendering/BoneAttachmentSystem.cpp @@ -49,14 +49,19 @@ void BoneAttachmentSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapp glm::vec3 skew; glm::vec4 perspective; glm::decompose(boneTransform, scale, rotation, translation, skew, perspective); - - glm::vec3 angles = glm::vec3(-glm::pitch(rotation), -glm::yaw(rotation), -glm::roll(rotation)); + + + rotation = rotation * glm::quat((glm::vec3)entity["BoneAttachment"]["OrientationOffset"]); + + rotation.w = -rotation.w; + glm::vec3 angles = glm::eulerAngles(rotation); + if ((bool)entity["BoneAttachment"]["InheritPosition"]) { (glm::vec3&)entity["Transform"]["Position"] = translation + (glm::vec3)entity["BoneAttachment"]["PositionOffset"]; } if ((bool)entity["BoneAttachment"]["InheritOrientation"]) { - (glm::vec3&)entity["Transform"]["Orientation"] = angles + (glm::vec3)entity["BoneAttachment"]["OrientationOffset"]; + (glm::vec3&)entity["Transform"]["Orientation"] = angles; } if ((bool)entity["BoneAttachment"]["InheritScale"]) { (glm::vec3&)entity["Transform"]["Scale"] = scale * (glm::vec3)entity["BoneAttachment"]["ScaleOffset"]; diff --git a/src/Game/Systems/PlayerMovementSystem.cpp b/src/Game/Systems/PlayerMovementSystem.cpp index dad84932..5ab9f19d 100644 --- a/src/Game/Systems/PlayerMovementSystem.cpp +++ b/src/Game/Systems/PlayerMovementSystem.cpp @@ -444,18 +444,18 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e) } } - +/* EntityWrapper dashEffectModel; dashEffectModel = playerModel.Clone(); player["Transform"].Copy(dashEffectModel["Transform"]); - /* dashEffectModel.AttachComponent("ExplosionEffect"); + dashEffectModel.AttachComponent("ExplosionEffect"); dashEffectModel["ExplosionEffect"]["EndColor"] = (glm::vec4)playerModel["Model"]["Color"]; ((glm::vec4&)dashEffectModel["ExplosionEffect"]["EndColor"]).w = 0.f; (double&)dashEffectModel["ExplosionEffect"]["ExplosionDuration"] = dashEffect["Lifetime"]["Lifetime"]; (glm::vec3&)dashEffectModel["ExplosionEffect"]["ExplosionOrigin"] = glm::vec3(0, 1, 0) + (0.2f * controller->Movement()); -*/ + @@ -464,7 +464,9 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e) for (auto animationEntity : animationChildren) { (bool&)animationEntity["Animation"]["Play"] = false; } + */ } + } } return true; From 70ec075887f6221d7e41f1443169ece14331a285 Mon Sep 17 00:00:00 2001 From: viktorljung Date: Wed, 9 Mar 2016 13:19:56 +0100 Subject: [PATCH 09/18] 3rd person aim improvements --- resources/Schema/Entities/MovementTest.xml | 16 +- .../Schema/Entities/PlayerAssaultBlue.xml | 138 ++--- resources/Schema/Entities/ShootingRange.xml | 273 +++++++++ .../Schema/Entities/ThirdPersonBlendTree.xml | 528 ++++++++++++++++++ src/Game/Systems/PlayerMovementSystem.cpp | 9 +- 5 files changed, 853 insertions(+), 111 deletions(-) create mode 100644 resources/Schema/Entities/ShootingRange.xml create mode 100644 resources/Schema/Entities/ThirdPersonBlendTree.xml diff --git a/resources/Schema/Entities/MovementTest.xml b/resources/Schema/Entities/MovementTest.xml index 8ad34c93..8a99df55 100644 --- a/resources/Schema/Entities/MovementTest.xml +++ b/resources/Schema/Entities/MovementTest.xml @@ -54,7 +54,10 @@ - + + 0.49999982118606567 + 2.5599997043609619 + sModels/Widgets/Lights/DirectionalLightWidget.mesh @@ -100,7 +103,7 @@ - + @@ -113,7 +116,7 @@ - + @@ -138,8 +141,7 @@ ActivateDeactiveShieldF - - 1 + true @@ -155,8 +157,8 @@ Models/Weapons/Blue/DefenderWeaponBlue.mesh - - + + diff --git a/resources/Schema/Entities/PlayerAssaultBlue.xml b/resources/Schema/Entities/PlayerAssaultBlue.xml index 8bceb701..cad75d5b 100644 --- a/resources/Schema/Entities/PlayerAssaultBlue.xml +++ b/resources/Schema/Entities/PlayerAssaultBlue.xml @@ -6,9 +6,7 @@ - - 0.5 - + @@ -31,7 +29,6 @@ - @@ -577,8 +574,8 @@ Schema/Entities/WeaponAssaultBlueWorld.xml - - + + @@ -598,8 +595,8 @@ Schema/Entities/SidearmWeaponWorld.xml - - + + @@ -644,7 +641,7 @@ - ReloadSwitchBlend + UpperBody FinalMovementBlend @@ -706,8 +703,7 @@ CrouchStrafeLeftF - - 1 + true @@ -718,8 +714,7 @@ CrouchStrafeRightF - - 1 + true @@ -732,8 +727,7 @@ CrouchWalkF - - 1 + true @@ -747,7 +741,6 @@ CrouchF - 1 @@ -789,8 +782,7 @@ WalkF - - 1 + true @@ -801,8 +793,7 @@ RunF - - 1 + true @@ -825,8 +816,7 @@ StrafeLeftF - - 1 + true @@ -837,8 +827,7 @@ StrafeRightF - - 1 + true @@ -853,8 +842,7 @@ IdleF - - 1 + true @@ -881,7 +869,6 @@ JumpF - 1 false @@ -976,105 +963,58 @@ - + - ReloadSwitch - WeaponActionBlend - 1 - true + Idle + FireReload - + - ReloadSwitchU - - 1 + IdleAssaultRifleU + + true - + - IdleBlend - ShootBlend + Fire + Reload 0 + true - + - - IdlePrimary - IdleSecondary - 0 - + + ReloadSwitchU + + 0.5 + false + - - - - - IdleAssaultRifleU - - 1 - true - - - - - - - - - IdleSecWepU - - 1 - true - - - - - - + - + - - ShootPrimary - ShootSecondary - 0 - + + ShootFastRifleU + + - - - - - ShootFastRifleU - - 1 - - - - - - - - - ShootSecWepFastU - - - - - - + diff --git a/resources/Schema/Entities/ShootingRange.xml b/resources/Schema/Entities/ShootingRange.xml new file mode 100644 index 00000000..a05403c0 --- /dev/null +++ b/resources/Schema/Entities/ShootingRange.xml @@ -0,0 +1,273 @@ + + + + + + + + + + + + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/Schema/Entities/ThirdPersonBlendTree.xml b/resources/Schema/Entities/ThirdPersonBlendTree.xml new file mode 100644 index 00000000..eb6f319e --- /dev/null +++ b/resources/Schema/Entities/ThirdPersonBlendTree.xml @@ -0,0 +1,528 @@ + + + + + + BlendTreeAim + BlendTreeAssault + + + + + Models/Characters/Assault/AssaultBlue.mesh + + + + + + + + + + R_Arm_Weapon_Joint + + + AssaultWeapon + + + + + + Schema/Entities/WeaponAssaultBlueWorld.xml + + + + + + + + + + + + R_Arm_Weapon_Joint + + + SidearmWeapon + + + + + + Schema/Entities/SidearmWeaponWorld.xml + + + + + + + + + + + + AimPrimary + AimSecondary + 0 + true + + + + + + + + AimSecWepA + + false + true + + + + + + + + + AimRifleA + + false + true + + + + + + + + + + + ReloadSwitchBlend + FinalMovementBlend + + + + + + + + StandCrouchBlend + JumpDashBlend + 2.5146881298480398e-63 + true + + + + + + + + StandMovement + CrouchMovement + 0 + true + + + + + + + + MovementBlend + Idle + 1 + + + + + + + + Walk + StrafeLRBlend + 0 + + + + + + + + Left + Right + 0.033793529385008014 + + + + + + + + CrouchStrafeLeftF + + true + + + + + + + + + CrouchStrafeRightF + + true + + + + + + + + + + + CrouchWalkF + + true + + + + + + + + + + + CrouchF + + + + + + + + + + + + MovementBlend + Idle + 1 + + + + + + + + RunWalkBlend + StrafeLRBlend + 0 + + + + + + + + Walk + Run + 1 + + + + + + + + WalkF + + true + + + + + + + + + RunF + + true + true + + + + + + + + + + + Left + Right + 0.033793529385008014 + + + + + + + + StrafeLeftF + + true + + + + + + + + + StrafeRightF + + true + + + + + + + + + + + + + IdleF + + true + + + + + + + + + + + + + Jump + DashBlend + 1 + true + + + + + + + + JumpF + + false + + + + + + + + + DashFBBlend + DashLRBlend + 0.014621149736541383 + + + + + + + + DashForward + DashBackward + 0.014363533804961248 + + + + + + + + DashForwardF + + 2 + false + + + + + + + + + DashBackwardF + + 2 + false + + + + + + + + + + + DashLeft + DashRight + 4.3244885367500671e-16 + + + + + + + + DashLeftF + + 2 + false + + + + + + + + + DashRightF + + 2 + false + + + + + + + + + + + + + + + + + ReloadSwitch + WeaponActionBlend + 1 + true + + + + + + + + ReloadSwitchU + + + + + + + + + + IdleBlend + ShootBlend + 0 + + + + + + + + IdlePrimary + IdleSecondary + 0 + + + + + + + + IdleAssaultRifleU + + true + + + + + + + + + IdleSecWepU + + true + + + + + + + + + + + ShootPrimary + ShootSecondary + 0 + + + + + + + + ShootFastRifleU + + + + + + + + + + ShootSecWepFastU + + + + + + + + + + + + + + + + diff --git a/src/Game/Systems/PlayerMovementSystem.cpp b/src/Game/Systems/PlayerMovementSystem.cpp index 96061079..99edef2c 100644 --- a/src/Game/Systems/PlayerMovementSystem.cpp +++ b/src/Game/Systems/PlayerMovementSystem.cpp @@ -81,23 +81,22 @@ void PlayerMovementSystem::updateMovementControllers(double dt) cameraOrientation.x += controller->Rotation().x; // Limit camera pitch so we don't break our necks cameraOrientation.x = glm::clamp(cameraOrientation.x, -glm::half_pi(), glm::half_pi()); + // Set third person model aim pitch EntityWrapper playerModel = player.FirstChildByName("PlayerModel"); - - //Third-person aim if (playerModel.Valid()) { EntityWrapper aimPrimaryEntity = playerModel.FirstChildByName("AimPrimary"); if(aimPrimaryEntity.Valid()){ if(aimPrimaryEntity.HasComponent("Animation")) { - float pitch = cameraOrientation.x + 0.2f; - double time = (pitch + glm::half_pi()) / glm::pi(); + float pitch = cameraOrientation.x; + double time = ((pitch + glm::half_pi()) / glm::pi()); (double&)aimPrimaryEntity["Animation"]["Time"] = time; } } EntityWrapper aimSecondaryEntity = playerModel.FirstChildByName("AimSecondary"); if (aimSecondaryEntity.Valid()) { if (aimSecondaryEntity.HasComponent("Animation")) { - float pitch = cameraOrientation.x + 0.2f; + float pitch = cameraOrientation.x; double time = (pitch + glm::half_pi()) / glm::pi(); (double&)aimSecondaryEntity["Animation"]["Time"] = time; } From 0b58f32f32a3814a3040e56096e0c2646f6aaa5e Mon Sep 17 00:00:00 2001 From: sippeangelo Date: Wed, 9 Mar 2016 18:01:32 +0100 Subject: [PATCH 10/18] Fixed third person animations over network --- include/Game/Systems/Weapon/WeaponBehaviour.h | 6 ++---- src/Game/Systems/Weapon/AssaultWeaponBehaviour.cpp | 10 ---------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/include/Game/Systems/Weapon/WeaponBehaviour.h b/include/Game/Systems/Weapon/WeaponBehaviour.h index 3f3b6559..cd067f36 100644 --- a/include/Game/Systems/Weapon/WeaponBehaviour.h +++ b/include/Game/Systems/Weapon/WeaponBehaviour.h @@ -293,10 +293,8 @@ private: firstPersonWeapon = SpawnerSystem::Spawn(firstPersonAttachment, firstPersonAttachment); } } - if (IsServer) { - if (thirdPersonAttachment.Valid()) { - thirdPersonWeapon = SpawnerSystem::Spawn(thirdPersonAttachment, thirdPersonAttachment); - } + if (thirdPersonAttachment.Valid()) { + thirdPersonWeapon = SpawnerSystem::Spawn(thirdPersonAttachment, thirdPersonAttachment); } WeaponInfo& wi = m_ActiveWeapons[player]; diff --git a/src/Game/Systems/Weapon/AssaultWeaponBehaviour.cpp b/src/Game/Systems/Weapon/AssaultWeaponBehaviour.cpp index dddf5fdd..6d8006aa 100644 --- a/src/Game/Systems/Weapon/AssaultWeaponBehaviour.cpp +++ b/src/Game/Systems/Weapon/AssaultWeaponBehaviour.cpp @@ -133,11 +133,6 @@ void AssaultWeaponBehaviour::OnReload(ComponentWrapper cWeapon, WeaponInfo& wi) b1.Restart = true; b1.Start = true; m_EventBroker->Publish(b1); - Events::AutoAnimationBlend b2; - b2.RootNode = wi.ThirdPersonPlayerModel; - b2.NodeName = "MovementBlend"; - b2.AnimationEntity = wi.ThirdPersonPlayerModel.FirstChildByName("AssaultWeaponBlend").FirstChildByName("Reload"); - m_EventBroker->Publish(b2); // Spawn explosion effect if (wi.FirstPersonEntity.Valid()) { @@ -254,11 +249,6 @@ void AssaultWeaponBehaviour::fireBullet(ComponentWrapper cWeapon, WeaponInfo& wi b1.Restart = true; b1.Start = true; m_EventBroker->Publish(b1); - Events::AutoAnimationBlend b2; - b2.RootNode = wi.ThirdPersonPlayerModel; - b2.NodeName = "MovementBlend"; - b2.AnimationEntity = wi.ThirdPersonPlayerModel.FirstChildByName("AssaultWeaponBlend").FirstChildByName("Fire"); - m_EventBroker->Publish(b2); // Sound Events::PlaySoundOnEntity e; From d42d886dcc22604394b11d19a72b391795119e50 Mon Sep 17 00:00:00 2001 From: viktorljung Date: Wed, 9 Mar 2016 18:27:09 +0100 Subject: [PATCH 11/18] 3rd person animations synced with 1st person animations --- include/Engine/Core/EntityWrapper.h | 2 +- .../Engine/Input/FirstPersonInputController.h | 46 ++++++++-- .../Schema/Entities/PlayerAssaultBlue.xml | 92 ++++++++++--------- src/Engine/Core/EntityWrapper.cpp | 2 +- src/Engine/Rendering/AnimationSystem.cpp | 5 +- src/Engine/Rendering/BlendTree.cpp | 2 - src/Game/Systems/PlayerMovementSystem.cpp | 34 +++---- .../Systems/Weapon/AssaultWeaponBehaviour.cpp | 11 +-- 8 files changed, 107 insertions(+), 87 deletions(-) diff --git a/include/Engine/Core/EntityWrapper.h b/include/Engine/Core/EntityWrapper.h index dfa835f7..305fc21f 100644 --- a/include/Engine/Core/EntityWrapper.h +++ b/include/Engine/Core/EntityWrapper.h @@ -23,7 +23,7 @@ struct EntityWrapper static const EntityWrapper Invalid; - const std::string Name(); + const std::string Name() const; bool HasComponent(const std::string& componentType); void AttachComponent(const char* componentName); EntityWrapper Parent(); diff --git a/include/Engine/Input/FirstPersonInputController.h b/include/Engine/Input/FirstPersonInputController.h index 75726fd3..30d1f945 100644 --- a/include/Engine/Input/FirstPersonInputController.h +++ b/include/Engine/Input/FirstPersonInputController.h @@ -153,6 +153,31 @@ bool FirstPersonInputController::OnCommand(const Events::InputComm m_EventBroker->Publish(aeb); } } + + + EntityWrapper firstPersonModel = m_PlayerEntity.FirstChildByName("Hands"); + if (firstPersonModel.Valid()) { + if (val > 0) { // Walk/Run + if (!m_Crouching) { + Events::AutoAnimationBlend aeb; + aeb.Duration = 0.1; + aeb.NodeName = "Run"; + aeb.RootNode = firstPersonModel; + aeb.Start = true; + m_EventBroker->Publish(aeb); + } + } else if (val < 0) { // Walk/run Backwards + if (!m_Crouching) { + Events::AutoAnimationBlend aeb; + aeb.Duration = 0.1; + aeb.NodeName = "Run"; + aeb.RootNode = firstPersonModel; + aeb.Start = true; + aeb.Reverse = true; + m_EventBroker->Publish(aeb); + } + } + } } } if (e.Command == "Right") { @@ -187,27 +212,36 @@ bool FirstPersonInputController::OnCommand(const Events::InputComm } //Animation - if (glm::length2(m_Movement) < 0.1f) { + if (glm::length2(m_Movement) < 0.25f) { //Blend to Idle if (m_PlayerEntity.Valid()) { EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel"); if (playerModel.Valid()) { Events::AutoAnimationBlend aeb; - aeb.Duration = 0.2; + aeb.Duration = 0.1; aeb.NodeName = "Idle"; aeb.RootNode = playerModel; + aeb.Start = true; + m_EventBroker->Publish(aeb); + } + EntityWrapper firstPersonModel = m_PlayerEntity.FirstChildByName("Hands"); + if (firstPersonModel.Valid()) { + Events::AutoAnimationBlend aeb; + aeb.Duration = 0.1; + aeb.NodeName = "Idle"; + aeb.RootNode = firstPersonModel; + aeb.Start = true; m_EventBroker->Publish(aeb); } } } else { - //Blend to movement if (m_PlayerEntity.Valid()) { EntityWrapper playerModel = m_PlayerEntity.FirstChildByName("PlayerModel"); if (playerModel.Valid()) { Events::AutoAnimationBlend aeb; - aeb.Duration = 0.2; - aeb.NodeName = "MovementBlend"; + aeb.Duration = 0.1; + aeb.NodeName = "DirectionBlend"; aeb.RootNode = playerModel; m_EventBroker->Publish(aeb); } @@ -226,7 +260,7 @@ bool FirstPersonInputController::OnCommand(const Events::InputComm glm::vec2 direction = glm::normalize(glm::vec2(m_Movement.x, m_Movement.z)); double weight = glm::abs(glm::dot(glm::vec2(1, 0), direction)); Events::SetBlendWeight sbw; - sbw.NodeName = "MovementBlend"; + sbw.NodeName = "DirectionBlend"; sbw.Weight = weight; sbw.RootNode = playerModel; m_EventBroker->Publish(sbw); diff --git a/resources/Schema/Entities/PlayerAssaultBlue.xml b/resources/Schema/Entities/PlayerAssaultBlue.xml index 780d3531..64141757 100644 --- a/resources/Schema/Entities/PlayerAssaultBlue.xml +++ b/resources/Schema/Entities/PlayerAssaultBlue.xml @@ -2,7 +2,6 @@ - @@ -22,6 +21,7 @@ + @@ -463,7 +463,7 @@ - Textures/Icons/Abilities/Superman-01.png + Textures\Icons\Abilities\Superman-01.png false @@ -504,25 +504,25 @@ - - AssaultWeapon - Schema/Entities/WeaponAssaultBlueView.xml + + AssaultWeapon + - - DefenderWeapon - Schema/Entities/WeaponDefenderBlueView.xml + + DefenderWeapon + @@ -566,19 +566,19 @@ R_Arm_Weapon_Joint + + Schema/Entities/WeaponAssaultBlueWorld.xml + + + + + AssaultWeapon - - Schema/Entities/WeaponAssaultBlueWorld.xml - - - - - @@ -587,26 +587,26 @@ R_Arm_Weapon_Joint + + Schema/Entities/SidearmWeaponWorld.xml + + + + + SidearmWeapon - - Schema/Entities/SidearmWeaponWorld.xml - - - - - - StandCrouchBlend + MovementBlend JumpDashBlend 2.5146881298480398e-63 true @@ -628,7 +628,7 @@ - MovementBlend + DirectionBlend Idle 1 @@ -659,7 +659,7 @@ CrouchStrafeLeftF - + true @@ -670,7 +670,7 @@ CrouchStrafeRightF - + true @@ -683,7 +683,7 @@ CrouchWalkF - + true @@ -696,7 +696,8 @@ CrouchF - + + true @@ -707,7 +708,7 @@ - MovementBlend + DirectionBlend Idle 1 @@ -738,7 +739,7 @@ WalkF - + true @@ -749,7 +750,8 @@ RunF - + + 2 true @@ -772,7 +774,8 @@ StrafeLeftF - + + 2 true @@ -783,7 +786,8 @@ StrafeRightF - + + 2 true @@ -798,7 +802,7 @@ IdleF - + true @@ -856,7 +860,7 @@ DashForwardF - 2 + 1.7999999523162842 false @@ -868,7 +872,7 @@ DashBackwardF - 2 + 1.7999999523162842 false @@ -887,24 +891,24 @@ - + - DashLeftF + DashRightF - 2 + 1.7999999523162842 false - + - DashRightF + DashLeftF - 2 + 1.7999999523162842 false @@ -981,7 +985,7 @@ - + Idle @@ -995,6 +999,7 @@ IdleAssaultRifleU + true true @@ -1006,6 +1011,7 @@ IdleAssaultRifleU + true true diff --git a/src/Engine/Core/EntityWrapper.cpp b/src/Engine/Core/EntityWrapper.cpp index cba90ded..a85127ad 100644 --- a/src/Engine/Core/EntityWrapper.cpp +++ b/src/Engine/Core/EntityWrapper.cpp @@ -3,7 +3,7 @@ const EntityWrapper EntityWrapper::Invalid = EntityWrapper(nullptr, EntityID_Invalid); -const std::string EntityWrapper::Name() +const std::string EntityWrapper::Name() const { return World->GetName(ID); } diff --git a/src/Engine/Rendering/AnimationSystem.cpp b/src/Engine/Rendering/AnimationSystem.cpp index be00a0f4..93a603a7 100644 --- a/src/Engine/Rendering/AnimationSystem.cpp +++ b/src/Engine/Rendering/AnimationSystem.cpp @@ -127,9 +127,12 @@ void AnimationSystem::UpdateAnimations(double dt) void AnimationSystem::UpdateWeights(double dt) { for (auto it = m_AutoBlendQueues.begin(); it != m_AutoBlendQueues.end(); ) { + LOG_INFO("%s", it->first.Name().c_str()); + it->second.PrintQueue(); + if(it->second.HasActiveBlendJob()) { AutoBlendQueue::AutoBlendJob& blendJob = it->second.GetActiveBlendJob(); - + LOG_INFO("%s", blendJob.RootNode.Name().c_str()); std::shared_ptr blendTree = it->second.GetBlendTree(); if (blendTree != nullptr) { if (blendJob.Duration != 0.0) { diff --git a/src/Engine/Rendering/BlendTree.cpp b/src/Engine/Rendering/BlendTree.cpp index 1ecafc56..ca22cd74 100644 --- a/src/Engine/Rendering/BlendTree.cpp +++ b/src/Engine/Rendering/BlendTree.cpp @@ -214,7 +214,6 @@ BlendTree::AutoBlendInfo BlendTree::AutoBlendStep(AutoBlendInfo blendInfo) } } } - return blendInfo; } @@ -333,7 +332,6 @@ BlendTree::AutoBlendInfo BlendTree::AutoBlendStep(AutoBlendInfo blendInfo) } } } - } return blendInfo; diff --git a/src/Game/Systems/PlayerMovementSystem.cpp b/src/Game/Systems/PlayerMovementSystem.cpp index 99edef2c..cfe7356c 100644 --- a/src/Game/Systems/PlayerMovementSystem.cpp +++ b/src/Game/Systems/PlayerMovementSystem.cpp @@ -85,7 +85,7 @@ void PlayerMovementSystem::updateMovementControllers(double dt) // Set third person model aim pitch EntityWrapper playerModel = player.FirstChildByName("PlayerModel"); if (playerModel.Valid()) { - EntityWrapper aimPrimaryEntity = playerModel.FirstChildByName("AimPrimary"); + EntityWrapper aimPrimaryEntity = playerModel.FirstChildByName("Aim"); if(aimPrimaryEntity.Valid()){ if(aimPrimaryEntity.HasComponent("Animation")) { float pitch = cameraOrientation.x; @@ -93,14 +93,6 @@ void PlayerMovementSystem::updateMovementControllers(double dt) (double&)aimPrimaryEntity["Animation"]["Time"] = time; } } - EntityWrapper aimSecondaryEntity = playerModel.FirstChildByName("AimSecondary"); - if (aimSecondaryEntity.Valid()) { - if (aimSecondaryEntity.HasComponent("Animation")) { - float pitch = cameraOrientation.x; - double time = (pitch + glm::half_pi()) / glm::pi(); - (double&)aimSecondaryEntity["Animation"]["Time"] = time; - } - } } } @@ -212,7 +204,7 @@ void PlayerMovementSystem::updateMovementControllers(double dt) { Events::AutoAnimationBlend aeb; aeb.Duration = 0.25; - aeb.NodeName = "StandCrouchBlend"; + aeb.NodeName = "MovementBlend"; aeb.RootNode = playerModel; aeb.Start = true; aeb.Restart = false; @@ -243,11 +235,11 @@ void PlayerMovementSystem::updateMovementControllers(double dt) { Events::AutoAnimationBlend aeb; aeb.Duration = 0.25; - aeb.NodeName = "StandCrouchBlend"; + aeb.NodeName = "MovementBlend"; aeb.RootNode = playerModel; aeb.Start = true; aeb.Restart = false; - aeb.AnimationEntity = playerModel.FirstChildByName("Jump"); + aeb.AnimationEntity = playerModel.FirstChildByName("BlendTreeLower").FirstChildByName("Jump"); m_EventBroker->Publish(aeb); } } @@ -376,12 +368,12 @@ void PlayerMovementSystem::spawnHexagon(EntityWrapper target) bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e) { EntityWrapper player(m_World, e.Player); - if (!player.Valid() || !IsClient){// || player.ID == LocalPlayer.ID) { + if (!player.Valid()){// || !IsClient || player.ID == LocalPlayer.ID) { return false; } - auto entityFile = ResourceManager::Load("Schema/Entities/DashEffect.xml"); - EntityWrapper dashEffect = entityFile->MergeInto(m_World); +// auto entityFile = ResourceManager::Load("Schema/Entities/DashEffect.xml"); + // EntityWrapper dashEffect = entityFile->MergeInto(m_World); EntityWrapper playerModel = player.FirstChildByName("PlayerModel"); for (auto& kv : m_PlayerInputControllers) { @@ -409,9 +401,8 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e) { Events::AutoAnimationBlend aeb; aeb.Duration = 0.2; - aeb.NodeName = "StandCrouchBlend"; + aeb.NodeName = "MovementBlend"; aeb.RootNode = playerModel; - aeb.Delay = 0.2; aeb.Start = true; aeb.Restart = false; aeb.AnimationEntity = playerModel.FirstChildByName("DashRight"); @@ -430,9 +421,8 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e) { Events::AutoAnimationBlend aeb; aeb.Duration = 0.2; - aeb.NodeName = "StandCrouchBlend"; + aeb.NodeName = "MovementBlend"; aeb.RootNode = playerModel; - aeb.Delay = 0.2; aeb.Start = true; aeb.Restart = false; aeb.AnimationEntity = playerModel.FirstChildByName("DashLeft"); @@ -453,9 +443,8 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e) { Events::AutoAnimationBlend aeb; aeb.Duration = 0.2; - aeb.NodeName = "StandCrouchBlend"; + aeb.NodeName = "MovementBlend"; aeb.RootNode = playerModel; - aeb.Delay = 0.2; aeb.Start = true; aeb.Restart = false; aeb.AnimationEntity = playerModel.FirstChildByName("DashForward"); @@ -474,9 +463,8 @@ bool PlayerMovementSystem::OnDashAbility(Events::DashAbility & e) { Events::AutoAnimationBlend aeb; aeb.Duration = 0.2; - aeb.NodeName = "StandCrouchBlend"; + aeb.NodeName = "MovementBlend"; aeb.RootNode = playerModel; - aeb.Delay = 0.2; aeb.Start = true; aeb.Restart = false; aeb.AnimationEntity = playerModel.FirstChildByName("DashBackward"); diff --git a/src/Game/Systems/Weapon/AssaultWeaponBehaviour.cpp b/src/Game/Systems/Weapon/AssaultWeaponBehaviour.cpp index dddf5fdd..8c92b35b 100644 --- a/src/Game/Systems/Weapon/AssaultWeaponBehaviour.cpp +++ b/src/Game/Systems/Weapon/AssaultWeaponBehaviour.cpp @@ -133,11 +133,6 @@ void AssaultWeaponBehaviour::OnReload(ComponentWrapper cWeapon, WeaponInfo& wi) b1.Restart = true; b1.Start = true; m_EventBroker->Publish(b1); - Events::AutoAnimationBlend b2; - b2.RootNode = wi.ThirdPersonPlayerModel; - b2.NodeName = "MovementBlend"; - b2.AnimationEntity = wi.ThirdPersonPlayerModel.FirstChildByName("AssaultWeaponBlend").FirstChildByName("Reload"); - m_EventBroker->Publish(b2); // Spawn explosion effect if (wi.FirstPersonEntity.Valid()) { @@ -247,6 +242,7 @@ void AssaultWeaponBehaviour::fireBullet(ComponentWrapper cWeapon, WeaponInfo& wi // Play animation playAnimationAndReturn(wi.FirstPersonEntity, "ActionBlend", "Fire"); + // Third person anim Events::AutoAnimationBlend b1; b1.RootNode = wi.ThirdPersonPlayerModel; @@ -254,11 +250,6 @@ void AssaultWeaponBehaviour::fireBullet(ComponentWrapper cWeapon, WeaponInfo& wi b1.Restart = true; b1.Start = true; m_EventBroker->Publish(b1); - Events::AutoAnimationBlend b2; - b2.RootNode = wi.ThirdPersonPlayerModel; - b2.NodeName = "MovementBlend"; - b2.AnimationEntity = wi.ThirdPersonPlayerModel.FirstChildByName("AssaultWeaponBlend").FirstChildByName("Fire"); - m_EventBroker->Publish(b2); // Sound Events::PlaySoundOnEntity e; From 1bfd0cce5eed54cddd4861232c5ed52f1b4a918c Mon Sep 17 00:00:00 2001 From: viktorljung Date: Wed, 9 Mar 2016 18:36:53 +0100 Subject: [PATCH 12/18] Idel --- resources/Schema/Entities/WeaponAssaultBlueView.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/Schema/Entities/WeaponAssaultBlueView.xml b/resources/Schema/Entities/WeaponAssaultBlueView.xml index 05b65bbb..49015151 100644 --- a/resources/Schema/Entities/WeaponAssaultBlueView.xml +++ b/resources/Schema/Entities/WeaponAssaultBlueView.xml @@ -72,7 +72,7 @@ - IdleF + IdelF true true @@ -91,8 +91,8 @@ Models/Weapons/Blue/AssaultWeaponBlue.mesh - - + + @@ -127,9 +127,9 @@ true - - - + + + From b8839551a47696ec3e03b53b37fb12c32e4fa4c3 Mon Sep 17 00:00:00 2001 From: antc13 Date: Wed, 9 Mar 2016 18:46:26 +0100 Subject: [PATCH 13/18] Created the map CP_Rocky2 but beware, it's still WIP. --- assets | 2 +- resources/Schema/Entities/CP_Rocky2 | 11874 ++++++++++++++++ .../Schema/Entities/FloatingBridgePillar.xml | 56 + .../Entities/ShinyStoneCrystalBlueLights.xml | 39 + 4 files changed, 11970 insertions(+), 1 deletion(-) create mode 100644 resources/Schema/Entities/CP_Rocky2 create mode 100644 resources/Schema/Entities/FloatingBridgePillar.xml create mode 100644 resources/Schema/Entities/ShinyStoneCrystalBlueLights.xml diff --git a/assets b/assets index 52ea74c5..de82323d 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 52ea74c5d5996ebcd7b064e0a8be469c9f07926e +Subproject commit de82323d5af14b77fe4142a26c6eab5f12c9363d diff --git a/resources/Schema/Entities/CP_Rocky2 b/resources/Schema/Entities/CP_Rocky2 new file mode 100644 index 00000000..a03fa110 --- /dev/null +++ b/resources/Schema/Entities/CP_Rocky2 @@ -0,0 +1,11874 @@ + + + + + + + + + + + + + + + + + + 2 + Models/Props/GroundTest.mesh + + + + + + + + 2 + Models/Props/Walls/SciFiWallTop.mesh + + + + + + + + + 2 + Models/Props/Walls/SciFiWallSmall2.mesh + + + + + + + + + + 2 + Models/Props/Walls/SciFiWallBig.mesh + + + + + + + + + + + + 2 + Models/Props/Walls/SciFiWallBig.mesh + + + + + + + + + + 2 + Models/Props/Walls/SciFiWallMedium.mesh + + + + + + + + + + 2 + Models/Props/Walls/SciFiWallSmall1.mesh + + + + + + + + + + 2 + Models/Props/Walls/SciFiWallMedium.mesh + + + + + + + + + + + + 2 + Models/Props/Walls/SciFiWallSmall3.mesh + + + + + + + + + + 2 + Models/Props/Walls/SciFiWallSmall4.mesh + + + + + + + + + + + + Models/Highgrounds/Highground1.mesh + + + + + + + + + + Models/Highgrounds/Highground2.mesh + + + + + + + + + + Models/Highgrounds/Highground3.mesh + + + + + + + + + + + Models/Highgrounds/Highground24.mesh + + + + + + + + + + + Models/Highgrounds/Hg13.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg25.mesh + + + + + + + + + + + + Models/Highgrounds/Hg26.mesh + + + + + + + + + + + + Models/Highgrounds/Hg9.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg4.mesh + + + + + + + + + + + + + + Models/Highgrounds/Hg10.mesh + + + + + + + + + + + + + + Models/Highgrounds/Hg19.mesh + + + + + + + + + + + + + + Models/Highgrounds/Hg19.mesh + + + + + + + + + + + + + + + Models/Highgrounds/Highground12.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg16.mesh + + + + + + + + + + + + Models/Highgrounds/Hg15.mesh + + + + + + + + + + + + Models/Highgrounds/Hg14.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg13.mesh + + + + + + + + + + + + Models/Highgrounds/Hg11.mesh + + + + + + + + + + + + Models/Highgrounds/Hg20.mesh + + + + + + + + + + + + Models/Highgrounds/Hg18.mesh + + + + + + + + + + + + Models/Highgrounds/Hg19.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg17.mesh + + + + + + + + + + + + + + + Models/Highgrounds/Hg8.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg7.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg3.mesh + + + + + + + + + + + + + + + Models/Highgrounds/Highground3.mesh + + + + + + + + + + + + Models/Highgrounds/Highground1.mesh + + + + + + + + + + + + Models/Highgrounds/Highground2.mesh + + + + + + + + + + + + + + Models/Highgrounds/Hg1.mesh + + + + + + + + + + + Models/Highgrounds/Hg2.mesh + + + + + + + + + + + + + + Models/Highgrounds/Highground5.mesh + + + + + + + + + + + + Models/Highgrounds/Hg8.mesh + + + + + + + + + + + + Models/Highgrounds/Hg10.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg4.mesh + + + + + + + + + + + + Models/Highgrounds/Hg7.mesh + + + + + + + + + + + + Models/Highgrounds/Hg17.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg19.mesh + + + + + + + + + + + + Models/Highgrounds/Hg18.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg20.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg6.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg16.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg9.mesh + + + + + + + + + + + + Models/Highgrounds/Hg3.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg19.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + Models/Highgrounds/Hg10.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + + + Models/Highgrounds/Highground22.mesh + + + + + + + + + + + + Models/Highgrounds/Hg8.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg19.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg21.mesh + + + + + + + + + + + + Models/Highgrounds/Hg11.mesh + + + + + + + + + + + + Models/Highgrounds/Hg3.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg17.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg8.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + + + Models/Highgrounds/Hg28.mesh + + + + + + + + + + + Models/Highgrounds/Hg10.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg27.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg15.mesh + + + + + + + + + + + + + + Models/Highgrounds/Hg13.mesh + + + + + + + + + + + + + + + Models/Highgrounds/Hg27.mesh + + + + + + + + + + + + Models/Highgrounds/Hg23.mesh + + + + + + + + + + + + + + + Models/Highgrounds/Hg27.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg23.mesh + + + + + + + + + + + + + + + Models/Highgrounds/Hg28.mesh + + + + + + + + + + + + Models/Highgrounds/Hg10.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg27.mesh + + + + + + + + + + + + + Models/Highgrounds/Hg15.mesh + + + + + + + + + + + + + + Models/Highgrounds/Hg13.mesh + + + + + + + + + + + + + + + Models/Highgrounds/Hg1.mesh + + + + + + + + + + + + Models/Highgrounds/Hg2.mesh + + + + + + + + + + + + + + + + + + + + + + + + + + + + Models/Props/Bridges/Bridge1_SciFi_Blue.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Bridges/Bridge1_SciFi_Blue.mesh + + + + + + + + + + + + Models/Props/Bridges/Bridge1_SciFi_Blue.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFi_Bridge_Support_Top_Blue.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFi_Bridge_Support_Bot_Blue.mesh + + + + + + + + + + + 12 + + + + + + + + + + + + + Models/Props/Bridges/SciFi_Bridge_Support_Middle_Blue.mesh + + + + + + + + + + + + + + + + + + Models/Props/Bridges/SciFi_Bridge_Support_Top_Blue.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFi_Bridge_Support_Bot_Blue.mesh + + + + + + + + + + + 12 + + + + + + + + + + + + + Models/Props/Bridges/SciFi_Bridge_Support_Middle_Blue.mesh + + + + + + + + + + + + + + + + + + Models/Props/Bridges/Bridge1_SciFi_Blue.mesh + + + + + + + + + + + + + + Models/Props/Bridges/SciFi_Bridge_Support_Top_Blue.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFi_Bridge_Support_Bot_Blue.mesh + + + + + + + + + + + 12 + + + + + + + + + + + + + Models/Props/Bridges/SciFi_Bridge_Support_Middle_Blue.mesh + + + + + + + + + + + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/Flora/Root.mesh + + + + + + + + + + + + + + Models/Props/Flora/Root.mesh + + + + + + + + + + + + + Models/Props/Flora/Root.mesh + + + + + + + + + + + + + + Models/Props/Flora/Root.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar1Blue.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + + Models/Core/UnitPlane.mesh + + true + + + + + + + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + + + + + + + + 15 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + 15 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + 15 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + 2 + + + + + + + + + + + + 2 + 1 + + + + + + + + + + + + 3 + + + + + + + + + + + + + + 15 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + 15 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + 15 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + 15 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 15 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 15 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + 15 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + 15 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 15 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar1Red.mesh + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar3Red.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar3Red.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar1Red.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + + + + + + + 10 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + 15 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar1Blue.mesh + + + + + + + + + + + + + + 15 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + 15 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + 15 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + 15 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + + + + + Models/Props/Flora/HangingBush2.mesh + true + + + + + + + + + + + + + Models/Props/Flora/HangingBush4.mesh + true + false + + + + + + + + + + + + + Models/Props/Flora/HangingBush4.mesh + true + + + + + + + + + + + + Models/Props/Flora/HangingBush4.mesh + true + + + + + + + + + + + + + + + 15 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + 15 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + 1.5 + 1 + 0.30000001192092896 + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + + Models/Props/Walls/SpecialWall1.mesh + + + + + + + + + + + + + + + Models/Core/UnitPlane.mesh + + true + + + + + + + + + + + + + + + + + + + Models/Props/Bridges/SciFi_Bridge_Support_Top_Red.mesh + + + + + + + + + + + + 12 + + + + + + + + + + + + + Models/Props/Bridges/SciFi_Bridge_Support_Middle_Red.mesh + + + + + + + + + + + + + + Models/Props/Bridges/SciFi_Bridge_Support_Bot_Red.mesh + + + + + + + + + + + + + + Models/Props/Bridges/Bridge1_SciFi_Red.mesh + + + + + + + + + + + + + + Models/Props/Bridges/Bridge1_SciFi_Red.mesh + + + + + + + + + + + + Models/Props/Bridges/Bridge1_SciFi_Red.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFi_Bridge_Support_Top_Red.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFi_Bridge_Support_Bot_Red.mesh + + + + + + + + + + + 12 + + + + + + + + + + + + + Models/Props/Bridges/SciFi_Bridge_Support_Middle_Red.mesh + + + + + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFi_Bridge_Support_Top_Red.mesh + + + + + + + + + + + 12 + + + + + + + + + + + + + Models/Props/Bridges/SciFi_Bridge_Support_Middle_Red.mesh + + + + + + + + + + + + + + Models/Props/Bridges/SciFi_Bridge_Support_Bot_Red.mesh + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + + + Models/Props/Bridges/Bridge1_SciFi_Red.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Flora/Root.mesh + + + + + + + + + + + + + + Models/Props/Flora/Root.mesh + + + + + + + + + + + + + + Models/Props/Flora/Root.mesh + + + + + + + + + + + + + + Models/Props/Flora/Root.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + + + + + + 7 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + 7 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 7 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 7 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 7 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 7 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 7 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + 7 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 7 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 7 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 7 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 7 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 7 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar1Red.mesh + + + + + + + + + + + + + + + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar3Blue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar1Blue.mesh + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar3Blue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/smallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 15 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + + + + + + + + + + + + Schema/Entities/PlayerRed.xml + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + Schema/Entities/ScoreBoard_Blue.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Kills + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + KD + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + ID + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Name + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Deaths + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + Schema/Entities/ScoreBoard_Red.xml + + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + + + + + + + + + + + + + + + KD + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Name + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + ID + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Kills + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Deaths + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + Schema/Entities/ScoreBoard_Blue.xml + + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + + + + + + + + + + + + + + + ID + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Name + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Kills + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + KD + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Deaths + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + Schema/Entities/ScoreBoard_Red.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Kills + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + KD + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + ID + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Deaths + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Name + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.049999997019767761 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Pick Class + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + Textures/Icons/Classes/Assault-01.png + + false + + + PickClass + 1 + + + + + + + + + + + Assault + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + Textures/Icons/Classes/Sniper-01.png + + false + + + PickClass + 3 + + + + + + + + + + + Sniper + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + false + + + + SwapToTeamPick + 1 + + + + + + + + + + + Team + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + Change + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Textures/Icons/Classes/Defender-01.png + + false + + + PickClass + 2 + + + + + + + + + + + Defender + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + false + + + + PickTeam + 1 + + + + + + + + + + + Spectator + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + false + + + + PickTeam + 2 + + + + + + + + + + + Red + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + Pick Team + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + false + + + + PickTeam + 3 + + + + + + + + + + + Blue + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + false + + false + + + SwapToClassPick + 1 + + + + + + + + + + + Change + Fonts/DroidSans.ttf,64 + false + + + + + + + + + + + + Class + Fonts/DroidSans.ttf,64 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 7 + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + false + + + + SwapToTeamPick + 1 + + + + + + + + + + + Team + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + Change + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + false + + + + + + + + + + + + + + 2 + + + Textures/Core/UnitHexagon_Rotated.png + + false + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + false + + + + + + + + + + + + + + 1 + + + Textures/Core/UnitHexagon_Rotated.png + + false + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + false + + + + + + + + + + + 1 + + + + 4 + + + Textures/Core/UnitHexagon_Rotated.png + + false + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + false + + + + + + + + + + + 1 + + + + + Textures/Core/UnitHexagon_Rotated.png + + false + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + false + + + + + + + + + + + + + + 3 + + + Textures/Core/UnitHexagon_Rotated.png + + false + + + + + + + + + + + + + + + + + + Textures/Core/UnitHexagon.png + + false + + + + SwapToClassPick + 1 + + + + + + + + + + + Class + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + Change + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + + + + + 3 + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointRed.mesh + + + + + + + + + + 15 + + + + + + + + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + + + + + 2 + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointNeutral.mesh + + + + + + + + + + 1 + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + + Models/Props/CapturePoint/CapturePointBlue.mesh + + + + + + + + + + -15 + + + + 4 + + + + + + + + + Models/Core/UnitCylinder.mesh + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + + + + + + + 4 + + + + + + + + + + + 4 + + + + + + + + + + + 4 + + + + + + + + + + + 4 + 2 + + + + + + + + + + + 4 + + + + + + + + + + + 4 + + + + + + + + + + + 4 + + + + + + + + + + + 5 + + + + + + + + + + + 4 + + + + + + + + + + + 4 + + + + + + + + + + + 4 + 1 + + + + + + + + + + + 4 + + + + + + + + + + + 4 + + + + + + + + + + + 4 + + + + + + + + + + + 4 + + + + + + + + + + + + + + 0.80000001192092896 + 1.2000000476837158 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + 15 + 1 + + + + + + + + + + + + + + + + + 10 + 1 + + + + + + + + + + + + 10 + 1 + + + + + + + + + + + + 10 + 1 + + + + + + + + + + + + + + + 10 + + + + + + + + + + + 0.60000002384185791 + false + + + + + + + + + + + + 10 + + + + + + + + + + + + 10 + + + + + + + + + + + 10 + + + + + + + + + + + 10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 0.5 + + + + + + + + + + + + 5 + 1 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 0.5 + + + + + + + + + + + + 5 + 1 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 0.5 + + + + + + + + + + + + 5 + 1 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 0.5 + + + + + + + + + + + + 5 + 1 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 0.5 + + + + + + + + + + + + 5 + 1 + 0.5 + + + + + + + + + + + + + + + + 15 + 1 + + + + + + + + + + + + + + + + + 10 + 1 + + + + + + + + + + + + 10 + 1 + + + + + + + + + + + + 10 + 1 + + + + + + + + + + + + + + + + + + + + + + + Schema/Entities/Player.xml + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + diff --git a/resources/Schema/Entities/FloatingBridgePillar.xml b/resources/Schema/Entities/FloatingBridgePillar.xml new file mode 100644 index 00000000..0426cc1d --- /dev/null +++ b/resources/Schema/Entities/FloatingBridgePillar.xml @@ -0,0 +1,56 @@ + + + + + + + Models/Props/Bridges/SciFi_Bridge_Support_Top_Red.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFi_Bridge_Support_Bot_Red.mesh + + + + + + + + + + + 12 + + + + + + + + + + + + + Models/Props/Bridges/SciFi_Bridge_Support_Middle_Red.mesh + + + + + + + + + + + + diff --git a/resources/Schema/Entities/ShinyStoneCrystalBlueLights.xml b/resources/Schema/Entities/ShinyStoneCrystalBlueLights.xml new file mode 100644 index 00000000..e583756a --- /dev/null +++ b/resources/Schema/Entities/ShinyStoneCrystalBlueLights.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + From 07d85bacf6e76fa9b4b59745dbd9c56488e76362 Mon Sep 17 00:00:00 2001 From: antc13 Date: Wed, 9 Mar 2016 18:57:45 +0100 Subject: [PATCH 14/18] Added file extension to CP_Rocky2 & moved spawn points on the Y axis. --- .../Entities/{CP_Rocky2 => CP_Rocky2.xml} | 6614 ++++++++--------- 1 file changed, 3307 insertions(+), 3307 deletions(-) rename resources/Schema/Entities/{CP_Rocky2 => CP_Rocky2.xml} (99%) diff --git a/resources/Schema/Entities/CP_Rocky2 b/resources/Schema/Entities/CP_Rocky2.xml similarity index 99% rename from resources/Schema/Entities/CP_Rocky2 rename to resources/Schema/Entities/CP_Rocky2.xml index a03fa110..93b7fd77 100644 --- a/resources/Schema/Entities/CP_Rocky2 +++ b/resources/Schema/Entities/CP_Rocky2.xml @@ -30,6 +30,17 @@ + + + + + 2 + Models/Props/Walls/SciFiWallSmall1.mesh + + + + + @@ -76,17 +87,6 @@ - - - - - 2 - Models/Props/Walls/SciFiWallSmall1.mesh - - - - - @@ -684,6 +684,19 @@ + + + + + Models/Highgrounds/Hg6.mesh + + + + + + + + @@ -784,19 +797,6 @@ - - - - - Models/Highgrounds/Hg6.mesh - - - - - - - - @@ -1607,11 +1607,11 @@ 12 - + - + @@ -1661,11 +1661,11 @@ 12 - + - + @@ -1730,11 +1730,11 @@ 12 - + - + @@ -2779,6 +2779,166 @@ + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + @@ -2970,6 +3130,20 @@ + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + @@ -3304,19 +3478,6 @@ - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - @@ -3331,18 +3492,6 @@ - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - @@ -3356,20 +3505,6 @@ - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - @@ -3383,20 +3518,6 @@ - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - @@ -3410,20 +3531,6 @@ - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - @@ -3438,20 +3545,6 @@ - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - @@ -3465,19 +3558,6 @@ - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - @@ -3491,19 +3571,6 @@ - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - @@ -3518,19 +3585,6 @@ - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - @@ -3544,20 +3598,6 @@ - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - @@ -3571,19 +3611,6 @@ - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - @@ -3598,19 +3625,6 @@ - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - @@ -3625,20 +3639,6 @@ - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - @@ -3646,6 +3646,19 @@ + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + @@ -3672,19 +3685,6 @@ - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - @@ -3717,8 +3717,8 @@ Models/Props/PickUps/PickUpHolder.mesh - - + + @@ -3727,59 +3727,11 @@ 2 - + - - - - - - - - - - 8 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - 2 - - - - - + @@ -3797,7 +3749,7 @@ - + @@ -3823,11 +3775,11 @@ 2 - + - + @@ -3845,7 +3797,7 @@ - + @@ -3861,8 +3813,8 @@ Models/Props/PickUps/PickUpHolder.mesh - - + + @@ -3871,11 +3823,11 @@ 2 - + - + @@ -3891,105 +3843,9 @@ Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - 2 - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - 2 - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - + @@ -4015,11 +3871,11 @@ 2 - + - + @@ -4037,7 +3893,151 @@ - + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + @@ -4059,6 +4059,64 @@ + + + + + 6 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Blue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar3Red.mesh + + + + + + + + + @@ -4073,6 +4131,49 @@ + + + + + 6 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar2Red.mesh + + + + + + + + + @@ -4088,21 +4189,6 @@ - - - - - 6 - Models/Props/Pillars/SciFiPillar2Red.mesh - - - - - - - - - @@ -4117,20 +4203,6 @@ - - - - - 6 - Models/Props/Pillars/SciFiPillar2Red.mesh - - - - - - - - @@ -4146,21 +4218,6 @@ - - - - - 4 - Models/Props/Pillars/SciFiPillar3Red.mesh - - - - - - - - - @@ -4175,20 +4232,6 @@ - - - - - Models/Props/Pillars/SciFiPillar2Blue.mesh - - - - - - - - - @@ -4204,21 +4247,6 @@ - - - - - 4 - Models/Props/Pillars/SciFiPillar2Red.mesh - - - - - - - - - @@ -4234,20 +4262,6 @@ - - - - - Models/Props/Pillars/SciFiPillar2Red.mesh - - - - - - - - - @@ -4263,20 +4277,6 @@ - - - - - 6 - Models/Props/Pillars/SciFiPillar2Red.mesh - - - - - - - - @@ -4284,6 +4284,21 @@ + + + + + 15 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + @@ -4303,12 +4318,26 @@ - Models/Props/Stones/AssaultHolder.mesh + 15 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + @@ -4327,6 +4356,60 @@ + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + 15 + Models/Props/Stones/ShinyStoneCrystalBlue.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + @@ -4341,21 +4424,6 @@ - - - - - 15 - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - @@ -4370,21 +4438,6 @@ - - - - - 15 - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - - @@ -4398,19 +4451,6 @@ - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - @@ -4426,24 +4466,24 @@ - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - + + + + Models/Props/Flora/HangingBush4.mesh + true + + + + + + + + @@ -4473,19 +4513,6 @@ - - - - Models/Props/Flora/HangingBush4.mesh - true - - - - - - - - @@ -4501,20 +4528,6 @@ - - - - - 15 - Models/Props/Stones/ShinyStoneCrystalBlue.mesh - - - - - - - - @@ -4582,19 +4595,6 @@ - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - @@ -4628,59 +4628,190 @@ - + + + + Models/Core/UnitPlane.mesh + + true + + + + + + + + + + + - Models/Props/PickUps/PickUpHolder.mesh + Models/Props/Flora/Root.mesh - - - + + + + + + + + + + + + Models/Props/Flora/Root.mesh + + + + + + + + + + + + + + Models/Props/Flora/Root.mesh + + + + + + + + + + + + + + Models/Props/Flora/Root.mesh + + + + + + + + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + - - 2 - - - + + + Models/Props/Stones/AssaultHolder.mesh + - + + - - - - - - - 8 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - - - - - - - + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + + + @@ -4697,11 +4828,11 @@ 2 - + - + @@ -4719,55 +4850,7 @@ - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - 2 - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - + @@ -4793,11 +4876,11 @@ 2 - + - + @@ -4821,151 +4904,7 @@ - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - 2 - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - 2 - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/AmmoPickUp.mesh - - - - - - - - - - - - - - - - - - Models/Props/PickUps/PickUpHolder.mesh - - - - - - - - - - - - 2 - - - - - - - - - - - - - - 8 - - - - Models/Props/PickUps/HealthPickUp.mesh - - - - - + @@ -4991,11 +4930,11 @@ 2 - + - + @@ -5013,7 +4952,247 @@ - + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/AmmoPickUp.mesh + + + + + + + + + + + + + + + + + + Models/Props/PickUps/PickUpHolder.mesh + + + + + + + + + + + + 2 + + + + + + + + + + + + + + 8 + + + + Models/Props/PickUps/HealthPickUp.mesh + + + + + @@ -5039,11 +5218,11 @@ 2 - + - + @@ -5061,7 +5240,7 @@ - + @@ -5085,8 +5264,8 @@ Models/Props/Walls/SpecialWall1.mesh - - + + @@ -5099,8 +5278,8 @@ Models/Props/Walls/SpecialWall1.mesh - - + + @@ -5136,21 +5315,6 @@ - - - - Models/Core/UnitPlane.mesh - - true - - - - - - - - - @@ -5173,11 +5337,11 @@ 12 - + - + @@ -5235,6 +5399,32 @@ + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + + + + + + Models/Props/Bridges/SciFiBridgeDefense.mesh + + + + + + + + @@ -5275,11 +5465,11 @@ 12 - + - + @@ -5308,8 +5498,8 @@ Models/Props/Bridges/SciFiBridgeDefense.mesh - - + + @@ -5321,8 +5511,8 @@ Models/Props/Bridges/SciFiBridgeDefense.mesh - - + + @@ -5340,19 +5530,6 @@ - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - @@ -5365,15 +5542,27 @@ + + + + + Models/Props/Bridges/SciFi_Bridge_Support_Bot_Red.mesh + + + + + + + 12 - + - + @@ -5391,18 +5580,6 @@ - - - - - Models/Props/Bridges/SciFi_Bridge_Support_Bot_Red.mesh - - - - - - - @@ -5418,19 +5595,6 @@ - - - - - Models/Props/Bridges/SciFiBridgeDefense.mesh - - - - - - - - @@ -5565,13 +5729,26 @@ Models/Props/Walls/SmallWall3.mesh - - + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + @@ -5586,6 +5763,166 @@ + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + @@ -5654,19 +5991,6 @@ - - - - - Models/Props/Walls/BigWallRed.mesh - - - - - - - - @@ -5680,20 +6004,6 @@ - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - @@ -5708,19 +6018,6 @@ - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - @@ -5734,20 +6031,6 @@ - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - @@ -5761,19 +6044,6 @@ - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - @@ -5788,19 +6058,6 @@ - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - @@ -5814,19 +6071,6 @@ - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - @@ -5840,19 +6084,6 @@ - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - @@ -5867,45 +6098,6 @@ - - - - - Models/Props/Walls/BigWallRed.mesh - - - - - - - - - - - Models/Props/Walls/BigWallRed.mesh - - - - - - - - - - - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - @@ -5920,20 +6112,6 @@ - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - @@ -5947,20 +6125,6 @@ - - - - - Models/Props/Walls/BigWallRed.mesh - - - - - - - - - @@ -5976,170 +6140,6 @@ - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - - - - - - - - Models/Props/Flora/Root.mesh - - - - - - - - - - - - - - Models/Props/Flora/Root.mesh - - - - - - - - - - - - - - Models/Props/Flora/Root.mesh - - - - - - - - - - - - - - Models/Props/Flora/Root.mesh - - - - - - - - - - - @@ -6158,19 +6158,6 @@ - - - - - Models/Props/SciFiHolder1.mesh - - - - - - - - @@ -6191,8 +6178,8 @@ Models/Props/SciFiHolder1.mesh - - + + @@ -6204,8 +6191,21 @@ Models/Props/SciFiHolder1.mesh - - + + + + + + + + + + + Models/Props/SciFiHolder1.mesh + + + + @@ -6236,86 +6236,6 @@ - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/mediumStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - @@ -6323,50 +6243,8 @@ Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - + + @@ -6384,45 +6262,6 @@ - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - @@ -6454,11 +6293,25 @@ - Models/Props/Stones/SmallStone1.mesh + Models/Props/Stones/MediumStone2.mesh - - + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + @@ -6470,8 +6323,49 @@ Models/Props/Stones/mediumStone2.mesh - - + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + @@ -6497,35 +6391,8 @@ Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - Models/Props/Stones/mediumStone2.mesh - - - - - - - - - - - - - Models/Props/Stones/MediumStone2.mesh - - - - + + @@ -6543,126 +6410,6 @@ - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - Models/Props/Stones/BigStone.mesh - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - @@ -6683,35 +6430,8 @@ Models/Props/Stones/SmallStone2.mesh - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - + + @@ -6721,12 +6441,11 @@ - Models/Props/Stones/SmallStone1.mesh + Models/Props/Stones/mediumStone2.mesh - - - + + @@ -6735,38 +6454,11 @@ - Models/Props/Stones/SmallStone2.mesh + Models/Props/Stones/BigStone.mesh - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - - - - - - Models/Props/Stones/SmallStone1.mesh - - - - + + @@ -6792,9 +6484,117 @@ Models/Props/Stones/SmallStone1.mesh - - - + + + + + + + + + + + + Models/Props/Stones/BigStone.mesh + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + @@ -6813,6 +6613,315 @@ + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/mediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + @@ -6854,20 +6963,6 @@ - - - - - Models/Props/Stones/mediumStone2.mesh - - - - - - - - - @@ -6909,19 +7004,6 @@ - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - @@ -6962,20 +7044,6 @@ - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - - @@ -7017,20 +7085,6 @@ - - - - - Models/Props/Stones/mediumStone2.mesh - - - - - - - - - @@ -7072,20 +7126,6 @@ - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - - @@ -7128,20 +7168,6 @@ - - - - - Models/Props/Stones/mediumStone2.mesh - - - - - - - - - @@ -7181,19 +7207,6 @@ - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - @@ -7234,19 +7247,6 @@ - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - @@ -7254,6 +7254,19 @@ + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + @@ -7280,19 +7293,6 @@ - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - @@ -7300,6 +7300,66 @@ + + + + + 7 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 6 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 7 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + + + + + + 7 + Models/Props/Stones/ShinyStoneCrystalRed.mesh + + + + + + + + + @@ -7329,21 +7389,6 @@ - - - - - 6 - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - @@ -7389,21 +7434,6 @@ - - - - - 7 - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - @@ -7448,21 +7478,6 @@ - - - - - 7 - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - @@ -7508,21 +7523,6 @@ - - - - - 7 - Models/Props/Stones/ShinyStoneCrystalRed.mesh - - - - - - - - - @@ -7530,6 +7530,20 @@ + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + @@ -7556,20 +7570,6 @@ - - - - - Models/Props/Pillars/StonePillar.mesh - - - - - - - - - @@ -7626,6 +7626,50 @@ + + + + + 4 + Models/Props/Pillars/SciFiPillar3Blue.mesh + + + + + + + + + + + + + + 6 + Models/Props/Pillars/SciFiPillar1Blue.mesh + + + + + + + + + + + + + 4 + Models/Props/Pillars/SciFiPillar3Blue.mesh + + + + + + + + + @@ -7671,21 +7715,6 @@ - - - - - 4 - Models/Props/Pillars/SciFiPillar3Blue.mesh - - - - - - - - - @@ -7728,20 +7757,6 @@ - - - - - 6 - Models/Props/Pillars/SciFiPillar1Blue.mesh - - - - - - - - @@ -7784,21 +7799,6 @@ - - - - - 4 - Models/Props/Pillars/SciFiPillar3Blue.mesh - - - - - - - - - @@ -7836,167 +7836,77 @@ - - - - - - - - - - Models/Props/Walls/BigWallRed.mesh - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - - Models/Props/Walls/MediumWall3.mesh - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - - Models/Props/Walls/BigWallBlue.mesh - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - - Models/Props/Walls/BigWallBlue.mesh - - - - - - - - - - - - - Models/Props/Walls/BigWallRed.mesh - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - - - - Models/Props/Walls/smallWall3.mesh - - - - - - - - - - - - - - Models/Props/Walls/SmallWall3.mesh - - - - - - - - - - - + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + + + + + Models/Props/Stones/AssaultHolder.mesh + + + + + + + + + @@ -8024,33 +7934,6 @@ - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - - @@ -8090,19 +7973,6 @@ - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - @@ -8143,19 +8013,6 @@ - - - - - Models/Props/Stones/AssaultHolder.mesh - - - - - - - - @@ -8204,8 +8061,29 @@ Models/Props/Stones/AssaultHolder.mesh - - + + + + + + + + + + + + + + + + + + + Models/Props/Walls/MediumWall3.mesh + + + + @@ -8214,16 +8092,138 @@ - Models/Props/Stones/AssaultHolder.mesh + Models/Props/Walls/BigWallBlue.mesh - - + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + Models/Props/Walls/BigWallRed.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/BigWallBlue.mesh + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/SmallWall3.mesh + + + + + + + + + + + + + + Models/Props/Walls/smallWall3.mesh + + + + + + + + + @@ -8247,11 +8247,11 @@ 2 - + - + @@ -8269,7 +8269,7 @@ - + @@ -8295,11 +8295,11 @@ 2 - + - + @@ -8317,7 +8317,7 @@ - + @@ -8334,6 +8334,85 @@ + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Pillars/StonePillar.mesh + + + + + + + + + + + + + Models/Props/Stones/MediumStone2.mesh + + + + + + + + + + + + + Models/Props/Stones/SmallStone2.mesh + + + + + + + + + + + + + + Models/Props/Stones/SmallStone1.mesh + + + + + + + + @@ -8360,19 +8439,6 @@ - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - @@ -8414,20 +8480,6 @@ - - - - - Models/Props/Stones/SmallStone2.mesh - - - - - - - - - @@ -8468,19 +8520,6 @@ - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - @@ -8508,19 +8547,6 @@ - - - - - Models/Props/Stones/SmallStone1.mesh - - - - - - - - @@ -8562,19 +8588,6 @@ - - - - - Models/Props/Stones/MediumStone2.mesh - - - - - - - - @@ -8615,19 +8628,6 @@ - - - - - Models/Props/Pillars/StonePillar.mesh - - - - - - - - @@ -8699,689 +8699,6 @@ - - - - - - - - - - Schema/Entities/PlayerRed.xml - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - - - - - - - - - - - - - - - Models/Core/UnitCube.mesh - - - - - - - - - - - Schema/Entities/ScoreBoard_Blue.xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Kills - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - KD - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - ID - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - Name - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - Deaths - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - - - Models/Core/UnitCube.mesh - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Models/Core/UnitCube.mesh - - - - - - - - - - - - Schema/Entities/ScoreBoard_Red.xml - - - - - - - - - - - - - - - Models/Core/UnitCube.mesh - - - - - - - - - - - - - - - - - - - - - - - - - - - - KD - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - Name - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - ID - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - Kills - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - Deaths - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Models/Core/UnitCube.mesh - - - - - - - - - - - Schema/Entities/ScoreBoard_Blue.xml - - - - - - - - - - - - - - - Models/Core/UnitCube.mesh - - - - - - - - - - - - - - - - - - - - - - - - - - - - ID - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - Name - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - Kills - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - KD - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - Deaths - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - - - - - - - Schema/Entities/ScoreBoard_Red.xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Kills - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - KD - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - ID - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - Deaths - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - Name - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - - - - - - Models/Core/UnitCube.mesh - - - - - - - - - - - - - - - - - Models/Core/UnitCube.mesh - - - - - - - - - - - - - - - - - - - - - - - - @@ -9390,7 +8707,7 @@ - + @@ -9429,6 +8746,40 @@ + + + + + Textures/Icons/Classes/Defender-01.png + + false + + + PickClass + 2 + + + + + + + + + + + Defender + Fonts/DroidSans.ttf,64 + + + + + + + + + + + @@ -9544,40 +8895,6 @@ - - - - - Textures/Icons/Classes/Defender-01.png - - false - - - PickClass - 2 - - - - - - - - - - - Defender - Fonts/DroidSans.ttf,64 - - - - - - - - - - - @@ -9629,6 +8946,20 @@ + + + + Pick Team + Fonts/DroidSans.ttf,64 + + + + + + + + + @@ -9663,20 +8994,6 @@ - - - - Pick Team - Fonts/DroidSans.ttf,64 - - - - - - - - - @@ -9792,53 +9109,6 @@ - - - - - Textures/Core/UnitHexagon.png - - false - - - - SwapToTeamPick - 1 - - - - - - - - - - - Team - Fonts/DroidSans.ttf,64 - - - - - - - - - - - - Change - Fonts/DroidSans.ttf,64 - - - - - - - - - - @@ -10029,6 +9299,53 @@ + + + + + Textures/Core/UnitHexagon.png + + false + + + + SwapToTeamPick + 1 + + + + + + + + + + + Team + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + Change + Fonts/DroidSans.ttf,64 + + + + + + + + + + @@ -10084,6 +9401,689 @@ + + + + + + + + + + Schema/Entities/PlayerRed.xml + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + Schema/Entities/ScoreBoard_Red.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Kills + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + KD + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Deaths + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Name + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + ID + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + Schema/Entities/ScoreBoard_Blue.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Name + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Kills + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + KD + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + ID + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Deaths + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Schema/Entities/ScoreBoard_Blue.xml + + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + + + + + + + + + + + + + + + ID + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Deaths + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Name + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Kills + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + KD + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + Schema/Entities/ScoreBoard_Red.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Kills + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Name + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + KD + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + ID + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + Deaths + Fonts/DroidSans.ttf,64 + + + + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + + + + Models/Core/UnitCube.mesh + + + + + + + + + + + + + + + + + + + + + + + + @@ -10276,6 +10276,18 @@ + + + + + 10 + + + + + + + @@ -10287,7 +10299,29 @@ 4 - + + + + + + + + + 4 + + + + + + + + + + + 4 + + + @@ -10303,6 +10337,17 @@ + + + + 4 + + + + + + + @@ -10348,17 +10393,6 @@ - - - - 4 - - - - - - - @@ -10392,17 +10426,6 @@ - - - - 4 - - - - - - - @@ -10437,17 +10460,6 @@ - - - - 4 - - - - - - - @@ -10485,7 +10497,44 @@ - + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + @@ -10522,7 +10571,81 @@ - + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + + @@ -10600,20 +10723,6 @@ - - - - - 5 - 2 - 0.5 - - - - - - - @@ -10628,6 +10737,20 @@ + + + + + 5 + 2 + 0.5 + + + + + + + @@ -10667,43 +10790,6 @@ - - - - - - - - - - - - 5 - 2 - 0.5 - - - - - - - - - - - - 5 - 2 - 0.5 - - - - - - - - - @@ -10748,20 +10834,6 @@ - - - - - 5 - 2 - 0.5 - - - - - - - @@ -10776,6 +10848,20 @@ + + + + + 5 + 2 + 0.5 + + + + + + + @@ -10815,43 +10901,6 @@ - - - - - - - - - - - - 5 - 2 - 0.5 - - - - - - - - - - - - 5 - 2 - 0.5 - - - - - - - - - @@ -10896,20 +10945,6 @@ - - - - - 5 - 2 - 0.5 - - - - - - - @@ -10924,6 +10959,20 @@ + + + + + 5 + 2 + 0.5 + + + + + + + @@ -10963,43 +11012,6 @@ - - - - - - - - - - - - 5 - 2 - 0.5 - - - - - - - - - - - - 5 - 2 - 0.5 - - - - - - - - - @@ -11044,20 +11056,6 @@ - - - - - 5 - 2 - 0.5 - - - - - - - @@ -11072,6 +11070,20 @@ + + + + + 5 + 2 + 0.5 + + + + + + + @@ -11131,6 +11143,19 @@ + + + + + 10 + 1 + + + + + + + @@ -11157,19 +11182,6 @@ - - - - - 10 - 1 - - - - - - - @@ -11209,18 +11221,6 @@ - - - - - 10 - - - - - - - @@ -11248,6 +11248,19 @@ + + + + + 15 + 1 + + + + + + + @@ -11256,7 +11269,7 @@ - + @@ -11264,8 +11277,8 @@ - 3 - 2 + 5 + 1 0.5 @@ -11274,6 +11287,29 @@ + + + + + 5 + 1 + 0.5 + + + + + + + + + + + + + + + + @@ -11283,7 +11319,21 @@ 0.5 - + + + + + + + + + + 5 + 2 + 0.5 + + + @@ -11330,7 +11380,7 @@ - + @@ -11339,7 +11389,7 @@ 5 - 1 + 2 0.5 @@ -11353,7 +11403,7 @@ 5 - 1 + 2 0.5 @@ -11364,6 +11414,43 @@ + + + + + + + + + + + + 5 + 2 + 0.5 + + + + + + + + + + + + 3 + 2 + 0.5 + + + + + + + + + @@ -11417,7 +11504,7 @@ 0.5 - + @@ -11430,43 +11517,6 @@ 1 0.5 - - - - - - - - - - - - - - - - - - - - 5 - 2 - 0.5 - - - - - - - - - - - - 5 - 2 - 0.5 - @@ -11528,7 +11578,7 @@ 0.5 - + @@ -11542,7 +11592,7 @@ 0.5 - + @@ -11586,43 +11636,6 @@ - - - - - - - - - - - - 5 - 2 - 0.5 - - - - - - - - - - - - 5 - 2 - 0.5 - - - - - - - - - @@ -11676,7 +11689,7 @@ 0.5 - + @@ -11690,7 +11703,7 @@ 0.5 - + @@ -11736,24 +11749,24 @@ - - - - - 15 - 1 - - - - - - - + + + + + 10 + 1 + + + + + + + @@ -11780,19 +11793,6 @@ - - - - - 10 - 1 - - - - - - - @@ -11811,36 +11811,10 @@ Schema/Entities/Player.xml - + - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - - - - - - Models/Characters/Assault/AssaultTPose.mesh - false - - - - - - - @@ -11862,7 +11836,33 @@ false - + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + + + + + + + + + + Models/Characters/Assault/AssaultTPose.mesh + false + + + From fce6e90f3ce60b658fe8229f6e5556a3dafebd37 Mon Sep 17 00:00:00 2001 From: sippeangelo Date: Wed, 9 Mar 2016 19:07:02 +0100 Subject: [PATCH 15/18] First person assault weapon idle animation now correct --- assets | 2 +- resources/Schema/Entities/WeaponAssaultBlueView.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets b/assets index de82323d..3af64d8b 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit de82323d5af14b77fe4142a26c6eab5f12c9363d +Subproject commit 3af64d8b1f8cdf3e20198b079dfc02f6d64fdc88 diff --git a/resources/Schema/Entities/WeaponAssaultBlueView.xml b/resources/Schema/Entities/WeaponAssaultBlueView.xml index 49015151..520c9906 100644 --- a/resources/Schema/Entities/WeaponAssaultBlueView.xml +++ b/resources/Schema/Entities/WeaponAssaultBlueView.xml @@ -72,7 +72,7 @@ - IdelF + IdleF true true From e11cdaa6628a1d280043ae935e92794813acfedb Mon Sep 17 00:00:00 2001 From: sippeangelo Date: Wed, 9 Mar 2016 20:11:07 +0100 Subject: [PATCH 16/18] Removed forced player color on spawn --- src/Game/Systems/PlayerSpawnSystem.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/Game/Systems/PlayerSpawnSystem.cpp b/src/Game/Systems/PlayerSpawnSystem.cpp index 454c5c53..03e3adb4 100644 --- a/src/Game/Systems/PlayerSpawnSystem.cpp +++ b/src/Game/Systems/PlayerSpawnSystem.cpp @@ -208,18 +208,6 @@ bool PlayerSpawnSystem::OnPlayerSpawned(Events::PlayerSpawned& e) m_EventBroker->Publish(lock); } - // HACK: Set the player model color to team color - EntityWrapper playerModel = e.Player.FirstChildByName("PlayerModel"); - if (playerModel.Valid() && e.Player.HasComponent("Team")) { - ComponentWrapper cTeam = e.Player["Team"]; - ComponentWrapper cModel = playerModel["Model"]; - if ((ComponentInfo::EnumType)cTeam["Team"] == cTeam["Team"].Enum("Red")) { - cModel["Color"] = glm::vec3(1.f, 0.f, 0.f); - } else if ((ComponentInfo::EnumType)cTeam["Team"] == cTeam["Team"].Enum("Blue")) { - cModel["Color"] = glm::vec3(0.f, 0.25f, 1.f); - } - } - return true; } From 727b6ba871cdb3cb55f859f2e1cbe49b73f99aa9 Mon Sep 17 00:00:00 2001 From: sippeangelo Date: Wed, 9 Mar 2016 22:04:13 +0100 Subject: [PATCH 17/18] Fixed Transform::AbsolutePosition to take scale into account properly maybe? --- src/Engine/Core/Transform.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Engine/Core/Transform.cpp b/src/Engine/Core/Transform.cpp index 333c3532..e5cff11c 100644 --- a/src/Engine/Core/Transform.cpp +++ b/src/Engine/Core/Transform.cpp @@ -24,7 +24,7 @@ glm::vec3 Transform::AbsolutePosition(World* world, EntityID entity) while (entity != EntityID_Invalid) { ComponentWrapper transform = world->GetComponent(entity, "Transform"); EntityID parent = world->GetParent(entity); - position += Transform::AbsoluteOrientation(world, parent) * (glm::vec3)transform["Position"]; + position += Transform::AbsoluteScale(world, parent) * (Transform::AbsoluteOrientation(world, parent) * (glm::vec3)transform["Position"]); entity = parent; } @@ -89,12 +89,12 @@ glm::mat4 Transform::ModelMatrix(EntityID entity, World* world) { return AbsoluteTransformation(EntityWrapper(world, entity)); - glm::vec3 position = Transform::AbsolutePosition(world, entity); - glm::quat orientation = Transform::AbsoluteOrientation(world, entity); - glm::vec3 scale = Transform::AbsoluteScale(world, entity); + //glm::vec3 position = Transform::AbsolutePosition(world, entity); + //glm::quat orientation = Transform::AbsoluteOrientation(world, entity); + //glm::vec3 scale = Transform::AbsoluteScale(world, entity); - glm::mat4 modelMatrix = glm::translate(glm::mat4(), position) * glm::toMat4(orientation) * glm::scale(scale); - return modelMatrix; + //glm::mat4 modelMatrix = glm::translate(glm::mat4(), position) * glm::toMat4(orientation) * glm::scale(scale); + //return modelMatrix; } glm::vec3 Transform::TransformPoint(const glm::vec3& point, const glm::mat4& matrix) From 50b0a091ec4354a3d1996d0218de34f1e63a1434 Mon Sep 17 00:00:00 2001 From: sippeangelo Date: Wed, 9 Mar 2016 22:06:08 +0100 Subject: [PATCH 18/18] Fixed editor widgets to take scale of the entity into account when they're moved --- src/Engine/Editor/EditorRenderSystem.cpp | 2 +- src/Engine/Editor/EditorSystem.cpp | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Engine/Editor/EditorRenderSystem.cpp b/src/Engine/Editor/EditorRenderSystem.cpp index f5fcc1a1..b39acf55 100644 --- a/src/Engine/Editor/EditorRenderSystem.cpp +++ b/src/Engine/Editor/EditorRenderSystem.cpp @@ -7,7 +7,7 @@ EditorRenderSystem::EditorRenderSystem(SystemParams params, IRenderer* renderer, { EVENT_SUBSCRIBE_MEMBER(m_ESetCamera, &EditorRenderSystem::OnSetCamera); auto resolution = Rectangle::Rectangle(1280, 720); - m_EditorCamera = new Camera((float)resolution.Width / resolution.Height, glm::radians(45.f), 0.01f, 5000.f); + m_EditorCamera = new Camera((float)resolution.Width / resolution.Height, glm::radians(45.f), 0.001f, 500.f); } void EditorRenderSystem::Update(double dt) diff --git a/src/Engine/Editor/EditorSystem.cpp b/src/Engine/Editor/EditorSystem.cpp index f9cdde0b..5e0d02fd 100644 --- a/src/Engine/Editor/EditorSystem.cpp +++ b/src/Engine/Editor/EditorSystem.cpp @@ -204,14 +204,21 @@ bool EditorSystem::OnWidgetDelta(const Events::WidgetDelta& e) if (m_CurrentSelection.Valid()) { if (m_WidgetSpace == EditorGUI::WidgetSpace::Global) { glm::quat parentOrientation; + glm::vec3 parentScale(1.f); EntityWrapper parent = m_CurrentSelection.Parent(); if (parent.Valid()) { parentOrientation = glm::inverse(Transform::AbsoluteOrientation(parent)); + parentScale = Transform::AbsoluteScale(parent); } - (glm::vec3&)m_CurrentSelection["Transform"]["Position"] += parentOrientation * e.Translation; + (glm::vec3&)m_CurrentSelection["Transform"]["Position"] += parentOrientation * e.Translation / parentScale; } else if (m_WidgetSpace == EditorGUI::WidgetSpace::Local) { + glm::vec3 parentScale(1.f); + EntityWrapper parent = m_CurrentSelection.Parent(); + if (parent.Valid()) { + parentScale = Transform::AbsoluteScale(parent); + } glm::quat selectionOri = glm::quat((glm::vec3)m_CurrentSelection["Transform"]["Orientation"]); - glm::vec3 localTranslation = selectionOri * e.Translation; + glm::vec3 localTranslation = selectionOri * e.Translation / parentScale; (glm::vec3&)m_CurrentSelection["Transform"]["Position"] += localTranslation; } m_EditorGUI->SetDirty(m_CurrentSelection);