Compare commits

..

44 Commits

Author SHA1 Message Date
viktorljung bdbf864934 spawning 1 shield on server and one on client 2016-03-14 16:46:03 +01:00
viktorljung f269caafed spawning shield on server and client 2016-03-14 16:02:20 +01:00
Jace 18ea938b56 Added start menu shortcut to starting a server 2016-03-14 09:59:54 +01:00
Jace 6c14b2a97e Updated start menu to load same map as game to save video memory 2016-03-14 09:26:16 +01:00
Jace 54eb3727b0 Fixed respawn 2016-03-14 09:26:04 +01:00
Jace 39e5f7b2dc Actually DDS 2016-03-14 09:21:07 +01:00
Jace cce43ebc1a DDS and shit 2016-03-14 09:08:14 +01:00
Jace 2a1f6cd9cf Updated installer 2016-03-14 08:38:08 +01:00
Jace 39da2bff27 README 2016-03-14 08:38:00 +01:00
Teejoon 28de3c716c Hopefully everything is working with dds and PNG textures 2016-03-14 08:16:35 +01:00
Teejoon 003f5b14a5 Merge remote-tracking branch 'origin/master' into DDS
Conflicts:
	assets
2016-03-14 06:10:30 +01:00
Teejoon a3f215831d Fixed DDS after merge 2016-03-14 06:09:06 +01:00
Joachim Pettersson 16ef09b20b Merge pull request #222 from teamfisk/DeathAnimation
Death effect re-added
2016-03-14 05:48:07 +01:00
Jocke fe87aa8e90 Death effect re-added. Hands get weird when explosion is triggered. 2016-03-14 04:45:01 +01:00
viktorljung b9b5f4bff7 Removed healing effect of defender boost 2016-03-14 04:37:43 +01:00
viktorljung 5db1bddd08 Merge branch 'master' of github.com:teamfisk/TacticalZ 2016-03-14 04:31:45 +01:00
viktorljung b366a8c149 Red players fixes 2016-03-14 04:31:38 +01:00
Adam Byléhn 483091a1de Merge pull request #137 from teamfisk/Importer
Export and import of collision meshes
2016-03-14 04:26:50 +01:00
Tleety 0e9be1d650 Merge branch 'master' of github.com:teamfisk/TacticalZ 2016-03-14 04:25:34 +01:00
Tleety 5679a88ddb Quit working 2016-03-14 04:25:20 +01:00
Jace 289bde0395 Merge branch 'master' of github.com:teamfisk/TacticalZ 2016-03-14 04:25:19 +01:00
Jace a3fef7bcd1 Better CP_Valhalla lighting 2016-03-14 04:25:07 +01:00
viktorljung 04fbd0d517 Merge branch 'master' of github.com:teamfisk/TacticalZ 2016-03-14 04:12:02 +01:00
viktorljung 9308e60932 Red players 2016-03-14 04:11:46 +01:00
William Moberg 407149fbb0 Merge branch 'master' into Importer 2016-03-14 03:23:08 +01:00
William Moberg 4c52f55bf0 Any collision meshes we have should be working, and RawModels should be released after being loaded. 2016-03-14 03:20:36 +01:00
viktorljung 8449818cb7 Merge branch 'Movement' 2016-03-14 03:13:48 +01:00
Teejoon 659dfed088 Commit reminder 2016-03-14 02:52:33 +01:00
Teejoon 8151e9a9a4 Merge branch 'master' into DDS
Conflicts:
	assets
	include/Engine/Core/ResourceManager.h
	include/Engine/Rendering/Image.h
	include/Engine/Rendering/TextureSprite.h
	resources/Schema/Entities/MovementTest.xml
	resources/Shaders/ForwardPlus.frag.glsl
	resources/Shaders/ForwardPlusShieldCheck.frag.glsl
	src/Engine/Rendering/CubeMapPass.cpp
	src/Engine/Rendering/Texture.cpp
	src/Game/Game.cpp
2016-03-14 02:51:45 +01:00
William Moberg f632b45c9b Merge branch 'MemoryOptimization' into Importer
# Conflicts:
#	include/Engine/Rendering/Model.h
#	src/Engine/Collision/Collision.cpp
#	src/Engine/Collision/CollisionSystem.cpp
#	src/Engine/Collision/TriggerSystem.cpp
#	src/Game/Systems/SpawnerSystem.cpp
2016-03-14 02:06:53 +01:00
William Moberg 7e6830af35 Merge branch 'master' into Importer 2016-03-14 01:09:18 +01:00
William Moberg dea57b4872 Fixes after merge. 2016-03-14 01:00:58 +01:00
William Moberg 562afac9d1 Merge branch 'master' into Importer
# Conflicts:
#	src/Engine/Collision/Collision.cpp
#	src/Engine/Collision/CollisionSystem.cpp
#	src/Engine/Rendering/DrawFinalPass.cpp
#	src/Game/Systems/SpawnerSystem.cpp
2016-03-14 00:42:07 +01:00
Jace 0516794db6 Separating RawModel from Model 2016-03-13 14:47:11 +01:00
Teejoon d6f0528a87 2 more shaders with DTX5nm calculations 2016-03-10 20:03:13 +01:00
Teejoon 0382708b85 Fixed so that we could use DTX5nm as normal map 2016-03-10 19:57:01 +01:00
Teejoon d8f9f15d34 Merge branch 'master' into DDS
Conflicts:
	assets
	src/Engine/Rendering/Texture.cpp
	src/Engine/Rendering/Util/CommonFunctions.cpp
	src/Game/Game.cpp
2016-03-10 19:55:25 +01:00
Jace ffa9d7e607 WIP 2016-03-02 18:06:20 +01:00
Jace edf481b4d7 Load the error texture when a texture isn't found instead of just passing null to OpenGL! 2016-03-02 17:42:27 +01:00
Teejoon 7b32d92170 Merge with master 2016-03-02 13:45:56 +01:00
Teejoon 46eaedb186 Merge remote-tracking branch 'origin/master' into Importer
Conflicts:
	resources/Schema/Entities/Player.xml
	src/Engine/Collision/CollisionSystem.cpp
	src/Engine/Rendering/DrawFinalPass.cpp
2016-03-02 13:19:40 +01:00
Teejoon bb6e491eed Fix for GLERROR in DrawModelRenderQueues 2016-02-25 16:00:27 +01:00
Teejoon 669a7d13cf We can now export and import collision meshes :D 2016-02-25 15:39:42 +01:00
Teejoon 9229b77893 Export Collision mesh 2016-02-25 13:19:35 +01:00
82 changed files with 46241 additions and 38870 deletions
+1 -1
Submodule assets updated: 9e9d799f11...902cbf2ba6
+6 -6
View File
@@ -48,13 +48,13 @@ bool RayVsTriangle(const Ray& ray,
bool trueOnNegativeDistance = false); bool trueOnNegativeDistance = false);
//Return true if the ray hits any of the triangles in the model. Stops checking when a hit is detected. //Return true if the ray hits any of the triangles in the model. Stops checking when a hit is detected.
bool RayVsModel(const Ray& ray, bool RayVsModel(const Ray& ray,
const RawModel::Vertex* modelVertices, const std::vector<glm::vec3>& modelVertices,
const std::vector<unsigned int>& modelIndices, const std::vector<unsigned int>& modelIndices,
const glm::mat4& modelMatrix); const glm::mat4& modelMatrix);
//Return true if the ray hits any of the triangles in the model. //Return true if the ray hits any of the triangles in the model.
//Also returns the position of the intersection point. Will loop through all the whole model indices. //Also returns the position of the intersection point. Will loop through all the whole model indices.
bool RayVsModel(const Ray& ray, bool RayVsModel(const Ray& ray,
const RawModel::Vertex* modelVertices, const std::vector<glm::vec3>& modelVertices,
const std::vector<unsigned int>& modelIndices, const std::vector<unsigned int>& modelIndices,
const glm::mat4& modelMatrix, const glm::mat4& modelMatrix,
glm::vec3& outHitPosition); glm::vec3& outHitPosition);
@@ -62,7 +62,7 @@ bool RayVsModel(const Ray& ray,
//Also returns the distance from the ray origin to the closest //Also returns the distance from the ray origin to the closest
//intersection point, and the barycentric u,v-coordinates. Will loop through all the whole model indices. //intersection point, and the barycentric u,v-coordinates. Will loop through all the whole model indices.
bool RayVsModel(const Ray& ray, bool RayVsModel(const Ray& ray,
const RawModel::Vertex* modelVertices, const std::vector<glm::vec3>& modelVertices,
const std::vector<unsigned int>& modelIndices, const std::vector<unsigned int>& modelIndices,
const glm::mat4& modelMatrix, const glm::mat4& modelMatrix,
float& outDistance, float& outDistance,
@@ -70,7 +70,7 @@ bool RayVsModel(const Ray& ray,
float& outVCoord); float& outVCoord);
bool AABBvsTriangles(const AABB& box, bool AABBvsTriangles(const AABB& box,
const RawModel::Vertex* modelVertices, const std::vector<glm::vec3>& modelVertices,
const std::vector<unsigned int>& modelIndices, const std::vector<unsigned int>& modelIndices,
const glm::mat4& modelMatrix, const glm::mat4& modelMatrix,
glm::vec3& boxVelocity, glm::vec3& boxVelocity,
@@ -80,7 +80,7 @@ bool AABBvsTriangles(const AABB& box,
//Detects collision, but does not resolve. //Detects collision, but does not resolve.
bool AABBvsTriangles(const AABB& box, bool AABBvsTriangles(const AABB& box,
const RawModel::Vertex* modelVertices, const std::vector<glm::vec3>& modelVertices,
const std::vector<unsigned int>& modelIndices, const std::vector<unsigned int>& modelIndices,
const glm::mat4& modelMatrix); const glm::mat4& modelMatrix);
@@ -92,7 +92,7 @@ enum Output
}; };
//Detects intersection and containment. //Detects intersection and containment.
Output AABBvsTrianglesWContainment(const AABB& box, Output AABBvsTrianglesWContainment(const AABB& box,
const RawModel::Vertex* modelVertices, const std::vector<glm::vec3>& modelVertices,
const std::vector<unsigned int>& modelIndices, const std::vector<unsigned int>& modelIndices,
const glm::mat4& modelMatrix); const glm::mat4& modelMatrix);
-1
View File
@@ -43,7 +43,6 @@ private:
EditorGUI::WidgetSpace m_WidgetSpace = EditorGUI::WidgetSpace::Global; EditorGUI::WidgetSpace m_WidgetSpace = EditorGUI::WidgetSpace::Global;
EntityWrapper m_Widget = EntityWrapper::Invalid; EntityWrapper m_Widget = EntityWrapper::Invalid;
EntityWrapper m_CurrentSelection = EntityWrapper::Invalid; EntityWrapper m_CurrentSelection = EntityWrapper::Invalid;
glm::vec3 m_CamVelocity;
// Utility functions // Utility functions
EntityWrapper importEntity(EntityWrapper parent, boost::filesystem::path filePath); EntityWrapper importEntity(EntityWrapper parent, boost::filesystem::path filePath);
@@ -16,7 +16,6 @@
#include "../Core/EEntityDeleted.h" #include "../Core/EEntityDeleted.h"
#include "Rendering/ESetBlendWeight.h" #include "Rendering/ESetBlendWeight.h"
#include "imgui/imgui.h" #include "imgui/imgui.h"
#include "Input/EInputCommand.h"
class AnimationSystem : public ImpureSystem class AnimationSystem : public ImpureSystem
{ {
@@ -38,13 +37,7 @@ private:
EventRelay<AnimationSystem, Events::SetBlendWeight> m_ESetBlendWeight; EventRelay<AnimationSystem, Events::SetBlendWeight> m_ESetBlendWeight;
bool OnSetBlendWeight(Events::SetBlendWeight& e); bool OnSetBlendWeight(Events::SetBlendWeight& e);
EventRelay<AnimationSystem, Events::InputCommand> m_EInputCommand;
bool OnInputCommand(Events::InputCommand& e);
std::unordered_map<EntityWrapper, AutoBlendQueue> m_AutoBlendQueues; std::unordered_map<EntityWrapper, AutoBlendQueue> m_AutoBlendQueues;
bool Crouch = false;
float aimMove = 0;
}; };
#endif #endif
+71
View File
@@ -0,0 +1,71 @@
#ifndef DDS_h__
#define DDS_h__
#include <cstdint>
#include "../Common.h"
#include "../Core/ResourceManager.h"
#include "Image.h"
// DXT5
class DDS : public Image, public Resource
{
public:
DDS(std::string path);
~DDS();
void FlipY(unsigned char* data, std::size_t rowBytes, std::size_t totalSize, std::size_t numBlocksWide);
private:
static const uint32_t MagicNumber = 0x20534444; // "DDS "
struct Header_t
{
uint32_t Size;
uint32_t Flags;
uint32_t Height;
uint32_t Width;
uint32_t PitchOrLinearSize;
uint32_t Depth;
uint32_t MipMapCount;
uint32_t RESERVED1[11];
struct PixelFormat_t
{
uint32_t Size;
uint32_t Flags;
uint32_t FourCC;
uint32_t RGBBitCount;
uint32_t RBitMask;
uint32_t GBitMask;
uint32_t BBitMask;
uint32_t ABitMask;
} PixelFormat;
uint32_t Caps;
uint32_t Caps2;
uint32_t Caps3;
uint32_t Caps4;
uint32_t RESERVED2;
} m_Header;
struct Block_t
{
struct Alpha_t
{
uint8_t Colors[2];
uint8_t Data[6];
} Alpha;
struct Data_t
{
uint16_t Colors[2];
uint8_t Data[4];
} Data;
};
std::size_t m_NumBlocksWide;
std::size_t m_NumBlocksHigh;
std::size_t m_RowBytes;
void flipBlock(Block_t* block);
};
#endif
+3
View File
@@ -15,7 +15,10 @@ struct Image
unsigned int Width = 0; unsigned int Width = 0;
unsigned int Height = 0; unsigned int Height = 0;
ImageFormat Format = ImageFormat::Unknown; ImageFormat Format = ImageFormat::Unknown;
unsigned int MipMapLevels = 0;
bool Compressed = false;
unsigned char* Data = nullptr; unsigned char* Data = nullptr;
std::size_t ByteSize = 0;
}; };
#endif #endif
+12 -6
View File
@@ -16,15 +16,18 @@ private:
public: public:
~Model(); ~Model();
const std::vector<RawModel::MaterialProperties>& MaterialGroups() const { return m_RawModel->m_Materials; } const std::vector<RawModel::MaterialProperties>& MaterialGroups() const { return m_Materials; }
const glm::mat4& Matrix() const { return m_RawModel->m_Matrix; } unsigned int NumberOfVertices() const { return m_Vertices.size(); }
const RawModel::Vertex* Vertices() const { return m_RawModel->Vertices(); }
unsigned int NumberOfVertices() const { return m_RawModel->NumVertices(); }
const AABB& Box() const { return m_Box; } const AABB& Box() const { return m_Box; }
bool IsSkinned() const { return m_RawModel->IsSkinned(); } bool IsSkinned() const { return m_IsSkinned; }
GLuint VAO; GLuint VAO;
GLuint ElementBuffer; GLuint ElementBuffer;
RawModel* m_RawModel; //RawModel* m_RawModel;
Skeleton* m_Skeleton = nullptr;
std::vector<glm::vec3> m_Vertices;
std::vector<unsigned int> m_Indices;
private: private:
AABB m_Box; AABB m_Box;
@@ -34,6 +37,9 @@ private:
GLuint TangentNormalsBuffer; GLuint TangentNormalsBuffer;
GLuint BiTangentNormalsBuffer; GLuint BiTangentNormalsBuffer;
GLuint TextureCoordBuffer; GLuint TextureCoordBuffer;
std::vector<RawModel::MaterialProperties> m_Materials;
bool m_IsSkinned;
}; };
#endif #endif
+1 -1
View File
@@ -110,7 +110,7 @@ struct ModelJob : RenderJob
} }
if (model->IsSkinned()) { if (model->IsSkinned()) {
Skeleton = Model->m_RawModel->m_Skeleton; Skeleton = Model->m_Skeleton;
if (Skeleton != nullptr) { if (Skeleton != nullptr) {
EntityWrapper entityWrapper = EntityWrapper(world, modelComponent.EntityID); EntityWrapper entityWrapper = EntityWrapper(world, modelComponent.EntityID);
+39 -16
View File
@@ -13,6 +13,7 @@
#include <boost/filesystem/path.hpp> #include <boost/filesystem/path.hpp>
#include <boost/endian/buffers.hpp>
#include "../Common.h" #include "../Common.h"
#include "../GLM.h" #include "../GLM.h"
#include "../Core/ResourceManager.h" #include "../Core/ResourceManager.h"
@@ -20,22 +21,17 @@
#include "Skeleton.h" #include "Skeleton.h"
#include "ShaderProgram.h" #include "ShaderProgram.h"
#include "boost\endian\buffers.hpp"
class RawModelCustom : public Resource class RawModelCustom : public Resource
{ {
friend class ResourceManager; friend class ResourceManager;
friend class Model;
protected: protected:
RawModelCustom(std::string fileName); RawModelCustom(std::string fileName);
public: public:
~RawModelCustom(); ~RawModelCustom();
struct Vertex struct RenderVertex {
{
glm::vec3 Position; glm::vec3 Position;
glm::vec3 Normal; glm::vec3 Normal;
glm::vec3 Tangent; glm::vec3 Tangent;
@@ -43,7 +39,7 @@ public:
glm::vec2 TextureCoords; glm::vec2 TextureCoords;
}; };
struct SkinedVertex : public Vertex { struct SkinedVertex : public RenderVertex {
glm::vec4 BoneIndices; glm::vec4 BoneIndices;
glm::vec4 BoneWeights; glm::vec4 BoneWeights;
}; };
@@ -91,7 +87,7 @@ public:
unsigned int ShaderID = 0; unsigned int ShaderID = 0;
}; };
const Vertex* Vertices() const { const RenderVertex* Vertices() const {
if (hasSkin) { if (hasSkin) {
return m_SkinedVertices.data(); return m_SkinedVertices.data();
} else { } else {
@@ -99,16 +95,16 @@ public:
} }
}; };
unsigned int VertexSize() const { unsigned int VertexSize() const {
if (hasSkin) { if (hasSkin) {
return sizeof(SkinedVertex); return sizeof(SkinedVertex);
} }
else { else {
return sizeof(Vertex); return sizeof(RenderVertex);
} }
}; };
unsigned int NumVertices() const { size_t NumVertices() const {
if (hasSkin) { if (hasSkin) {
return m_SkinedVertices.size(); return m_SkinedVertices.size();
} else { } else {
@@ -116,17 +112,39 @@ public:
} }
}; };
const std::vector<unsigned int>& Indices() const {
return m_Indices;
}
bool IsSkinned() const { return hasSkin; }; bool IsSkinned() const { return hasSkin; };
const std::vector<glm::vec3>& CollisionVertices();
size_t NumCollisionVertices() const {
return m_CollisionVertices.size();
};
const std::vector<unsigned int>& CollisionIndices() const {
if (hasCollisionMesh) {
return m_CollisionIndices;
} else {
return m_Indices;
}
};
std::vector<MaterialProperties> m_Materials; std::vector<MaterialProperties> m_Materials;
std::vector<unsigned int> m_Indices;
Skeleton* m_Skeleton = nullptr; Skeleton* m_Skeleton = nullptr;
glm::mat4 m_Matrix; glm::mat4 m_Matrix;
private: private:
bool hasSkin; bool hasSkin;
std::vector<Vertex> m_Vertices; bool hasCollisionMesh = false;
std::vector<unsigned int> m_Indices;
std::vector<unsigned int> m_CollisionIndices;
std::vector<glm::vec3> m_CollisionVertices;
std::vector<RenderVertex> m_Vertices;
std::vector<SkinedVertex> m_SkinedVertices; std::vector<SkinedVertex> m_SkinedVertices;
void ReadMeshFile(std::string filePath); void ReadMeshFile(std::string filePath);
@@ -149,7 +167,12 @@ private:
void ReadAnimationClips(std::size_t& offset, char* fileData, const unsigned int& fileByteSize, unsigned int numberOfClips); void ReadAnimationClips(std::size_t& offset, char* fileData, const unsigned int& fileByteSize, unsigned int numberOfClips);
void ReadAnimationClipSingle(std::size_t& offset, char* fileData, const unsigned int& fileByteSize, unsigned int clipIndex); void ReadAnimationClipSingle(std::size_t& offset, char* fileData, const unsigned int& fileByteSize, unsigned int clipIndex);
void ReadAnimationKeyFrame(std::size_t& offset, char* fileData, const unsigned int& fileByteSize, std::vector<Skeleton::Animation::Keyframe>& animation); void ReadAnimationKeyFrame(std::size_t& offset, char* fileData, const unsigned int& fileByteSize, std::vector<Skeleton::Animation::Keyframe>& animation);
void ReadCollisionFile(std::string filePath);
void ReadCollisionFileData(std::size_t& offset, char* fileData, const unsigned int& fileByteSize);
const std::vector<glm::vec3>& ConstructCollisionList();
//void CreateSkeleton(std::vector<std::tuple<std::string, glm::mat4>> &boneInfo, std::map<std::string, int> &boneNameMapping, aiNode* node, int parentID); //void CreateSkeleton(std::vector<std::tuple<std::string, glm::mat4>> &boneInfo, std::map<std::string, int> &boneNameMapping, aiNode* node, int parentID);
}; };
+1 -1
View File
@@ -69,7 +69,7 @@ private:
std::array<glm::mat4, MAX_SPLITS> m_LightProjection; std::array<glm::mat4, MAX_SPLITS> m_LightProjection;
std::array<glm::mat4, MAX_SPLITS> m_LightView; std::array<glm::mat4, MAX_SPLITS> m_LightView;
GLfloat m_NearFarPlane[2] = { -128.f, 128.f }; GLfloat m_NearFarPlane[2] = { -34.f, 27.f };
GLuint m_ResolutionSizeWidth = 1024 * 2; GLuint m_ResolutionSizeWidth = 1024 * 2;
GLuint m_ResolutionSizeHeight = 1024 * 2; GLuint m_ResolutionSizeHeight = 1024 * 2;
+5 -2
View File
@@ -1,9 +1,11 @@
#ifndef Texture_h__ #ifndef Texture_h__
#define Texture_h__ #define Texture_h__
#include <boost/filesystem.hpp>
#include "../OpenGL.h" #include "../OpenGL.h"
#include "BaseTexture.h" #include "BaseTexture.h"
#include "PNG.h" #include "PNG.h"
#include "DDS.h"
class Texture : public BaseTexture class Texture : public BaseTexture
{ {
@@ -18,8 +20,9 @@ public:
void Bind(GLenum textureUnit = GL_TEXTURE0); void Bind(GLenum textureUnit = GL_TEXTURE0);
GLuint m_Texture = 0; GLuint m_Texture = 0;
unsigned char* Data = nullptr;
enum TextureType : GLint { cInvalid = 0, cDDS = 1, cPNG = 2};
TextureType m_Type;
}; };
#endif #endif
-5
View File
@@ -14,11 +14,6 @@ protected:
TextureSprite(std::string path); TextureSprite(std::string path);
public: public:
void Bind(GLenum textureUnit = GL_TEXTURE0);
GLuint m_Texture = 0;
unsigned char* Data = nullptr;
}; };
#endif #endif
+1
View File
@@ -13,6 +13,7 @@
#include "Input/EInputCommand.h" #include "Input/EInputCommand.h"
#include "Network/ESearchForServers.h" #include "Network/ESearchForServers.h"
#include "Network/EConnectRequest.h" #include "Network/EConnectRequest.h"
#include <stdlib.h>
class MainMenuSystem : public ImpureSystem class MainMenuSystem : public ImpureSystem
+1
View File
@@ -8,6 +8,7 @@
#include "Events/ESpawnerSpawn.h" #include "Events/ESpawnerSpawn.h"
#include "Core/TransformSystem.h" #include "Core/TransformSystem.h"
#include "Core/EntityFile.h" #include "Core/EntityFile.h"
#include "Rendering/Model.h"
class SpawnerSystem : public System class SpawnerSystem : public System
{ {
+6 -6
View File
@@ -3,11 +3,11 @@ AutoReload=true
[Debug] [Debug]
LogLevel=1 LogLevel=1
LoadMap= LoadMap=Schema/Entities/StartMenu.xml
; if true -> Pool allocation is not used when calling Allocate/Free, just use regular dynamic allocation. ; if true -> Pool allocation is not used when calling Allocate/Free, just use regular dynamic allocation.
; if false -> Use pool allocation. ; if false -> Use pool allocation.
DisableMemoryPool=false DisableMemoryPool=false
RespawnTime = -1.0 RespawnTime=-1.0
EditorEnabled=false EditorEnabled=false
OutOfBodyExperience=false OutOfBodyExperience=false
@@ -22,7 +22,7 @@ Height=720
FOV=45 FOV=45
[Networking] [Networking]
StartNetwork=false StartNetwork=true
IsServer=false IsServer=false
Name=Bob Name=Bob
Address=127.0.0.1 Address=127.0.0.1
@@ -30,7 +30,7 @@ Port=27666
MaxConnections=8 MaxConnections=8
SnapshotInterval=0.05 SnapshotInterval=0.05
SendInputIntervalMs=33 SendInputIntervalMs=33
PingIntervalMs= 1000 PingIntervalMs=1000
TimeoutMs=15000 TimeoutMs=15000
[Multithreading] [Multithreading]
@@ -43,7 +43,7 @@ AnnouncerVolume=1.0
Announcer=female Announcer=female
[SSAO] [SSAO]
Quality=0 Quality=1
[SSAO1] [SSAO1]
Radius=1.0 Radius=1.0
@@ -88,4 +88,4 @@ NumIterations=4
NumIterations=6 NumIterations=6
[MSAA] [MSAA]
Level = 0; Level=2
+1 -1
View File
@@ -1,5 +1,5 @@
[Mouse] [Mouse]
Sensitivity=0.5 Sensitivity=0.05
InvertPitch=false InvertPitch=false
[Keyboard] [Keyboard]
+17
View File
@@ -0,0 +1,17 @@
To start a server
1. Run "Axyz Server" from the start menu or "Server.bat" in the installation directory (C:\Program Files\Axyz)
2. Press F1 to open the editor mode
3. Expand the Entities window if it is minimized, by double-clicking it
4. Mark StartMenu_Origin and hit Delete twice
5. Hit Import and choose CP_Valhalla.xml
6. Press F1 again to leave editor mode for an acceptable framerate
To join a game
1. Run "Axyz" from the start menu or "Axyz.exe" in the installation directory (C:\Program Files\Axyz)
2. Press Play
3. Hit the refresh icon if no server is visible
4. Click the server you want to join
5. Follow on-screen directions
6. Enjoy the game :)
+1 -1
View File
@@ -2,5 +2,5 @@
<Camera xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Camera.xsd"> <Camera xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Camera.xsd">
<FOV>59</FOV> <!-- 90 horizontal FOV at 1080p --> <FOV>59</FOV> <!-- 90 horizontal FOV at 1080p -->
<NearClip>0.01</NearClip> <NearClip>0.01</NearClip>
<FarClip>300</FarClip> <FarClip>5000</FarClip>
</Camera> </Camera>
-114
View File
@@ -1,114 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:SceneLight>
<AmbientColor A="1" B="0.392156869" G="0.392156869" R="0.392156869"/>
<Gamma>1</Gamma>
<Exposure>0.82000017166137695</Exposure>
</c:SceneLight>
<c:Transform/>
</Components>
<Children>
<Entity>
<Components>
<c:Collidable/>
<c:Model>
<GlowIntensity>1.0199999809265137</GlowIntensity>
<Resource>Models/Props/Walls/SciFiWallTop.mesh</Resource>
<Color A="1" B="3.92156863" G="1" R="1"/>
<Shadow>false</Shadow>
</c:Model>
<c:Transform>
<Position X="0" Y="58.718792" Z="15.6310005"/>
<Orientation X="0" Y="0" Z="3.14199996"/>
<Scale X="0.279000014" Y="1" Z="0.279000014"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:Collidable/>
<c:Model>
<GlowIntensity>1.5</GlowIntensity>
<Resource>Models/Props/Pillars/SciFiPillar2Blue.mesh</Resource>
<Shadow>false</Shadow>
</c:Model>
<c:Transform>
<Position X="-14.4384613" Y="-1.2316848" Z="0"/>
<Orientation X="0" Y="2.64800024" Z="0"/>
<Scale X="2" Y="3.60000014" Z="1.9000001"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:Collidable/>
<c:Model>
<GlowIntensity>1.5</GlowIntensity>
<Resource>Models/Props/Pillars/SciFiPillar2Blue.mesh</Resource>
<Shadow>false</Shadow>
</c:Model>
<c:Transform>
<Position X="14.3019333" Y="-1.12725353" Z="0"/>
<Orientation X="0" Y="3.84800029" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Dir">
<Components>
<c:DirectionalLight>
<Color A="1" B="0.725490212" G="0.75686276" R="0.741176486"/>
<Intensity>1.0699999332427979</Intensity>
</c:DirectionalLight>
<c:Transform>
<Orientation X="3.68318534" Y="0" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Cam">
<Components>
<c:Camera/>
<c:Model>
<Resource>Models/Core/UnitSphere.mesh</Resource>
<Shadow>false</Shadow>
<NormalMap>false</NormalMap>
<DiffuseTexture>false</DiffuseTexture>
<SpecularMap>false</SpecularMap>
<GlowMap>false</GlowMap>
</c:Model>
<c:Transform>
<Position X="0.100000001" Y="-0.0670000017" Z="-32.8670006"/>
<Orientation X="0" Y="3.1400001" Z="0"/>
<Scale X="0.100000001" Y="0.100000001" Z="0.100000001"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Spawn">
<Components>
<c:PlayerSpawn>
<AssaultFile>Schema/Entities/PlayerAssaultBlue.xml</AssaultFile>
<DefenderFile>Schema/Entities/PlayerDefenderBlue.xml</DefenderFile>
<SniperFile></SniperFile>
</c:PlayerSpawn>
<c:Model>
<Resource>Models/Characters/Assault/AssaultBlue.mesh</Resource>
</c:Model>
<c:Spawner>
<EntityFile></EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.100000001" Y="2.8398931" Z="-29.0827847"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+19
View File
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:SceneLight>
<AmbientColor A="1" B="1" G="1" R="1"/>
</c:SceneLight>
<c:Sprite>
<DiffuseTexture>Textures/Core/UnitRaptor.png</DiffuseTexture>
<GlowMap></GlowMap>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="-1.60000002"/>
</c:Transform>
</Components>
<Children/>
</Entity>
+2 -20
View File
@@ -31,17 +31,8 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>ActivateShieldU</AnimationName> <AnimationName>ActivateShieldU</AnimationName>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Idle">
<Components>
<c:Animation>
<AnimationName>ShieldFrontU</AnimationName>
<Play>true</Play> <Play>true</Play>
<Loop>false</Loop>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
</Components> </Components>
@@ -74,16 +65,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>ActivateShieldU</AnimationName> <AnimationName>ActivateShieldU</AnimationName>
<Loop>false</Loop> <Play>true</Play>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Idle">
<Components>
<c:Animation>
<AnimationName>ShieldFrontU</AnimationName>
<Loop>false</Loop> <Loop>false</Loop>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
@@ -0,0 +1,151 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="FriendlyBoostHUD" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Lifetime>
<Lifetime>0.5</Lifetime>
</c:Lifetime>
<c:Transform>
<Scale X="1.20000005" Y="1.20000005" Z="1"/>
</c:Transform>
</Components>
<Children>
<Entity name="BoostHUDBackground">
<Components>
<c:Sprite>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<Color A="0.588235319" B="0" G="0" R="0"/>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="-0.00300000003"/>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="BoostIcons">
<Components>
<c:Transform>
<Position X="-1.47358617e-06" Y="-0.0191892758" Z="4.05375999e-07"/>
</c:Transform>
</Components>
<Children>
<Entity name="AssaultBoost">
<Components>
<c:Transform>
<Position X="0.0120000001" Y="0.00899999961" Z="-8.43336147e-06"/>
<Scale X="0.0199999996" Y="0.0199999996" Z="0.0199999996"/>
</c:Transform>
</Components>
<Children>
<Entity name="Active">
<Components>
<c:Text>
<Content>\1</Content>
<Resource>Fonts/Hind-Edited.otf,64</Resource>
<Color A="1" B="0.392156869" G="0.392156869" R="1.37254906"/>
<Visible>false</Visible>
</c:Text>
<c:Transform>
<Position X="0" Y="0" Z="0.0149999997"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Inactive">
<Components>
<c:Text>
<Content>\1</Content>
<Resource>Fonts/Hind-Edited.otf,64</Resource>
<Color A="1" B="0.784313738" G="0.784313738" R="0.784313738"/>
</c:Text>
<c:Transform>
<Position X="0" Y="0" Z="-8.43336147e-06"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="DefenderBoost">
<Components>
<c:Transform>
<Position X="-0.0120000001" Y="0.00900000054" Z="-8.43336147e-06"/>
<Scale X="0.0199999996" Y="0.0199999996" Z="0.0199999996"/>
</c:Transform>
</Components>
<Children>
<Entity name="Active">
<Components>
<c:Text>
<Content>\2</Content>
<Resource>Fonts/Hind-Edited.otf,64</Resource>
<Color A="1" B="0.392156869" G="0.392156869" R="1.17647064"/>
<Visible>false</Visible>
</c:Text>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Inactive">
<Components>
<c:Text>
<Content>\2</Content>
<Resource>Fonts/Hind-Edited.otf,64</Resource>
<Color A="1" B="0.784313738" G="0.784313738" R="0.784313738"/>
</c:Text>
<c:Transform>
<Position X="0" Y="0" Z="-8.43336147e-06"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="SniperBoost">
<Components>
<c:Transform>
<Position X="0" Y="0.0310000014" Z="-1.21438188e-05"/>
<Scale X="0.0199999996" Y="0.0199999996" Z="0.0199999996"/>
</c:Transform>
</Components>
<Children>
<Entity name="Active">
<Components>
<c:Text>
<Content>\3</Content>
<Resource>Fonts/Hind-Edited.otf,64</Resource>
<Color A="1" B="0.392156869" G="0.392156869" R="1.17647064"/>
<Visible>false</Visible>
</c:Text>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Inactive">
<Components>
<c:Text>
<Content>\3</Content>
<Resource>Fonts/Hind-Edited.otf,64</Resource>
<Color A="1" B="0.784313738" G="0.784313738" R="0.784313738"/>
</c:Text>
<c:Transform>
<Position X="0" Y="0" Z="-8.43336147e-06"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
+4 -4
View File
@@ -20,8 +20,8 @@
</Team> </Team>
</c:Team> </c:Team>
<c:PlayerSpawn> <c:PlayerSpawn>
<AssaultFile>Schema/Entities/PlayerAssaultBlue.xml</AssaultFile> <AssaultFile>Schema/Entities/PlayerAssaultRed.xml</AssaultFile>
<DefenderFile>Schema/Entities/PlayerDefenderBlue.xml</DefenderFile> <DefenderFile>Schema/Entities/PlayerDefenderRed.xml</DefenderFile>
<SniperFile></SniperFile> <SniperFile></SniperFile>
</c:PlayerSpawn> </c:PlayerSpawn>
<c:Spawner> <c:Spawner>
@@ -115,7 +115,7 @@
<Color A="1" B="1" G="0.254901975" R="0"/> <Color A="1" B="1" G="0.254901975" R="0"/>
</c:Model> </c:Model>
<c:Transform> <c:Transform>
<Position X="-0.600000024" Y="0" Z="0.549540162"/> <Position X="0.800000012" Y="0" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children/> <Children/>
@@ -128,7 +128,7 @@
<Color A="1" B="1" G="0.254901975" R="0"/> <Color A="1" B="1" G="0.254901975" R="0"/>
</c:Model> </c:Model>
<c:Transform> <c:Transform>
<Position X="0.800000012" Y="0" Z="0"/> <Position X="-0.600000024" Y="0" Z="0.549540162"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children/> <Children/>
@@ -130,6 +130,66 @@
</Entity> </Entity>
</Children> </Children>
</Entity> </Entity>
<Entity name="Lights">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="Light_front">
<Components>
<c:Model>
<Resource>Models/Core/UnitSphere.mesh</Resource>
<Visible>false</Visible>
<Shadow>false</Shadow>
</c:Model>
<c:PointLight>
<Color A="1" B="0.588235319" G="0.588235319" R="1"/>
</c:PointLight>
<c:Transform>
<Position X="-0.000288648967" Y="0.000489665952" Z="0.0824639797"/>
<Scale X="0.0299999993" Y="0.0299999993" Z="0.0299999993"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Light_Side">
<Components>
<c:Model>
<Resource>Models/Core/UnitSphere.mesh</Resource>
<Color A="1" B="1" G="1" R="0"/>
<Visible>false</Visible>
<Shadow>false</Shadow>
</c:Model>
<c:PointLight>
<Color A="1" B="0.588235319" G="0.588235319" R="1"/>
<Radius>0.40000000596046448</Radius>
</c:PointLight>
<c:Transform>
<Position X="-0.0870000049" Y="0.0210000016" Z="0.186000004"/>
<Scale X="0.0299999993" Y="0.0299999993" Z="0.0299999993"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Light_front2">
<Components>
<c:Model>
<Resource>Models/Core/UnitSphere.mesh</Resource>
<Visible>false</Visible>
<Shadow>false</Shadow>
</c:Model>
<c:PointLight>
<Color A="1" B="0.588235319" G="0.588235319" R="1"/>
</c:PointLight>
<c:Transform>
<Position X="0.000448234321" Y="-0.000760387513" Z="-0.323961914"/>
<Scale X="0.0299999993" Y="0.0299999993" Z="0.0299999993"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children> </Children>
</Entity> </Entity>
@@ -0,0 +1,219 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="MuzzleFlashBlueSidearm" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Lifetime>
<Lifetime>0.080000000000000002</Lifetime>
</c:Lifetime>
<c:Transform/>
</Components>
<Children>
<Entity name="Level1">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="Cone1Outside">
<Components>
<c:Fade>
<FadeTime>0.080000000000000002</FadeTime>
</c:Fade>
<c:Model>
<GlowIntensity>2</GlowIntensity>
<Resource>Models/Effects/MuzzleFlash/Red/Cone1Outside.mesh</Resource>
<Shadow>false</Shadow>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Cone1Inside">
<Components>
<c:Fade>
<FadeTime>0.080000000000000002</FadeTime>
</c:Fade>
<c:Model>
<GlowIntensity>2</GlowIntensity>
<Resource>Models/Effects/MuzzleFlash/Red/Cone1Inside.mesh</Resource>
<Shadow>false</Shadow>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="Level2">
<Components>
<c:Transform>
<Position X="0.000134464673" Y="8.11116188e-05" Z="-0.0197895896"/>
</c:Transform>
</Components>
<Children>
<Entity name="Cone2Inside">
<Components>
<c:Fade>
<FadeTime>0.080000000000000002</FadeTime>
</c:Fade>
<c:Model>
<GlowIntensity>2</GlowIntensity>
<Resource>Models/Effects/MuzzleFlash/Red/Cone2Inside.mesh</Resource>
<Shadow>false</Shadow>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Cone2Outside">
<Components>
<c:Fade>
<FadeTime>0.080000000000000002</FadeTime>
</c:Fade>
<c:Model>
<GlowIntensity>2</GlowIntensity>
<Resource>Models/Effects/MuzzleFlash/Red/Cone2Outside.mesh</Resource>
<Shadow>false</Shadow>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="Level3">
<Components>
<c:Transform>
<Position X="0.000216802931" Y="0.000130779619" Z="-0.0319075659"/>
</c:Transform>
</Components>
<Children>
<Entity name="PlaneLeft">
<Components>
<c:Fade>
<FadeTime>0.080000000000000002</FadeTime>
</c:Fade>
<c:Model>
<GlowIntensity>2</GlowIntensity>
<Resource>Models/Effects/MuzzleFlash/Red/PlaneLeft.mesh</Resource>
<Shadow>false</Shadow>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="PlaneRight">
<Components>
<c:Fade>
<FadeTime>0.080000000000000002</FadeTime>
</c:Fade>
<c:Model>
<GlowIntensity>2</GlowIntensity>
<Resource>Models/Effects/MuzzleFlash/Red/PlaneRight.mesh</Resource>
<Shadow>false</Shadow>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="PlaneUp">
<Components>
<c:Fade>
<FadeTime>0.080000000000000002</FadeTime>
</c:Fade>
<c:Model>
<GlowIntensity>2</GlowIntensity>
<Resource>Models/Effects/MuzzleFlash/Red/PlaneUp.mesh</Resource>
<Shadow>false</Shadow>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="PlaneDown">
<Components>
<c:Fade>
<FadeTime>0.080000000000000002</FadeTime>
</c:Fade>
<c:Model>
<GlowIntensity>2</GlowIntensity>
<Resource>Models/Effects/MuzzleFlash/Red/PlaneDown.mesh</Resource>
<Shadow>false</Shadow>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="Lights">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="Light_front">
<Components>
<c:Model>
<Resource>Models/Core/UnitSphere.mesh</Resource>
<Visible>false</Visible>
<Shadow>false</Shadow>
</c:Model>
<c:PointLight>
<Color A="1" B="0.588235319" G="0.588235319" R="1"/>
</c:PointLight>
<c:Transform>
<Position X="-0.000288648967" Y="0.000489665952" Z="0.0824639797"/>
<Scale X="0.0299999993" Y="0.0299999993" Z="0.0299999993"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Light_Side">
<Components>
<c:Model>
<Resource>Models/Core/UnitSphere.mesh</Resource>
<Color A="1" B="1" G="1" R="0"/>
<Visible>false</Visible>
<Shadow>false</Shadow>
</c:Model>
<c:PointLight>
<Color A="1" B="0.588235319" G="0.588235319" R="1"/>
<Radius>0.40000000596046448</Radius>
</c:PointLight>
<c:Transform>
<Position X="-0.0870000049" Y="0.0210000016" Z="0.186000004"/>
<Scale X="0.0299999993" Y="0.0299999993" Z="0.0299999993"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Light_front2">
<Components>
<c:Model>
<Resource>Models/Core/UnitSphere.mesh</Resource>
<Visible>false</Visible>
<Shadow>false</Shadow>
</c:Model>
<c:PointLight>
<Color A="1" B="0.588235319" G="0.588235319" R="1"/>
</c:PointLight>
<c:Transform>
<Position X="0.000448234321" Y="-0.000760387513" Z="-0.323961914"/>
<Scale X="0.0299999993" Y="0.0299999993" Z="0.0299999993"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
@@ -28,93 +28,482 @@
<CurrentWeapon></CurrentWeapon> <CurrentWeapon></CurrentWeapon>
</c:Player> </c:Player>
<c:Transform> <c:Transform>
<Position X="-0.5" Y="0" Z="0"/> <Orientation X="0" Y="-0" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
<Entity name="PlayerModel"> <Entity name="Camera">
<Components> <Components>
<c:BlendOverride> <c:Camera>
<Master>BlendTreeUpper</Master> <NearClip>0.10000000149011612</NearClip>
<Slave>BlendTreeLower</Slave> <FarClip>300</FarClip>
</c:BlendOverride> </c:Camera>
<c:Shielded/>
<c:HiddenForLocalPlayer/>
<c:Model>
<GlowIntensity>2.2000000476837158</GlowIntensity>
<Resource>Models/Characters/Assault/AssaultBlue.mesh</Resource>
</c:Model>
<c:Transform> <c:Transform>
<Orientation X="0" Y="0.467000008" Z="0"/> <Position X="0" Y="1.27700007" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
<Entity name="PrimaryAttachment"> <Entity name="CameraModel">
<Components> <Components>
<c:BoneAttachment> <c:Model>
<BoneName>R_Arm_Weapon_Joint</BoneName> <Resource>Models/Widgets/Camera.mesh</Resource>
</c:BoneAttachment> <Visible>false</Visible>
<c:Spawner> </c:Model>
<EntityFile>Schema/Entities/WeaponAssaultBlueWorld.xml</EntityFile>
</c:Spawner>
<c:Transform> <c:Transform>
<Position X="0.159274966" Y="1.03443384" Z="-0.235393077"/> <Position X="0" Y="0.0331346765" Z="-0.0792061687"/>
<Orientation X="-0.0276949964" Y="-0.0416635424" Z="0.131935105"/> <Scale X="1.30000007" Y="1.50000012" Z="1"/>
</c:Transform> </c:Transform>
<c:WeaponAttachment> </Components>
<Weapon>AssaultWeapon</Weapon> <Children/>
<Person> </Entity>
<ThirdPerson/> <Entity name="HUD">
</Person> <Components>
</c:WeaponAttachment> <c:Spawner>
<EntityFile>Schema/Entities/PlayerHUD.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components> </Components>
<Children> <Children>
<Entity name="AssaultWeapon"> <Entity name="HUD">
<Components> <Components>
<c:Shielded/> <c:Transform>
<c:Model> <Position X="0" Y="0" Z="-0.5"/>
<GlowIntensity>1.5</GlowIntensity> </c:Transform>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
</c:Model>
<c:Transform/>
</Components> </Components>
<Children> <Children>
<Entity name="ReloadSpawner"> <Entity name="Crosshair">
<Components>
<c:Sprite>
<DepthSort>false</DepthSort>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Weapons/Crosshair/SmallThickHoleDot.png</DiffuseTexture>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.200000003"/>
<Scale X="0.0250000004" Y="0.0250000004" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="HitMarkerSpawner">
<Components> <Components>
<c:Spawner> <c:Spawner>
<EntityFile>Schema/Entities/ReloadEffectWorld.xml</EntityFile> <EntityFile>Schema/Entities/HitMarker.xml</EntityFile>
</c:Spawner> </c:Spawner>
<c:Transform/> <c:Transform/>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="Muzzle"> <Entity name="CapturePointHUD">
<Components> <Components>
<c:Transform> <c:Transform>
<Position X="0.00728808995" Y="0.0896582007" Z="-0.643795013"/> <Position X="0" Y="0.190541431" Z="0"/>
<Orientation X="6.27600002" Y="0.00499999989" Z="0.00600000005"/> <Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
<Entity name="WeaponMuzzleFlash"> <Entity name="BackgroundHexagon">
<Components> <Components>
<c:Spawner> <c:Sprite>
<EntityFile>Schema/Entities/MuzzleFlashBlue.xml</EntityFile> <DepthSort>false</DepthSort>
</c:Spawner> <Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<Color A="0.300000012" B="1" G="1" R="1"/>
</c:Sprite>
<c:Transform> <c:Transform>
<Position X="-8.41593719e-05" Y="-0.000816107844" Z="0.0612007342"/> <Position X="0" Y="0.919596612" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity name="ProgressionHexagon">
<Components>
<c:Fill>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill>
<c:CapturePointHUD>
<CapturePointNumber>2</CapturePointNumber>
</c:CapturePointHUD>
<c:Sprite>
<DepthSort>false</DepthSort>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BackgroundHexagon">
<Components>
<c:Sprite>
<DepthSort>false</DepthSort>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<Color A="0.300000012" B="1" G="1" R="1"/>
</c:Sprite>
<c:Transform>
<Position X="0.811270177" Y="0.440691769" Z="-0.100000001"/>
</c:Transform>
</Components>
<Children>
<Entity name="ProgressionHexagon">
<Components>
<c:Fill>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill>
<c:CapturePointHUD>
<CapturePointNumber>3</CapturePointNumber>
</c:CapturePointHUD>
<c:Sprite>
<DepthSort>false</DepthSort>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BackgroundHexagon">
<Components>
<c:Sprite>
<DepthSort>false</DepthSort>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Sprite>
<c:Transform>
<Position X="1.62788737" Y="0.919596612" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity name="ProgressionHexagon">
<Components>
<c:Fill>
<Percentage>1</Percentage>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill>
<c:CapturePointHUD>
<CapturePointNumber>4</CapturePointNumber>
</c:CapturePointHUD>
<c:Sprite>
<DepthSort>false</DepthSort>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BackgroundHexagon">
<Components>
<c:Sprite>
<DepthSort>false</DepthSort>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<Color A="0.300000012" B="1" G="1" R="1"/>
</c:Sprite>
<c:Transform>
<Position X="-0.820431828" Y="0.441878349" Z="-0.100000001"/>
</c:Transform>
</Components>
<Children>
<Entity name="ProgressionHexagon">
<Components>
<c:Fill>
<Color A="0.699999988" B="1" G="0.200000003" R="0"/>
</c:Fill>
<c:CapturePointHUD>
<CapturePointNumber>1</CapturePointNumber>
</c:CapturePointHUD>
<c:Sprite>
<DepthSort>false</DepthSort>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Orientation X="0" Y="0" Z="1.57079637"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="BackgroundHexagon">
<Components>
<c:Sprite>
<DepthSort>false</DepthSort>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<Color A="0.699999988" B="0" G="0" R="1"/>
</c:Sprite>
<c:Transform>
<Position X="-1.58304751" Y="0.919596612" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity name="ProgressionHexagon">
<Components>
<c:Fill>
<Percentage>1</Percentage>
<Color A="0.699999988" B="0" G="0" R="1"/>
</c:Fill>
<c:CapturePointHUD/>
<c:Sprite>
<DepthSort>false</DepthSort>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Core/UnitHexagon_Rotated.png</DiffuseTexture>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="0.00999999978"/>
<Orientation X="0" Y="0" Z="4.71238899"/>
<Scale X="0.800000012" Y="0.800000012" Z="0.800000012"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="KillFeed">
<Components>
<c:KillFeed/>
<c:Transform>
<Position X="0.486000031" Y="0.26000002" Z="0"/>
<Scale X="0.0149999997" Y="0.0149999997" Z="0.0149999997"/>
</c:Transform>
</Components>
<Children>
<Entity name="KillFeed1">
<Components>
<c:Text>
<Content></Content>
<Resource>Fonts/Hind-Edited.otf,64</Resource>
<Alignment>
<Right/>
</Alignment>
</c:Text>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="KillFeed2">
<Components>
<c:Text>
<Content></Content>
<Resource>Fonts/Hind-Edited.otf,64</Resource>
<Alignment>
<Right/>
</Alignment>
</c:Text>
<c:Transform>
<Position X="0" Y="-1" Z="0"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children/> <Children/>
</Entity> </Entity>
<Entity name="WeaponMuzzleRay"> <Entity name="KillFeed3">
<Components> <Components>
<c:Spawner> <c:Text>
<EntityFile>Schema/Entities/RayAssaultBlue.xml</EntityFile> <Content></Content>
</c:Spawner> <Resource>Fonts/Hind-Edited.otf,64</Resource>
<Alignment>
<Right/>
</Alignment>
</c:Text>
<c:Transform> <c:Transform>
<Position X="0.00179657922" Y="-0.00304772682" Z="-0.334699303"/> <Position X="0" Y="-2" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="CapturePointArrow">
<Components>
<c:Team>
<Team>
<Blue/>
</Team>
</c:Team>
<c:CapturePointArrowHUD/>
<c:Model>
<Resource>Models/Widgets/Arrows/ArrowBlue.mesh</Resource>
<Shadow>false</Shadow>
</c:Model>
<c:Transform>
<Position X="0" Y="0.198665127" Z="0"/>
<Orientation X="0.0531693883" Y="-2.13055706" Z="0"/>
<Scale X="0.0500000007" Y="0.0500000007" Z="0.0500000007"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="HealthHUDAssault">
<Components>
<c:Transform>
<Position X="-0.263000011" Y="-0.185000002" Z="0"/>
<Orientation X="5.83699989" Y="0" Z="4.71199989"/>
</c:Transform>
</Components>
<Children>
<Entity name="HealthText">
<Components>
<c:Fill>
<Percentage>1</Percentage>
<Color A="1" B="1" G="0" R="0"/>
</c:Fill>
<c:HealthHUD/>
<c:Text>
<Content>100/100</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="0.505882382" B="1.56862748" G="1.17647064" R="0"/>
</c:Text>
<c:Transform>
<Position X="0.0200000014" Y="-0.101000004" Z="0.00300000003"/>
<Orientation X="0" Y="0" Z="1.57070696"/>
<Scale X="0.0350000001" Y="0.0350000001" Z="0.0350000001"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="HealthBar">
<Components>
<c:Fill>
<Percentage>1</Percentage>
<Color A="0.301960796" B="1" G="0" R="0"/>
</c:Fill>
<c:HealthHUD/>
<c:Sprite>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/HealthHUD3.png</DiffuseTexture>
<Color A="0.588235319" B="0" G="0" R="0"/>
</c:Sprite>
<c:Transform>
<Scale X="0.106000006" Y="0.333000004" Z="0.150000006"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="BoostIcons">
<Components>
<c:BoostIconsHUD/>
<c:Transform>
<Position X="0" Y="0.00500000035" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity name="Assault">
<Components>
<c:Fill>
<Color A="1" B="0" G="0" R="1.96078432"/>
</c:Fill>
<c:Sprite>
<DepthSort>false</DepthSort>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Icons/Boosts/Assault-01.png</DiffuseTexture>
<Color A="0.392156869" B="0.196078435" G="0.196078435" R="0.352941185"/>
</c:Sprite>
<c:Transform>
<Position X="0.0250000004" Y="0.0650000051" Z="0"/>
<Orientation X="0" Y="0" Z="3.14199996"/>
<Scale X="0.0399999991" Y="0.0399999991" Z="0.5"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Defender">
<Components>
<c:Fill>
<Color A="1" B="0" G="0" R="1.96078432"/>
</c:Fill>
<c:Sprite>
<DepthSort>false</DepthSort>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Icons/Boosts/Defender-01.png</DiffuseTexture>
<Color A="0.392156869" B="0.196078435" G="0.196078435" R="0.352941185"/>
</c:Sprite>
<c:Transform>
<Position X="0.0240000002" Y="0.104000002" Z="0"/>
<Orientation X="0" Y="0" Z="3.14199996"/>
<Scale X="0.0399999991" Y="0.0400000028" Z="0.165000007"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Sniper">
<Components>
<c:Fill>
<Color A="1" B="0" G="0" R="1.96078432"/>
</c:Fill>
<c:Sprite>
<DepthSort>false</DepthSort>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Icons/Boosts/Sniper-01.png</DiffuseTexture>
<Color A="0.392156869" B="0.196078435" G="0.196078435" R="0.352941185"/>
</c:Sprite>
<c:Transform>
<Position X="0.0240000002" Y="0.145000011" Z="0"/>
<Orientation X="0" Y="0" Z="3.14199996"/>
<Scale X="0.0400000028" Y="0.0400000028" Z="0.165000007"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="ShiftAbility">
<Components>
<c:AbilityCooldownHUD/>
<c:Fill>
<Color A="1" B="0.392156869" G="0.392156869" R="0.392156869"/>
</c:Fill>
<c:Sprite>
<DepthSort>false</DepthSort>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Icons/Abilities/Long/Superman-01.png</DiffuseTexture>
<Color A="1" B="0.20784314" G="1.17647064" R="0.192156866"/>
</c:Sprite>
<c:Transform>
<Position X="0.0250000004" Y="0.0100000007" Z="0"/>
<Orientation X="0" Y="0" Z="1.57000005"/>
<Scale X="0.0800000057" Y="0.029000001" Z="1"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children/> <Children/>
@@ -125,17 +514,103 @@
</Entity> </Entity>
</Children> </Children>
</Entity> </Entity>
<Entity name="Weapons">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="PrimaryAttachment">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/WeaponAssaultRedView.xml</EntityFile>
</c:Spawner>
<c:Transform/>
<c:WeaponAttachment>
<Weapon>AssaultWeapon</Weapon>
</c:WeaponAttachment>
</Components>
<Children/>
</Entity>
<Entity name="SecondaryAttachment">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/WeaponSidearmAssaultRedView.xml</EntityFile>
</c:Spawner>
<c:Transform/>
<c:WeaponAttachment>
<Weapon>SidearmWeapon</Weapon>
</c:WeaponAttachment>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="ThirdPersonCamera">
<Components>
<c:Camera>
<NearClip>0.10000000149011612</NearClip>
<FarClip>300</FarClip>
</c:Camera>
<c:Model>
<Resource>Models/Widgets/Camera.mesh</Resource>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="-0.284000009" Y="1.83800006" Z="1.18900001"/>
<Orientation X="5.95600033" Y="0" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="PlayerModel">
<Components>
<c:BlendOverride>
<Master>BlendTreeUpper</Master>
<Slave>BlendTreeLower</Slave>
</c:BlendOverride>
<c:Shielded/>
<c:HiddenForLocalPlayer/>
<c:Model>
<GlowIntensity>2.2000000476837158</GlowIntensity>
<Resource>Models/Characters/Assault/AssaultRed.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="PrimaryAttachment">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Spawner>
<EntityFile>Schema/Entities/WeaponAssaultRedWorld.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.165036291" Y="1.03316653" Z="-0.230842277"/>
<Orientation X="-0.0310075935" Y="-0.0666775182" Z="0.132169068"/>
</c:Transform>
<c:WeaponAttachment>
<Weapon>AssaultWeapon</Weapon>
<Person>
<ThirdPerson/>
</Person>
</c:WeaponAttachment>
</Components>
<Children/>
</Entity>
<Entity name="SecondaryAttachment"> <Entity name="SecondaryAttachment">
<Components> <Components>
<c:BoneAttachment> <c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName> <BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment> </c:BoneAttachment>
<c:Spawner> <c:Spawner>
<EntityFile>Schema/Entities/SidearmWeaponBlueWorld.xml</EntityFile> <EntityFile>Schema/Entities/SidearmWeaponRedWorld.xml</EntityFile>
</c:Spawner> </c:Spawner>
<c:Transform> <c:Transform>
<Position X="0.159274966" Y="1.03443384" Z="-0.235393077"/> <Position X="0.165036291" Y="1.03316653" Z="-0.230842277"/>
<Orientation X="-0.0276949964" Y="-0.0416635424" Z="0.131935105"/> <Orientation X="-0.0310075935" Y="-0.0666775182" Z="0.132169068"/>
</c:Transform> </c:Transform>
<c:WeaponAttachment> <c:WeaponAttachment>
<Weapon>SidearmWeapon</Weapon> <Weapon>SidearmWeapon</Weapon>
@@ -202,7 +677,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>CrouchStrafeLeftF</AnimationName> <AnimationName>CrouchStrafeLeftF</AnimationName>
<Time>0.44988618375479206</Time> <Time>0.47961568648540975</Time>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
@@ -213,7 +688,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>CrouchStrafeRightF</AnimationName> <AnimationName>CrouchStrafeRightF</AnimationName>
<Time>0.37720764570557463</Time> <Time>0.40693714843619233</Time>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
@@ -226,7 +701,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>CrouchWalkF</AnimationName> <AnimationName>CrouchWalkF</AnimationName>
<Time>0.15558163088297761</Time> <Time>0.1853111336135953</Time>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
@@ -239,7 +714,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>CrouchF</AnimationName> <AnimationName>CrouchF</AnimationName>
<Time>1.8288091278296688</Time> <Time>1.8585386305602865</Time>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
@@ -282,7 +757,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>WalkF</AnimationName> <AnimationName>WalkF</AnimationName>
<Time>0.84192543677924192</Time> <Time>0.87165493950985962</Time>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
@@ -293,7 +768,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>RunF</AnimationName> <AnimationName>RunF</AnimationName>
<Time>0.28035050282109175</Time> <Time>0.33980950828232714</Time>
<Speed>2</Speed> <Speed>2</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
@@ -317,7 +792,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>StrafeLeftF</AnimationName> <AnimationName>StrafeLeftF</AnimationName>
<Time>0.88305913822256876</Time> <Time>0.94251814368380415</Time>
<Speed>2</Speed> <Speed>2</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
@@ -329,7 +804,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>StrafeRightF</AnimationName> <AnimationName>StrafeRightF</AnimationName>
<Time>0.96047014705853506</Time> <Time>0.019929152519770454</Time>
<Speed>2</Speed> <Speed>2</Speed>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
@@ -345,7 +820,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>IdleF</AnimationName> <AnimationName>IdleF</AnimationName>
<Time>1.7574641124802284</Time> <Time>0.55386718012173475</Time>
<Play>true</Play> <Play>true</Play>
</c:Animation> </c:Animation>
<c:Transform/> <c:Transform/>
@@ -532,7 +1007,7 @@
<Components> <Components>
<c:Animation> <c:Animation>
<AnimationName>IdleAssaultRifleU</AnimationName> <AnimationName>IdleAssaultRifleU</AnimationName>
<Time>1.4730651229275153</Time> <Time>1.502794625658133</Time>
<Play>true</Play> <Play>true</Play>
<Additive>true</Additive> <Additive>true</Additive>
</c:Animation> </c:Animation>
@@ -646,15 +1121,15 @@
<BoneName>L_Elbow</BoneName> <BoneName>L_Elbow</BoneName>
</c:BoneAttachment> </c:BoneAttachment>
<c:Transform> <c:Transform>
<Position X="-0.0641395152" Y="0.971834779" Z="-0.393912911"/> <Position X="-0.0546795987" Y="0.970895708" Z="-0.395071507"/>
<Orientation X="-2.71834111" Y="-1.16788483" Z="-2.30780911"/> <Orientation X="-2.67347836" Y="-1.14967656" Z="-2.35179591"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
<Entity name="Upper"> <Entity name="Upper">
<Components> <Components>
<c:PointLight> <c:PointLight>
<Color A="1" B="1" G="0.784313738" R="0"/> <Color A="1" B="0" G="0" R="1"/>
<Intensity>0.10000000149011612</Intensity> <Intensity>0.10000000149011612</Intensity>
</c:PointLight> </c:PointLight>
<c:Transform> <c:Transform>
@@ -666,7 +1141,7 @@
<Entity name="Lower"> <Entity name="Lower">
<Components> <Components>
<c:PointLight> <c:PointLight>
<Color A="1" B="1" G="0.784313738" R="0"/> <Color A="1" B="0" G="0" R="1"/>
<Intensity>0.10000000149011612</Intensity> <Intensity>0.10000000149011612</Intensity>
</c:PointLight> </c:PointLight>
<c:Transform> <c:Transform>
@@ -683,15 +1158,15 @@
<BoneName>R_Elbow</BoneName> <BoneName>R_Elbow</BoneName>
</c:BoneAttachment> </c:BoneAttachment>
<c:Transform> <c:Transform>
<Position X="0.311632752" Y="1.00616109" Z="-0.0154332817"/> <Position X="0.311819345" Y="1.00506735" Z="-0.00708915293"/>
<Orientation X="1.7501713" Y="1.40668344" Z="0.63290441"/> <Orientation X="1.66802835" Y="1.3856616" Z="0.553554595"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
<Entity name="Upper"> <Entity name="Upper">
<Components> <Components>
<c:PointLight> <c:PointLight>
<Color A="1" B="1" G="0.784313738" R="0"/> <Color A="1" B="0" G="0" R="1"/>
<Intensity>0.10000000149011612</Intensity> <Intensity>0.10000000149011612</Intensity>
</c:PointLight> </c:PointLight>
<c:Transform> <c:Transform>
@@ -703,7 +1178,7 @@
<Entity name="Lower"> <Entity name="Lower">
<Components> <Components>
<c:PointLight> <c:PointLight>
<Color A="1" B="1" G="0.784313738" R="0"/> <Color A="1" B="0" G="0" R="1"/>
<Intensity>0.10000000149011612</Intensity> <Intensity>0.10000000149011612</Intensity>
</c:PointLight> </c:PointLight>
<c:Transform> <c:Transform>
@@ -720,15 +1195,15 @@
<BoneName>Head</BoneName> <BoneName>Head</BoneName>
</c:BoneAttachment> </c:BoneAttachment>
<c:Transform> <c:Transform>
<Position X="0.0810014606" Y="1.25193644" Z="-0.150023431"/> <Position X="0.0847049356" Y="1.25094736" Z="-0.146904141"/>
<Orientation X="-0.278524429" Y="-0.110433489" Z="-0.180452675"/> <Orientation X="-0.270355761" Y="-0.134028792" Z="-0.181556195"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
<Entity name="Left"> <Entity name="Left">
<Components> <Components>
<c:PointLight> <c:PointLight>
<Color A="1" B="1" G="0.784313738" R="0"/> <Color A="1" B="0" G="0.0156862754" R="1"/>
<Intensity>0.10000000149011612</Intensity> <Intensity>0.10000000149011612</Intensity>
</c:PointLight> </c:PointLight>
<c:Transform> <c:Transform>
@@ -740,7 +1215,7 @@
<Entity name="Right"> <Entity name="Right">
<Components> <Components>
<c:PointLight> <c:PointLight>
<Color A="1" B="1" G="0.784313738" R="0"/> <Color A="1" B="0" G="0" R="1"/>
<Intensity>0.10000000149011612</Intensity> <Intensity>0.10000000149011612</Intensity>
</c:PointLight> </c:PointLight>
<c:Transform> <c:Transform>
@@ -758,12 +1233,12 @@
<PositionOffset X="-0.116000004" Y="0.0500000007" Z="0.0360000022"/> <PositionOffset X="-0.116000004" Y="0.0500000007" Z="0.0360000022"/>
</c:BoneAttachment> </c:BoneAttachment>
<c:PointLight> <c:PointLight>
<Color A="1" B="1" G="0.784313738" R="0"/> <Color A="1" B="0" G="0" R="1"/>
<Intensity>0.10000000149011612</Intensity> <Intensity>0.10000000149011612</Intensity>
</c:PointLight> </c:PointLight>
<c:Transform> <c:Transform>
<Position X="-0.188116193" Y="0.722146571" Z="0.020738611"/> <Position X="-0.187708378" Y="0.720764816" Z="0.0189282075"/>
<Orientation X="0.68511039" Y="-0.00414709467" Z="-0.0733199194"/> <Orientation X="0.690089703" Y="-0.0030452935" Z="-0.0742322952"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children/> <Children/>
@@ -775,12 +1250,12 @@
<PositionOffset X="0.0800000057" Y="0.0730000064" Z="0.064000003"/> <PositionOffset X="0.0800000057" Y="0.0730000064" Z="0.064000003"/>
</c:BoneAttachment> </c:BoneAttachment>
<c:PointLight> <c:PointLight>
<Color A="1" B="1" G="0.784313738" R="0"/> <Color A="1" B="0" G="0" R="1"/>
<Intensity>0.10000000149011612</Intensity> <Intensity>0.10000000149011612</Intensity>
</c:PointLight> </c:PointLight>
<c:Transform> <c:Transform>
<Position X="0.149692252" Y="0.745154798" Z="0.0894331336"/> <Position X="0.149033397" Y="0.743774891" Z="0.0911710933"/>
<Orientation X="-0.00521934591" Y="-0.594766259" Z="0.242353484"/> <Orientation X="0.00418904377" Y="-0.590482414" Z="0.240698725"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children/> <Children/>
@@ -799,7 +1274,7 @@
<Entity name="Outside"> <Entity name="Outside">
<Components> <Components>
<c:PointLight> <c:PointLight>
<Color A="1" B="1" G="0.784313738" R="0"/> <Color A="1" B="0" G="0" R="1"/>
<Intensity>0.10000000149011612</Intensity> <Intensity>0.10000000149011612</Intensity>
</c:PointLight> </c:PointLight>
<c:Transform> <c:Transform>
@@ -811,7 +1286,7 @@
<Entity name="Inside"> <Entity name="Inside">
<Components> <Components>
<c:PointLight> <c:PointLight>
<Color A="1" B="1" G="0.784313738" R="0"/> <Color A="1" B="0" G="0" R="1"/>
<Intensity>0.10000000149011612</Intensity> <Intensity>0.10000000149011612</Intensity>
</c:PointLight> </c:PointLight>
<c:Transform> <c:Transform>
@@ -828,15 +1303,15 @@
<BoneName>R_Leg_Bottom</BoneName> <BoneName>R_Leg_Bottom</BoneName>
</c:BoneAttachment> </c:BoneAttachment>
<c:Transform> <c:Transform>
<Position X="0.184227288" Y="0.324282408" Z="0.0380233303"/> <Position X="0.184887171" Y="0.323244393" Z="0.0367886424"/>
<Orientation X="-0.709708989" Y="-0.647283316" Z="0.337633669"/> <Orientation X="-0.714135528" Y="-0.644820809" Z="0.337111086"/>
</c:Transform> </c:Transform>
</Components> </Components>
<Children> <Children>
<Entity name="Inside"> <Entity name="Inside">
<Components> <Components>
<c:PointLight> <c:PointLight>
<Color A="1" B="1" G="0.784313738" R="0"/> <Color A="1" B="0" G="0" R="1"/>
<Intensity>0.10000000149011612</Intensity> <Intensity>0.10000000149011612</Intensity>
</c:PointLight> </c:PointLight>
<c:Transform> <c:Transform>
@@ -848,7 +1323,7 @@
<Entity name="Outside"> <Entity name="Outside">
<Components> <Components>
<c:PointLight> <c:PointLight>
<Color A="1" B="1" G="0.784313738" R="0"/> <Color A="1" B="0" G="0" R="1"/>
<Intensity>0.10000000149011612</Intensity> <Intensity>0.10000000149011612</Intensity>
</c:PointLight> </c:PointLight>
<c:Transform> <c:Transform>
@@ -863,6 +1338,80 @@
</Entity> </Entity>
</Children> </Children>
</Entity> </Entity>
<Entity name="AABBStanding">
<Components>
<c:Model>
<Resource>Models/Core/UnitCube.mesh</Resource>
<Color A="0.427450985" B="1" G="1" R="1"/>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="0" Y="0.772000015" Z="0"/>
<Scale X="1" Y="1.60000002" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="AABBCrouching">
<Components>
<c:Model>
<Resource>Models/Core/UnitCube.mesh</Resource>
<Color A="0.745098054" B="1" G="0" R="1"/>
<Visible>false</Visible>
</c:Model>
<c:Transform>
<Position X="0" Y="0.772000015" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="PlayerName">
<Components>
<c:Text>
<Content></Content>
<Resource>Fonts/DroidSans.ttf,100</Resource>
<Color A="1" B="0" G="1" R="0"/>
</c:Text>
<c:Transform>
<Position X="0" Y="1.64533126" Z="-0.0171071123"/>
<Orientation X="0" Y="3.14199996" Z="0"/>
<Scale X="0.100000001" Y="0.113000005" Z="0.5"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Indicator">
<Components>
<c:Sprite>
<DepthSort>false</DepthSort>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Icons/Arrow.png</DiffuseTexture>
<Color A="1" B="0.156862751" G="0.156862751" R="1"/>
</c:Sprite>
<c:HiddenForLocalPlayer/>
<c:SpriteIndicator>
<MinScale>50</MinScale>
<VisibleForSingleTeamOnly>true</VisibleForSingleTeamOnly>
</c:SpriteIndicator>
<c:Transform>
<Position X="0" Y="1.84019077" Z="0"/>
<Scale X="0.300000012" Y="0.300000012" Z="0.300000012"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="ShieldAttachment">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/DefenderShield.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0" Y="0.859000027" Z="-0.976999998"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children> </Children>
</Entity> </Entity>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="RayBlue" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Lifetime>
<Lifetime>0.079999998211860657</Lifetime>
</c:Lifetime>
<c:NetworkComponent/>
<c:Transform/>
</Components>
<Children>
<Entity>
<Components>
<c:Sprite>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Effects/NewRay5.png</DiffuseTexture>
<Color A="1" B="0.588235319" G="0.588235319" R="2.35294127"/>
<KeepRatio>true</KeepRatio>
</c:Sprite>
<c:Transform>
<Orientation X="0" Y="-1.57099998" Z="0"/>
<Scale X="1" Y="0.0700000003" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:Sprite>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Effects/NewRay5.png</DiffuseTexture>
<Color A="1" B="0.588235319" G="0.588235319" R="2.35294127"/>
<KeepRatio>true</KeepRatio>
</c:Sprite>
<c:Transform>
<Orientation X="0" Y="4.71218538" Z="3.14199996"/>
<Scale X="1" Y="0.0700000003" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="RayBlue" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Lifetime>
<Lifetime>0.079999998211860657</Lifetime>
</c:Lifetime>
<c:NetworkComponent/>
<c:Transform/>
</Components>
<Children>
<Entity>
<Components>
<c:Sprite>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Effects/NewRay7.png</DiffuseTexture>
<Color A="1" B="0.588235319" G="0.588235319" R="2.35294127"/>
<KeepRatio>true</KeepRatio>
</c:Sprite>
<c:Transform>
<Orientation X="0" Y="-1.57099998" Z="0"/>
<Scale X="1" Y="0.0700000003" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:Sprite>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Effects/NewRay7.png</DiffuseTexture>
<Color A="1" B="0.588235319" G="0.588235319" R="2.35294127"/>
<KeepRatio>true</KeepRatio>
</c:Sprite>
<c:Transform>
<Orientation X="0" Y="4.71218538" Z="3.14199996"/>
<Scale X="1" Y="0.0700000003" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="RayBlue" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Lifetime>
<Lifetime>0.080000000000000002</Lifetime>
</c:Lifetime>
<c:Fade>
<FadeTime>0.080000000000000002</FadeTime>
</c:Fade>
<c:NetworkComponent/>
<c:Transform/>
</Components>
<Children>
<Entity>
<Components>
<c:Sprite>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Effects/NewRay5.png</DiffuseTexture>
<Color A="1" B="0.588235319" G="0.588235319" R="2.35294127"/>
<KeepRatio>true</KeepRatio>
</c:Sprite>
<c:Transform>
<Orientation X="0" Y="-1.57099998" Z="0"/>
<Scale X="1" Y="0.0250000004" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity>
<Components>
<c:Sprite>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Effects/NewRay5.png</DiffuseTexture>
<Color A="1" B="0.588235319" G="0.588235319" R="2.35294127"/>
<KeepRatio>true</KeepRatio>
</c:Sprite>
<c:Transform>
<Orientation X="0" Y="4.71218538" Z="3.14199996"/>
<Scale X="1" Y="0.0250000004" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="WeaponModel" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd"> <Entity name="ReloadEffect" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components> <Components>
<c:Lifetime> <c:Lifetime>
<Lifetime>2</Lifetime> <Lifetime>1</Lifetime>
</c:Lifetime> </c:Lifetime>
<c:ExplosionEffect> <c:ExplosionEffect>
<ColorByDistance>true</ColorByDistance> <Velocity X="0" Y="1" Z="0"/>
<Velocity X="3.33300018" Y="0.0320000015" Z="0"/> <ExplosionOrigin X="-0.0450000018" Y="0.148000002" Z="-0.646000028"/>
<ExplosionOrigin X="0" Y="0.0790000036" Z="-0.329000026"/> <ExplosionDuration>1</ExplosionDuration>
<ExponentialAccelaration>true</ExponentialAccelaration> <EndColor A="0" B="3.92156863" G="0.545098066" R="1"/>
<EndColor A="0" B="1" G="1" R="19.6078434"/>
<Randomness>true</Randomness> <Randomness>true</Randomness>
</c:ExplosionEffect> </c:ExplosionEffect>
<c:Model> <c:Model>
<Resource>Models/Weapons/Red/AssaultWeaponRed.mesh</Resource> <Resource>Models/Weapons/Red/AssaultWeaponRed.mesh</Resource>
<Transparent>true</Transparent>
</c:Model> </c:Model>
<c:Transform/> <c:Transform/>
</Components> </Components>
@@ -6,12 +6,14 @@
<Lifetime>2</Lifetime> <Lifetime>2</Lifetime>
</c:Lifetime> </c:Lifetime>
<c:ExplosionEffect> <c:ExplosionEffect>
<ColorByDistance>true</ColorByDistance> <Velocity X="1.78000009" Y="0.0320000015" Z="0"/>
<Velocity X="1.63300014" Y="0.0320000015" Z="0"/> <ExplosionOrigin X="0" Y="0.142000005" Z="-0.659000039"/>
<ExplosionOrigin X="0" Y="0.0790000036" Z="-0.329000026"/> <EndColor A="0" B="19.6078434" G="0.00392156886" R="1.96078432"/>
<ExponentialAccelaration>true</ExponentialAccelaration> <RandomnessScalar>1.3399996757507324</RandomnessScalar>
<EndColor A="0" B="1" G="1" R="19.6078434"/>
<Randomness>true</Randomness> <Randomness>true</Randomness>
<ColorByDistance>true</ColorByDistance>
<ExponentialAccelaration>true</ExponentialAccelaration>
<ColorDistanceScalar>5.0899982452392578</ColorDistanceScalar>
</c:ExplosionEffect> </c:ExplosionEffect>
<c:Model> <c:Model>
<Resource>Models/Weapons/Red/AssaultWeaponRed.mesh</Resource> <Resource>Models/Weapons/Red/AssaultWeaponRed.mesh</Resource>
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="SidearmWeapon" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Shielded/>
<c:Model>
<Resource>Models/Weapons/Red/SecondaryWeaponRed.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="Muzzle">
<Components>
<c:Transform>
<Position X="-0.0169804785" Y="-0.0188358482" Z="-0.222064406"/>
</c:Transform>
</Components>
<Children>
<Entity name="WeaponMuzzleRay">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RaySideArmRed.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0" Y="0.125075191" Z="-0.206788138"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="WeaponMuzzleFlash">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/MuzzleFlashSideArmRed.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.0240342002" Y="0.116005458" Z="-0.0419839472"/>
<Scale X="0.5" Y="0.5" Z="0.5"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,233 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="Hands" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:BlendAdditive>
<Adder>MovementBlend</Adder>
<Receiver>ActionBlend</Receiver>
</c:BlendAdditive>
<c:Model>
<Resource>Models/Characters/Assault/FirstPersonAssaultRed.mesh</Resource>
<Shadow>false</Shadow>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="ActionBlend">
<Components>
<c:Blend>
<Pose1>Fire</Pose1>
<Pose2>Reload</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Reload">
<Components>
<c:Animation>
<AnimationName>ReloadSwitchF</AnimationName>
<Speed>0.5</Speed>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Fire">
<Components>
<c:Animation>
<AnimationName>ShootRifleF</AnimationName>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="MovementBlend">
<Components>
<c:Blend>
<Pose1>Idle</Pose1>
<Pose2>Run</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Run">
<Components>
<c:Animation>
<AnimationName>RunF</AnimationName>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Idle">
<Components>
<c:Animation>
<AnimationName>IdleF</AnimationName>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="ViewModel">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<GlowIntensity>1.5</GlowIntensity>
<Resource>Models/Weapons/Red/AssaultWeaponRed.mesh</Resource>
<Shadow>false</Shadow>
</c:Model>
<c:Transform>
<Position X="0.120748267" Y="-0.22843127" Z="-0.181454599"/>
<Orientation X="0.0102799674" Y="-0.00312504289" Z="0.0428140014"/>
</c:Transform>
</Components>
<Children>
<Entity name="ReloadSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/WeaponAssaultReloadEffectViewRed.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Muzzle">
<Components>
<c:Transform>
<Position X="0.00728808995" Y="0.0896582007" Z="-0.643795013"/>
<Orientation X="6.27600002" Y="0.00499999989" Z="0.00600000005"/>
</c:Transform>
</Components>
<Children>
<Entity name="WeaponMuzzleFlash">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/MuzzleFlashRed.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.000221854658" Y="-0.000376355601" Z="0"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="WeaponMuzzleRay">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RayAssaultRed.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.00179657922" Y="-0.00304772682" Z="-0.334699303"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="AmmoHUD">
<Components>
<c:BoneAttachment>
<BoneName>R_Ammo_Joint</BoneName>
<ScaleOffset X="0.5" Y="0.5" Z="1"/>
<InheritScale>true</InheritScale>
</c:BoneAttachment>
<c:Transform>
<Position X="0.0540265888" Y="-0.0954296291" Z="-0.255526036"/>
<Orientation X="0.000777846028" Y="0.0774231106" Z="0.00124278688"/>
<Scale X="0.25000006" Y="0.250000149" Z="0.500000238"/>
</c:Transform>
</Components>
<Children>
<Entity name="Background">
<Components>
<c:Sprite>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<Color A="0.588235319" B="0" G="0" R="0"/>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="-0.00200000009"/>
<Scale X="0.119999997" Y="0.119999997" Z="0.119999997"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Text">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="MagazineAmmo">
<Components>
<c:Text>
<Content>32</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:TextFieldReader>
<ParentEntityName></ParentEntityName>
<ComponentType>AssaultWeapon</ComponentType>
<Field>MagazineAmmo</Field>
</c:TextFieldReader>
<c:Transform>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Ammo">
<Components>
<c:Text>
<Content>320</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:TextFieldReader>
<ParentEntityName></ParentEntityName>
<ComponentType>AssaultWeapon</ComponentType>
<Field>Ammo</Field>
</c:TextFieldReader>
<c:Transform>
<Position X="5.2833886e-05" Y="-0.0407950208" Z="0"/>
<Scale X="0.0399999991" Y="0.0399999991" Z="0.0399999991"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="FriendlyBoostAttachment">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/FriendlyBoostRedHUD.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="-0.000110394583" Y="-0.0891034827" Z="6.07890324e-05"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="AssaultWeapon" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Shielded/>
<c:Model>
<Resource>Models/Weapons/Red/AssaultWeaponRed.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="ReloadSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/ReloadEffectWorldRed.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Muzzle">
<Components>
<c:Transform>
<Position X="0.00728808995" Y="0.0896582007" Z="-0.643795013"/>
<Orientation X="6.27600002" Y="0.00499999989" Z="0.00600000005"/>
</c:Transform>
</Components>
<Children>
<Entity name="WeaponMuzzleFlash">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/MuzzleFlashRed.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="-8.41593719e-05" Y="-0.000816107844" Z="0.0612007342"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="WeaponMuzzleRay">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RayAssaultRed.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.00179657922" Y="-0.00304772682" Z="-0.334699303"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="ReloadEffect" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Lifetime>
<Lifetime>2</Lifetime>
</c:Lifetime>
<c:Transform/>
</Components>
<Children>
<Entity name="Out">
<Components>
<c:ExplosionEffect>
<Velocity X="0" Y="1" Z="0"/>
<ExplosionOrigin X="-0.0450000018" Y="0.148000002" Z="-0.646000028"/>
<TimeSinceDeath>1</TimeSinceDeath>
<Delay>1</Delay>
<Speed>-1</Speed>
<ExplosionDuration>1</ExplosionDuration>
<EndColor A="0" B="3.92156863" G="0.545098066" R="1"/>
<Randomness>true</Randomness>
</c:ExplosionEffect>
<c:Model>
<Resource>Models/Weapons/Red/AssaultWeaponRed.mesh</Resource>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="In">
<Components>
<c:Lifetime>
<Lifetime>1</Lifetime>
</c:Lifetime>
<c:ExplosionEffect>
<Velocity X="0" Y="1" Z="0"/>
<ExplosionOrigin X="-0.0450000018" Y="0.148000002" Z="-0.646000028"/>
<ExplosionDuration>1</ExplosionDuration>
<EndColor A="0" B="3.92156863" G="0.545098066" R="1"/>
<Randomness>true</Randomness>
</c:ExplosionEffect>
<c:Model>
<Resource>Models/Weapons/Red/AssaultWeaponRed.mesh</Resource>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
@@ -0,0 +1,303 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="Hands" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:BlendAdditive>
<Adder>MovementBlend</Adder>
<Receiver>FinalBlend</Receiver>
</c:BlendAdditive>
<c:Model>
<Resource>Models/Characters/Defender/FirstPersonDefenderRed.mesh</Resource>
<Shadow>false</Shadow>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="FinalBlend">
<Components>
<c:Blend>
<Pose1>ActionBlend</Pose1>
<Pose2>Shield</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Shield">
<Components>
<c:Animation>
<AnimationName>ActivateShieldF</AnimationName>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="ActionBlend">
<Components>
<c:Blend>
<Pose1>Fire</Pose1>
<Pose2>ReloadBlend</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Fire">
<Components>
<c:Animation>
<AnimationName>ShootShotgunF</AnimationName>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="ReloadBlend">
<Components>
<c:Blend>
<Pose1>ReloadLoop</Pose1>
<Pose2>ReloadTransitionBlend</Pose2>
<Weight>1</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="ReloadLoop">
<Components>
<c:Animation>
<AnimationName>ShotgunReloadTwoF</AnimationName>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="ReloadTransitionBlend">
<Components>
<c:Blend>
<Pose1>ReloadStart</Pose1>
<Pose2>ReloadEnd</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="ReloadStart">
<Components>
<c:Animation>
<AnimationName>ShotgunReloadOneF</AnimationName>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="ReloadEnd">
<Components>
<c:Animation>
<AnimationName>ShotgunReloadThreeF</AnimationName>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
<Entity name="MovementBlend">
<Components>
<c:Blend>
<Pose1>Idle</Pose1>
<Pose2>Run</Pose2>
<Weight>0</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Idle">
<Components>
<c:Animation>
<AnimationName>IdleF</AnimationName>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Run">
<Components>
<c:Animation>
<AnimationName>RunF</AnimationName>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="AmmoHUD">
<Components>
<c:BoneAttachment>
<BoneName>R_Ammo_Joint</BoneName>
<ScaleOffset X="0.600000024" Y="0.600000024" Z="0.600000024"/>
<InheritScale>true</InheritScale>
</c:BoneAttachment>
<c:Transform>
<Position X="0.0540262833" Y="-0.0954347998" Z="-0.225546926"/>
<Orientation X="0.00124507793" Y="0.077417776" Z="0.00737103401"/>
<Scale X="0.300000012" Y="0.300000042" Z="0.299999952"/>
</c:Transform>
</Components>
<Children>
<Entity name="Background">
<Components>
<c:Sprite>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<Color A="0.588235319" B="0" G="0" R="0"/>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="-0.00200000009"/>
<Scale X="0.119999997" Y="0.119999997" Z="0.119999997"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Text">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="Ammo">
<Components>
<c:Text>
<Content>38</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:TextFieldReader>
<ParentEntityName></ParentEntityName>
<ComponentType>DefenderWeapon</ComponentType>
<Field>Ammo</Field>
</c:TextFieldReader>
<c:Transform>
<Position X="5.2833886e-05" Y="-0.0407950208" Z="0"/>
<Scale X="0.0399999991" Y="0.0399999991" Z="0.0399999991"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="MagazineAmmo">
<Components>
<c:Text>
<Content>5</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:TextFieldReader>
<ParentEntityName></ParentEntityName>
<ComponentType>DefenderWeapon</ComponentType>
<Field>MagazineAmmo</Field>
</c:TextFieldReader>
<c:Transform>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="FriendlyBoostAttachment">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/FriendlyBoostRedHUD.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="-0.0762779638" Y="-0.04478902" Z="6.07890324e-05"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="WeaponOrigin">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="ViewModel">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Red/DefenderWeaponRed.mesh</Resource>
<Shadow>false</Shadow>
</c:Model>
<c:Transform>
<Position X="0.120748043" Y="-0.228436321" Z="-0.151475564"/>
<Orientation X="0.0102800643" Y="-0.00312487315" Z="0.0428144038"/>
</c:Transform>
</Components>
<Children>
<Entity name="ReloadSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/ReloadEffectView.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="Muzzle">
<Components>
<c:Transform>
<Position X="0.119734153" Y="-0.145251781" Z="-0.564532101"/>
</c:Transform>
</Components>
<Children>
<Entity name="WeaponMuzzleRay">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RayDefenderRed.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0" Y="0" Z="-0.109966502"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="WeaponMuzzleFlash">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/MuzzleFlashRed.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.0201820824" Y="0" Z="0"/>
<Scale X="1.5" Y="1.5" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="ThirdPersonWeaponModel" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Shielded/>
<c:Model>
<Resource>Models/Weapons/Red/DefenderWeaponRed.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="ThirdPersonReloadSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/ReloadEffectWorld.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Muzzle">
<Components>
<c:Transform>
<Position X="-0.0100463303" Y="0.0624945536" Z="-0.372351319"/>
</c:Transform>
</Components>
<Children>
<Entity name="WeaponMuzzleRay">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RayDefenderRed.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.0180841181" Y="0.0252480619" Z="-0.135249734"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="WeaponMuzzleFlash">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/MuzzleFlashRed.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="0.0201820824" Y="0.0212024488" Z="-0.0305794869"/>
<Scale X="1.5" Y="1.5" Z="1"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
@@ -0,0 +1,239 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="Hands" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:BlendAdditive>
<Adder>MovementBlend</Adder>
<Receiver>ActionBlend</Receiver>
</c:BlendAdditive>
<c:Model>
<Resource>Models/Characters/Assault/FirstPersonAssaultRed.mesh</Resource>
<Shadow>false</Shadow>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="MovementBlend">
<Components>
<c:Blend>
<Pose1>Idle</Pose1>
<Pose2>Run</Pose2>
<Weight>1</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Idle">
<Components>
<c:Animation>
<AnimationName>IdleSecF</AnimationName>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Run">
<Components>
<c:Animation>
<AnimationName>RunSecF</AnimationName>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="ActionBlend">
<Components>
<c:Blend>
<Pose1>Fire</Pose1>
<Pose2>Reload</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Fire">
<Components>
<c:Animation>
<AnimationName>ShootSecF</AnimationName>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Reload">
<Components>
<c:Animation>
<AnimationName>ReloadSwitchSecF</AnimationName>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="AmmunitionHUD">
<Components>
<c:BoneAttachment>
<BoneName>R_Ammo_Joint</BoneName>
</c:BoneAttachment>
<c:Transform>
<Position X="0.109812237" Y="-0.0832184851" Z="-0.403451651"/>
<Orientation X="0.000778344634" Y="0.077423349" Z="0.0012426693"/>
<Scale X="0.400000006" Y="0.400000006" Z="0.400000006"/>
</c:Transform>
</Components>
<Children>
<Entity name="AmmunitionHUDBackground">
<Components>
<c:Sprite>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<Color A="0.588235319" B="0" G="0" R="0"/>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="-0.00300000003"/>
<Scale X="0.119999997" Y="0.119999997" Z="0.119999997"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="AmmunitionText">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="MagazineAmmo">
<Components>
<c:Text>
<Content>16</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:TextFieldReader>
<ParentEntityName></ParentEntityName>
<ComponentType>SidearmWeapon</ComponentType>
<Field>MagazineAmmo</Field>
</c:TextFieldReader>
<c:Transform>
<Position X="0" Y="-0.00600000005" Z="0"/>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Infinity!">
<Components>
<c:Text>
<Content>8</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:Transform>
<Position X="0.0150000006" Y="-0.029000001" Z="0"/>
<Orientation X="0" Y="0" Z="1.5710001"/>
<Scale X="0.0399999991" Y="0.0399999991" Z="0.0399999991"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="FriendlyAmmoAttachment">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/FriendlyAmmoHUD.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="-0.000110394583" Y="-0.0891034827" Z="6.07890324e-05"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="AmmoShareEffectSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/AmmoShareEffectView.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="WeaponOrigin">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="ViewModel">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<GlowIntensity>1.2999999523162842</GlowIntensity>
<Resource>Models/Weapons/Red/SecondaryWeaponRed.mesh</Resource>
<Shadow>false</Shadow>
</c:Model>
<c:Transform>
<Position X="0.185786247" Y="-0.21622014" Z="-0.412707269"/>
<Orientation X="0.0102805095" Y="-0.00312478957" Z="0.0428138711"/>
</c:Transform>
</Components>
<Children>
<Entity name="ReloadSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/WeaponSidearmReloadEffectViewRed.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="Muzzle">
<Components>
<c:Transform>
<Position X="0.189540595" Y="-0.114737265" Z="-0.681462705"/>
</c:Transform>
</Components>
<Children>
<Entity name="WeaponMuzzleRay">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RaySideArmRed.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="WeaponMuzzleFlash">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/MuzzleFlashSideArmRed.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Scale X="0.5" Y="0.5" Z="0.5"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
@@ -0,0 +1,239 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="Hands" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:BlendAdditive>
<Adder>MovementBlend</Adder>
<Receiver>ActionBlend</Receiver>
</c:BlendAdditive>
<c:Model>
<Resource>Models/Characters/Defender/FirstPersonDefenderRed.mesh</Resource>
<Shadow>false</Shadow>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity name="MovementBlend">
<Components>
<c:Blend>
<Pose1>Idle</Pose1>
<Pose2>Run</Pose2>
<Weight>1</Weight>
<SubTreeRoot>true</SubTreeRoot>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Idle">
<Components>
<c:Animation>
<AnimationName>IdleSecF</AnimationName>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Run">
<Components>
<c:Animation>
<AnimationName>RunSecF</AnimationName>
<Play>true</Play>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="ActionBlend">
<Components>
<c:Blend>
<Pose1>Fire</Pose1>
<Pose2>Reload</Pose2>
<Weight>0</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="Fire">
<Components>
<c:Animation>
<AnimationName>ShootSecF</AnimationName>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Reload">
<Components>
<c:Animation>
<AnimationName>ReloadSwitchSecF</AnimationName>
<Loop>false</Loop>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="AmmunitionHUD">
<Components>
<c:BoneAttachment>
<BoneName>R_Ammo_Joint</BoneName>
</c:BoneAttachment>
<c:Transform>
<Position X="0.109812573" Y="-0.0832190216" Z="-0.373473227"/>
<Orientation X="0.00118373742" Y="0.077411525" Z="0.00458352407"/>
<Scale X="0.400000006" Y="0.400000006" Z="0.400000006"/>
</c:Transform>
</Components>
<Children>
<Entity name="AmmunitionHUDBackground">
<Components>
<c:Sprite>
<Model>Models/Core/UnitQuad.mesh</Model>
<GlowMap></GlowMap>
<DiffuseTexture>Textures/Core/UnitHexagon.png</DiffuseTexture>
<Color A="0.588235319" B="0" G="0" R="0"/>
</c:Sprite>
<c:Transform>
<Position X="0" Y="0" Z="-0.00300000003"/>
<Scale X="0.119999997" Y="0.119999997" Z="0.119999997"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="AmmunitionText">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="MagazineAmmo">
<Components>
<c:Text>
<Content>16</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:TextFieldReader>
<ParentEntityName></ParentEntityName>
<ComponentType>SidearmWeapon</ComponentType>
<Field>MagazineAmmo</Field>
</c:TextFieldReader>
<c:Transform>
<Position X="0" Y="-0.00600000005" Z="0"/>
<Scale X="0.0599999987" Y="0.0599999987" Z="0.0599999987"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="Infinity!">
<Components>
<c:Text>
<Content>8</Content>
<Resource>Fonts/DroidSans.ttf,64</Resource>
<Color A="1" B="3.92156863" G="1.17647064" R="0"/>
</c:Text>
<c:Transform>
<Position X="0.0150000006" Y="-0.029000001" Z="0"/>
<Orientation X="0" Y="0" Z="1.5710001"/>
<Scale X="0.0399999991" Y="0.0399999991" Z="0.0399999991"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="FriendlyAmmoAttachment">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/FriendlyAmmoHUD.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Position X="-0.000110394583" Y="-0.0891034827" Z="6.07890324e-05"/>
</c:Transform>
</Components>
<Children/>
</Entity>
<Entity name="AmmoShareEffectSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/AmmoShareEffectView.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="WeaponOrigin">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="ViewModel">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<GlowIntensity>1.5</GlowIntensity>
<Resource>Models/Weapons/Red/SecondaryWeaponRed.mesh</Resource>
<Shadow>false</Shadow>
</c:Model>
<c:Transform>
<Position X="0.18578662" Y="-0.216220587" Z="-0.382728726"/>
<Orientation X="0.010279973" Y="-0.00312555139" Z="0.0428142436"/>
</c:Transform>
</Components>
<Children>
<Entity name="ReloadSpawner">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/WeaponSidearmReloadEffectViewRed.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="Muzzle">
<Components>
<c:Transform>
<Position X="0.192775041" Y="-0.117133088" Z="-0.647809923"/>
</c:Transform>
</Components>
<Children>
<Entity name="WeaponMuzzleRay">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/RaySideArmRed.xml</EntityFile>
</c:Spawner>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="WeaponMuzzleFlash">
<Components>
<c:Spawner>
<EntityFile>Schema/Entities/MuzzleFlashSideArmRed.xml</EntityFile>
</c:Spawner>
<c:Transform>
<Scale X="0.5" Y="0.5" Z="0.5"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Entity name="ReloadEffect" xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
<Components>
<c:Transform/>
</Components>
<Children>
<Entity name="In">
<Components>
<c:ExplosionEffect>
<ExplosionOrigin X="0" Y="0.112999998" Z="-0.430000007"/>
<TimeSinceDeath>0.5</TimeSinceDeath>
<Delay>0.5</Delay>
<Speed>-1</Speed>
<ExplosionDuration>0.5</ExplosionDuration>
<EndColor A="0" B="3.92156863" G="0.545098066" R="1"/>
<Randomness>true</Randomness>
</c:ExplosionEffect>
<c:Model>
<GlowIntensity>1.5</GlowIntensity>
<Resource>Models/Weapons/Red/SecondaryWeaponRed.mesh</Resource>
<Shadow>false</Shadow>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="Out">
<Components>
<c:Lifetime>
<Lifetime>0.5</Lifetime>
</c:Lifetime>
<c:ExplosionEffect>
<ExplosionOrigin X="0" Y="0.113000005" Z="-0.430000007"/>
<ExplosionDuration>0.5</ExplosionDuration>
<EndColor A="0" B="3.92156863" G="0.545098066" R="1"/>
<Randomness>true</Randomness>
</c:ExplosionEffect>
<c:Model>
<GlowIntensity>1.5</GlowIntensity>
<Resource>Models/Weapons/Red/SecondaryWeaponRed.mesh</Resource>
<Shadow>false</Shadow>
<Transparent>true</Transparent>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
+7 -2
View File
@@ -50,21 +50,26 @@ Source: "..\..\bin\Schema\*"; DestDir: "{app}\Schema\"; Flags: ignoreversion cre
Source: "..\..\bin\Shaders\*"; DestDir: "{app}\Shaders\"; Flags: ignoreversion createallsubdirs recursesubdirs Source: "..\..\bin\Shaders\*"; DestDir: "{app}\Shaders\"; Flags: ignoreversion createallsubdirs recursesubdirs
Source: "..\..\bin\Textures\*"; DestDir: "{app}\Textures\"; Flags: ignoreversion createallsubdirs recursesubdirs Source: "..\..\bin\Textures\*"; DestDir: "{app}\Textures\"; Flags: ignoreversion createallsubdirs recursesubdirs
Source: "..\..\bin\assimp.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "..\..\bin\assimp.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\DefaultConfig.ini"; DestDir: "{app}"; Flags: ignoreversion Source: "..\..\resources\DefaultConfig.ini"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\DefaultInput.ini"; DestDir: "{app}"; Flags: ignoreversion Source: "..\..\resources\DefaultInput.ini"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\glew32.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "..\..\bin\glew32.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\glfw3.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "..\..\bin\glfw3.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\OpenAL32.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\imgui.ini"; DestDir: "{app}"; Flags: ignoreversion Source: "..\..\bin\imgui.ini"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\Input.ini"; DestDir: "{app}"; Flags: ignoreversion Source: "..\..\bin\Input.ini"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\libpng16.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "..\..\bin\libpng16.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\Axyz.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "..\..\bin\Axyz.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\Server.bat"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\xerces-c_3_1.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "..\..\bin\xerces-c_3_1.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\zlib.dll"; DestDir: "{app}"; Flags: ignoreversion Source: "..\..\bin\zlib.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\resources\README.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\deps\redist\VC_redist.x64.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall Source: "..\..\deps\redist\VC_redist.x64.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall
[Icons] [Icons]
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{commonprograms}\{#MyAppName} Server"; Filename: "{app}\{#MyAppExeName}"; Parameters: "--server"
Name: "{commondesktop}\{#MyAppName} Server"; Filename: "{app}\{#MyAppExeName}"; Parameters: "--server"; Tasks: desktopicon
[INI] [INI]
Filename: "{app}\Config.ini"; Section: "Networking"; Key: "Name"; String: "{%USERNAME}"; Flags: createkeyifdoesntexist Filename: "{app}\Config.ini"; Section: "Networking"; Key: "Name"; String: "{%USERNAME}"; Flags: createkeyifdoesntexist
+5 -8
View File
@@ -1,7 +1,10 @@
#version 430 #version 430
#include "Shaders/Util/CommonNormalFunc.glsl"
#define MIN_AMBIENT_LIGHT 0.3 #define MIN_AMBIENT_LIGHT 0.3
#define MAX_SPLITS 4 #define MAX_SPLITS 4
uniform mat4 M; uniform mat4 M;
uniform mat4 V; uniform mat4 V;
uniform mat4 P; uniform mat4 P;
@@ -16,6 +19,7 @@ uniform vec3 CameraPosition;
uniform int SSAOQuality; uniform int SSAOQuality;
uniform float FarDistance[MAX_SPLITS]; uniform float FarDistance[MAX_SPLITS];
uniform int NormalTextureType;
uniform vec2 DiffuseUVRepeat; uniform vec2 DiffuseUVRepeat;
uniform vec2 NormalUVRepeat; uniform vec2 NormalUVRepeat;
uniform vec2 SpecularUVRepeat; uniform vec2 SpecularUVRepeat;
@@ -139,13 +143,6 @@ LightResult CalcDirectionalLightSource(vec4 direction, vec4 color, float intensi
return result; return result;
} }
vec4 CalcNormalMappedValue(vec3 normal, vec3 tangent, vec3 bitangent, vec2 textureCoordinate, sampler2D normalMap)
{
mat3 TBN = mat3(tangent, bitangent, normal);
vec3 NormalMap = texture(normalMap, textureCoordinate).xyz * 2.0 - vec3(1.0);
return vec4(TBN * normalize(NormalMap), 0.0);
}
// Returns a "random" value. // Returns a "random" value.
float Random(vec3 seed, int i) float Random(vec3 seed, int i)
{ {
@@ -301,7 +298,7 @@ void main()
vec4 diffuseTexel = texture2D(DiffuseTexture, Input.TextureCoordinate * DiffuseUVRepeat); vec4 diffuseTexel = texture2D(DiffuseTexture, Input.TextureCoordinate * DiffuseUVRepeat);
vec4 glowTexel = texture2D(GlowMapTexture, Input.TextureCoordinate * GlowUVRepeat); vec4 glowTexel = texture2D(GlowMapTexture, Input.TextureCoordinate * GlowUVRepeat);
vec4 specularTexel = texture2D(SpecularMapTexture, Input.TextureCoordinate * SpecularUVRepeat); vec4 specularTexel = texture2D(SpecularMapTexture, Input.TextureCoordinate * SpecularUVRepeat);
vec4 normal = V * CalcNormalMappedValue(Input.Normal, Input.Tangent, Input.BiTangent, Input.TextureCoordinate * NormalUVRepeat, NormalMapTexture); vec4 normal = V * CalcNormalMappedValue(Input.Normal, Input.Tangent, Input.BiTangent, Input.TextureCoordinate * NormalUVRepeat, NormalMapTexture, NormalTextureType);
normal = normalize(normal); normal = normalize(normal);
//vec4 normal = normalize(V * vec4(Input.Normal, 0.0)); //vec4 normal = normalize(V * vec4(Input.Normal, 0.0));
vec4 viewVec = normalize(-Input.ViewSpacePosition); vec4 viewVec = normalize(-Input.ViewSpacePosition);
@@ -1,5 +1,7 @@
#version 430 #version 430
#include "Shaders/Util/CommonNormalFunc.glsl"
#define MIN_AMBIENT_LIGHT 0.3 #define MIN_AMBIENT_LIGHT 0.3
#define MAX_SPLITS 4 #define MAX_SPLITS 4
@@ -17,6 +19,7 @@ uniform float GlowIntensity;
uniform vec3 CameraPosition; uniform vec3 CameraPosition;
uniform int SSAOQuality; uniform int SSAOQuality;
uniform int NormalTextureType;
uniform vec2 DiffuseUVRepeat; uniform vec2 DiffuseUVRepeat;
uniform vec2 NormalUVRepeat; uniform vec2 NormalUVRepeat;
uniform vec2 SpecularUVRepeat; uniform vec2 SpecularUVRepeat;
@@ -122,13 +125,6 @@ LightResult CalcDirectionalLightSource(vec4 direction, vec4 color, float intensi
return result; return result;
} }
vec4 CalcNormalMappedValue(vec3 normal, vec3 tangent, vec3 bitangent, vec2 textureCoordinate, sampler2D normalMap)
{
mat3 TBN = mat3(tangent, bitangent, normal);
vec3 NormalMap = texture(normalMap, textureCoordinate).xyz * 2.0 - vec3(1.0);
return vec4(TBN * normalize(NormalMap), 0.0);
}
void main() void main()
{ {
float shieldDepthValue = texelFetch(ShieldBuffer, ivec2(gl_FragCoord.xy), 0).r; float shieldDepthValue = texelFetch(ShieldBuffer, ivec2(gl_FragCoord.xy), 0).r;
@@ -142,7 +138,7 @@ void main()
vec4 diffuseTexel = texture2D(DiffuseTexture, Input.TextureCoordinate * DiffuseUVRepeat); vec4 diffuseTexel = texture2D(DiffuseTexture, Input.TextureCoordinate * DiffuseUVRepeat);
vec4 glowTexel = texture2D(GlowMapTexture, Input.TextureCoordinate * GlowUVRepeat); vec4 glowTexel = texture2D(GlowMapTexture, Input.TextureCoordinate * GlowUVRepeat);
vec4 specularTexel = texture2D(SpecularMapTexture, Input.TextureCoordinate * SpecularUVRepeat); vec4 specularTexel = texture2D(SpecularMapTexture, Input.TextureCoordinate * SpecularUVRepeat);
vec4 normal = V * CalcNormalMappedValue(Input.Normal, Input.Tangent, Input.BiTangent, Input.TextureCoordinate * NormalUVRepeat, NormalMapTexture); vec4 normal = V * CalcNormalMappedValue(Input.Normal, Input.Tangent, Input.BiTangent, Input.TextureCoordinate * NormalUVRepeat, NormalMapTexture, NormalTextureType);
normal = normalize(normal); normal = normalize(normal);
//vec4 normal = normalize(V * vec4(Input.Normal, 0.0)); //vec4 normal = normalize(V * vec4(Input.Normal, 0.0));
vec4 viewVec = normalize(-Input.ViewSpacePosition); vec4 viewVec = normalize(-Input.ViewSpacePosition);
@@ -1,5 +1,7 @@
#version 430 #version 430
#include "Shaders/Util/CommonNormalFunc.glsl"
#define MIN_AMBIENT_LIGHT 0.3 #define MIN_AMBIENT_LIGHT 0.3
#define MAX_SPLITS 4 #define MAX_SPLITS 4
uniform mat4 M; uniform mat4 M;
@@ -18,6 +20,10 @@ layout (binding = 0) uniform sampler2D AOTexture;
layout (binding = 30) uniform sampler2DArrayShadow DepthMap; layout (binding = 30) uniform sampler2DArrayShadow DepthMap;
//Get bineded at the same time as the textures //Get bineded at the same time as the textures
uniform int NormalTextureType1;
uniform int NormalTextureType2;
uniform int NormalTextureType3;
uniform vec2 DiffuseUVRepeat1; uniform vec2 DiffuseUVRepeat1;
uniform vec2 DiffuseUVRepeat2; uniform vec2 DiffuseUVRepeat2;
uniform vec2 DiffuseUVRepeat3; uniform vec2 DiffuseUVRepeat3;
@@ -181,11 +187,12 @@ vec4 CalcBlendedTexel(vec4 blendValue, sampler2D R, sampler2D G, sampler2D B,
} }
vec4 CalcBlendedNormal(vec4 blendValue, sampler2D R, sampler2D G, sampler2D B, vec4 CalcBlendedNormal(vec4 blendValue, sampler2D R, sampler2D G, sampler2D B,
vec2 R_TileValues, vec2 G_TileValues, vec2 B_TileValues){ vec2 R_TileValues, vec2 G_TileValues, vec2 B_TileValues,
int R_TextureType, int G_TextureType, int B_TextureType) {
mat3 TBN = mat3(Input.Tangent, Input.BiTangent, Input.Normal); mat3 TBN = mat3(Input.Tangent, Input.BiTangent, Input.Normal);
vec3 R_Channel = texture(R, Input.TextureCoordinate * R_TileValues).xyz * 2.0 - vec3(1.0); vec3 R_Channel = NormalMapValue(Input.TextureCoordinate * R_TileValues, R, R_TextureType);
vec3 G_Channel = texture(G, Input.TextureCoordinate * G_TileValues).xyz * 2.0 - vec3(1.0); vec3 G_Channel = NormalMapValue(Input.TextureCoordinate * G_TileValues, G, G_TextureType);
vec3 B_Channel = texture(B, Input.TextureCoordinate * B_TileValues).xyz * 2.0 - vec3(1.0); vec3 B_Channel = NormalMapValue(Input.TextureCoordinate * B_TileValues, B, B_TextureType);
float total = blendValue.r + blendValue.g + blendValue.b + blendValue.a; float total = blendValue.r + blendValue.g + blendValue.b + blendValue.a;
float totalDiv = 1 / total; float totalDiv = 1 / total;
@@ -363,7 +370,8 @@ void main()
SpecularUVRepeat1, SpecularUVRepeat2, SpecularUVRepeat3); SpecularUVRepeat1, SpecularUVRepeat2, SpecularUVRepeat3);
//vec4 normal = V * CalcNormalMappedValue(Input.Normal, Input.Tangent, Input.BiTangent, Input.TextureCoordinate, SplatMapTexture); //vec4 normal = V * CalcNormalMappedValue(Input.Normal, Input.Tangent, Input.BiTangent, Input.TextureCoordinate, SplatMapTexture);
vec4 normal = V * CalcBlendedNormal(splatTexel, NormalMapTexture1, NormalMapTexture2, NormalMapTexture3, vec4 normal = V * CalcBlendedNormal(splatTexel, NormalMapTexture1, NormalMapTexture2, NormalMapTexture3,
NormalUVRepeat1, NormalUVRepeat2, NormalUVRepeat3); NormalUVRepeat1, NormalUVRepeat2, NormalUVRepeat3,
NormalTextureType1, NormalTextureType2, NormalTextureType3);
normal = normalize(normal); normal = normalize(normal);
//vec4 normal = normalize(V * vec4(Input.Normal, 0.0)); //vec4 normal = normalize(V * vec4(Input.Normal, 0.0));
vec4 viewVec = normalize(-Input.ViewSpacePosition); vec4 viewVec = normalize(-Input.ViewSpacePosition);
@@ -1,5 +1,7 @@
#version 430 #version 430
#include "Shaders/Util/CommonNormalFunc.glsl"
#define MIN_AMBIENT_LIGHT 0.3 #define MIN_AMBIENT_LIGHT 0.3
#define MAX_SPLITS 4 #define MAX_SPLITS 4
uniform mat4 M; uniform mat4 M;
@@ -14,6 +16,10 @@ uniform vec4 AmbientColor;
uniform int SSAOQuality; uniform int SSAOQuality;
//Get bineded at the same time as the textures //Get bineded at the same time as the textures
uniform int NormalTextureType1;
uniform int NormalTextureType2;
uniform int NormalTextureType3;
uniform vec2 DiffuseUVRepeat1; uniform vec2 DiffuseUVRepeat1;
uniform vec2 DiffuseUVRepeat2; uniform vec2 DiffuseUVRepeat2;
uniform vec2 DiffuseUVRepeat3; uniform vec2 DiffuseUVRepeat3;
@@ -160,11 +166,12 @@ vec4 CalcBlendedTexel(vec4 blendValue, sampler2D R, sampler2D G, sampler2D B,
} }
vec4 CalcBlendedNormal(vec4 blendValue, sampler2D R, sampler2D G, sampler2D B, vec4 CalcBlendedNormal(vec4 blendValue, sampler2D R, sampler2D G, sampler2D B,
vec2 R_TileValues, vec2 G_TileValues, vec2 B_TileValues){ vec2 R_TileValues, vec2 G_TileValues, vec2 B_TileValues,
int R_TextureType, int G_TextureType, int B_TextureType) {
mat3 TBN = mat3(Input.Tangent, Input.BiTangent, Input.Normal); mat3 TBN = mat3(Input.Tangent, Input.BiTangent, Input.Normal);
vec3 R_Channel = texture(R, Input.TextureCoordinate * R_TileValues).xyz * 2.0 - vec3(1.0); vec3 R_Channel = NormalMapValue(Input.TextureCoordinate * R_TileValues, R, R_TextureType);
vec3 G_Channel = texture(G, Input.TextureCoordinate * G_TileValues).xyz * 2.0 - vec3(1.0); vec3 G_Channel = NormalMapValue(Input.TextureCoordinate * G_TileValues, G, G_TextureType);
vec3 B_Channel = texture(B, Input.TextureCoordinate * B_TileValues).xyz * 2.0 - vec3(1.0); vec3 B_Channel = NormalMapValue(Input.TextureCoordinate * B_TileValues, B, B_TextureType);
float total = blendValue.r + blendValue.g + blendValue.b + blendValue.a; float total = blendValue.r + blendValue.g + blendValue.b + blendValue.a;
float totalDiv = 1 / total; float totalDiv = 1 / total;
@@ -194,7 +201,8 @@ void main()
SpecularUVRepeat1, SpecularUVRepeat2, SpecularUVRepeat3); SpecularUVRepeat1, SpecularUVRepeat2, SpecularUVRepeat3);
//vec4 normal = V * CalcNormalMappedValue(Input.Normal, Input.Tangent, Input.BiTangent, Input.TextureCoordinate, SplatMapTexture); //vec4 normal = V * CalcNormalMappedValue(Input.Normal, Input.Tangent, Input.BiTangent, Input.TextureCoordinate, SplatMapTexture);
vec4 normal = V * CalcBlendedNormal(splatTexel, NormalMapTexture1, NormalMapTexture2, NormalMapTexture3, vec4 normal = V * CalcBlendedNormal(splatTexel, NormalMapTexture1, NormalMapTexture2, NormalMapTexture3,
NormalUVRepeat1, NormalUVRepeat2, NormalUVRepeat3); NormalUVRepeat1, NormalUVRepeat2, NormalUVRepeat3,
NormalTextureType1, NormalTextureType2, NormalTextureType3);
normal = normalize(normal); normal = normalize(normal);
//vec4 normal = normalize(V * vec4(Input.Normal, 0.0)); //vec4 normal = normalize(V * vec4(Input.Normal, 0.0));
vec4 viewVec = normalize(-Input.ViewSpacePosition); vec4 viewVec = normalize(-Input.ViewSpacePosition);
Binary file not shown.
+17 -17
View File
@@ -146,14 +146,14 @@ bool RayVsTriangle(const Ray& ray,
} }
bool RayVsModel(const Ray& ray, bool RayVsModel(const Ray& ray,
const RawModel::Vertex* modelVertices, const std::vector<glm::vec3>& modelVertices,
const std::vector<unsigned int>& modelIndices, const std::vector<unsigned int>& modelIndices,
const glm::mat4& modelMatrix) const glm::mat4& modelMatrix)
{ {
for (int i = 0; i < modelIndices.size();) { for (int i = 0; i < modelIndices.size();) {
glm::vec3 v0 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]].Position, modelMatrix); glm::vec3 v0 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]], modelMatrix);
glm::vec3 v1 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]].Position, modelMatrix); glm::vec3 v1 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]], modelMatrix);
glm::vec3 v2 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]].Position, modelMatrix); glm::vec3 v2 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]], modelMatrix);
if (RayVsTriangle(ray, v0, v1, v2)) { if (RayVsTriangle(ray, v0, v1, v2)) {
return true; return true;
} }
@@ -194,7 +194,7 @@ bool RayVsTriangle(const Ray& ray,
} }
bool RayVsModel(const Ray& ray, bool RayVsModel(const Ray& ray,
const RawModel::Vertex* modelVertices, const std::vector<glm::vec3>& modelVertices,
const std::vector<unsigned int>& modelIndices, const std::vector<unsigned int>& modelIndices,
const glm::mat4& modelMatrix, const glm::mat4& modelMatrix,
float& outDistance, float& outDistance,
@@ -204,9 +204,9 @@ bool RayVsModel(const Ray& ray,
outDistance = INFINITY; outDistance = INFINITY;
bool hit = false; bool hit = false;
for (int i = 0; i < modelIndices.size();) { for (int i = 0; i < modelIndices.size();) {
glm::vec3 v0 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]].Position, modelMatrix); glm::vec3 v0 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]], modelMatrix);
glm::vec3 v1 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]].Position, modelMatrix); glm::vec3 v1 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]], modelMatrix);
glm::vec3 v2 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]].Position, modelMatrix); glm::vec3 v2 = TransformSystem::TransformPoint(modelVertices[modelIndices[i++]], modelMatrix);
float dist = outDistance; float dist = outDistance;
float u; float u;
float v; float v;
@@ -221,7 +221,7 @@ bool RayVsModel(const Ray& ray,
} }
bool RayVsModel(const Ray& ray, bool RayVsModel(const Ray& ray,
const RawModel::Vertex* modelVertices, const std::vector<glm::vec3>& modelVertices,
const std::vector<unsigned int>& modelIndices, const std::vector<unsigned int>& modelIndices,
const glm::mat4& modelMatrix, const glm::mat4& modelMatrix,
glm::vec3& outHitPosition) glm::vec3& outHitPosition)
@@ -548,7 +548,7 @@ BoxTriRes AABBvsTriangle(const AABB& box,
} }
Output AABBvsTriangles(const AABB& box, Output AABBvsTriangles(const AABB& box,
const RawModel::Vertex* modelVertices, const std::vector<glm::vec3>& modelVertices,
const std::vector<unsigned int>& modelIndices, const std::vector<unsigned int>& modelIndices,
const glm::mat4& modelMatrix, const glm::mat4& modelMatrix,
glm::vec3& boxVelocity, glm::vec3& boxVelocity,
@@ -565,9 +565,9 @@ Output AABBvsTriangles(const AABB& box,
glm::vec3 originalBoxVelocity(boxVelocity); glm::vec3 originalBoxVelocity(boxVelocity);
for (int i = 0; i < modelIndices.size(); ) { for (int i = 0; i < modelIndices.size(); ) {
std::array<glm::vec3, 3> triVertices = { std::array<glm::vec3, 3> triVertices = {
TransformSystem::TransformPoint(modelVertices[modelIndices[i++]].Position, modelMatrix), TransformSystem::TransformPoint(modelVertices[modelIndices[i++]], modelMatrix),
TransformSystem::TransformPoint(modelVertices[modelIndices[i++]].Position, modelMatrix), TransformSystem::TransformPoint(modelVertices[modelIndices[i++]], modelMatrix),
TransformSystem::TransformPoint(modelVertices[modelIndices[i++]].Position, modelMatrix) TransformSystem::TransformPoint(modelVertices[modelIndices[i++]], modelMatrix)
}; };
glm::vec3 outVec; glm::vec3 outVec;
bool collideWithGround = isOnGround; bool collideWithGround = isOnGround;
@@ -595,7 +595,7 @@ Output AABBvsTriangles(const AABB& box,
} }
bool AABBvsTriangles(const AABB& box, bool AABBvsTriangles(const AABB& box,
const RawModel::Vertex* modelVertices, const std::vector<glm::vec3>& modelVertices,
const std::vector<unsigned int>& modelIndices, const std::vector<unsigned int>& modelIndices,
const glm::mat4& modelMatrix, const glm::mat4& modelMatrix,
glm::vec3& boxVelocity, glm::vec3& boxVelocity,
@@ -615,7 +615,7 @@ bool AABBvsTriangles(const AABB& box,
} }
bool AABBvsTriangles(const AABB& box, bool AABBvsTriangles(const AABB& box,
const RawModel::Vertex* modelVertices, const std::vector<glm::vec3>& modelVertices,
const std::vector<unsigned int>& modelIndices, const std::vector<unsigned int>& modelIndices,
const glm::mat4& modelMatrix) const glm::mat4& modelMatrix)
{ {
@@ -633,7 +633,7 @@ bool AABBvsTriangles(const AABB& box,
} }
Output AABBvsTrianglesWContainment(const AABB& box, Output AABBvsTrianglesWContainment(const AABB& box,
const RawModel::Vertex* modelVertices, const std::vector<glm::vec3>& modelVertices,
const std::vector<unsigned int>& modelIndices, const std::vector<unsigned int>& modelIndices,
const glm::mat4& modelMatrix) const glm::mat4& modelMatrix)
{ {
@@ -741,7 +741,7 @@ boost::optional<EntityAABB> EntityFirstHitByRay(const Ray& ray, std::vector<Enti
continue; continue;
} }
float u, v; float u, v;
if (RayVsModel(ray, model->Vertices(), model->m_RawModel->m_Indices, TransformSystem::ModelMatrix(entityBox.Entity), outDistance, u, v)) { if (RayVsModel(ray, model->m_Vertices, model->m_Indices, TransformSystem::ModelMatrix(entityBox.Entity), outDistance, u, v)) {
outIntersectPos = ray.Origin() + outDistance * ray.Direction(); outIntersectPos = ray.Origin() + outDistance * ray.Direction();
return entityBox; return entityBox;
} }
+6 -6
View File
@@ -41,15 +41,15 @@ void CollisionSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& c
// Don't collide against invisible models. // Don't collide against invisible models.
continue; continue;
} }
RawModel* model; Model* model;
std::string res = (std::string)boxB.Entity["Model"]["Resource"]; std::string res = (std::string)boxB.Entity["Model"]["Resource"];
try { try {
model = ResourceManager::Load<RawModel, true>(res); model = ResourceManager::Load<Model, true>(res);
} catch (const std::exception&) { } catch (const std::exception&) {
continue; continue;
} }
float u, v; float u, v;
hit = Collision::RayVsModel(ray, model->Vertices(), model->m_Indices, TransformSystem::ModelMatrix(boxB.Entity), dist, u, v); hit = Collision::RayVsModel(ray, model->m_Vertices, model->m_Indices, TransformSystem::ModelMatrix(boxB.Entity), dist, u, v);
} else { } else {
hit = Collision::RayVsAABB(ray, boxB, dist); hit = Collision::RayVsAABB(ray, boxB, dist);
} }
@@ -86,9 +86,9 @@ void CollisionSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& c
// Don't collide against invisible models. // Don't collide against invisible models.
continue; continue;
} }
RawModel* model; Model* model;
try { try {
model = ResourceManager::Load<RawModel, true>(boxB.Entity["Model"]["Resource"]); model = ResourceManager::Load<Model, true>(boxB.Entity["Model"]["Resource"]);
} catch (const std::exception&) { } catch (const std::exception&) {
continue; continue;
} }
@@ -98,7 +98,7 @@ void CollisionSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& c
glm::vec3 inOutVelocity = (glm::vec3)cPhysics["Velocity"]; glm::vec3 inOutVelocity = (glm::vec3)cPhysics["Velocity"];
bool isOnGround = (bool)cPhysics["IsOnGround"]; bool isOnGround = (bool)cPhysics["IsOnGround"];
float verticalStepHeight = (float)(double)cPhysics["VerticalStepHeight"]; float verticalStepHeight = (float)(double)cPhysics["VerticalStepHeight"];
if (Collision::AABBvsTriangles(boxA, model->Vertices(), model->m_Indices, modelMatrix, inOutVelocity, verticalStepHeight, isOnGround, resolutionVector)) { if (Collision::AABBvsTriangles(boxA, model->m_Vertices, model->m_Indices, modelMatrix, inOutVelocity, verticalStepHeight, isOnGround, resolutionVector)) {
//Move the position to previous position if it is not moving in the xz-plane, else resolve with the resolution vector. //Move the position to previous position if it is not moving in the xz-plane, else resolve with the resolution vector.
(Field<glm::vec3>)cTransform["Position"] += resolutionVector; (Field<glm::vec3>)cTransform["Position"] += resolutionVector;
boxA = *Collision::EntityAbsoluteAABB(entity); boxA = *Collision::EntityAbsoluteAABB(entity);
+3 -3
View File
@@ -10,11 +10,11 @@ void TriggerSystem::UpdateComponent(EntityWrapper& triggerEntity, ComponentWrapp
return; return;
} }
RawModel* triggerModel = nullptr; Model* triggerModel = nullptr;
glm::mat4 triggerModelMat; glm::mat4 triggerModelMat;
if (triggerEntity.HasComponent("Model")) { if (triggerEntity.HasComponent("Model")) {
try { try {
triggerModel = ResourceManager::Load<RawModel, true>(triggerEntity["Model"]["Resource"]); triggerModel = ResourceManager::Load<Model, true>(triggerEntity["Model"]["Resource"]);
triggerModelMat = TransformSystem::ModelMatrix(triggerEntity); triggerModelMat = TransformSystem::ModelMatrix(triggerEntity);
} catch (const std::exception&) { } catch (const std::exception&) {
} }
@@ -38,7 +38,7 @@ void TriggerSystem::UpdateComponent(EntityWrapper& triggerEntity, ComponentWrapp
? Collision::Output::OutContained ? Collision::Output::OutContained
: Collision::AABBvsTrianglesWContainment( : Collision::AABBvsTrianglesWContainment(
colliderBox, colliderBox,
triggerModel->Vertices(), triggerModel->m_Vertices,
triggerModel->m_Indices, triggerModel->m_Indices,
triggerModelMat); triggerModelMat);
+8 -50
View File
@@ -8,7 +8,6 @@ EditorSystem::EditorSystem(SystemParams params, IRenderer* renderer, RenderFrame
: System(params) : System(params)
, m_Renderer(renderer) , m_Renderer(renderer)
, m_RenderFrame(renderFrame) , m_RenderFrame(renderFrame)
, m_CamVelocity(0.f)
{ {
m_EditorWorld = new World(); m_EditorWorld = new World();
m_EditorWorldSystemPipeline = new SystemPipeline(m_EditorWorld, m_EventBroker, IsClient, IsServer); m_EditorWorldSystemPipeline = new SystemPipeline(m_EditorWorld, m_EventBroker, IsClient, IsServer);
@@ -84,55 +83,14 @@ void EditorSystem::Update(double dt)
} }
} }
m_EditorWorldSystemPipeline->Update(actualDelta); m_EditorWorldSystemPipeline->Update(actualDelta);
}
ComponentWrapper& cameraTransform = m_EditorCamera["Transform"]; ComponentWrapper& cameraTransform = m_EditorCamera["Transform"];
Field<glm::vec3> ori = cameraTransform["Orientation"]; Field<glm::vec3> ori = cameraTransform["Orientation"];
glm::vec3 newOri; ori.x(m_EditorCameraInputController->Rotation().x);
newOri.x = glm::mix(ori.x(), m_EditorCameraInputController->Rotation().x, 0.05f); ori.y(m_EditorCameraInputController->Rotation().y);
newOri.y = glm::mix(ori.y(), m_EditorCameraInputController->Rotation().y, 0.05f); Field<glm::vec3> pos = cameraTransform["Position"];
//ori.x(m_EditorCameraInputController->Rotation().x); pos += m_EditorCameraInputController->Movement() * glm::inverse(glm::quat(ori)) * (float)actualDelta;
//ori.y(m_EditorCameraInputController->Rotation().y);
ori.x(newOri.x);
ori.y(newOri.y);
Field<glm::vec3> pos = cameraTransform["Position"];
auto move = m_EditorCameraInputController->Movement();
const float decreaseAccelleration = 3.75f;
const float increaseAccelleration = 5.25f;
if (move.x == 0) {
m_CamVelocity.x -= m_CamVelocity.x * (float)actualDelta * decreaseAccelleration;
//m_CamVelocity.x -= glm::sign(m_CamVelocity.x) * (float)actualDelta * decreaseAccelleration;
if (glm::abs(m_CamVelocity.x) < 0.01f) {
m_CamVelocity.x = 0;
}
} else {
m_CamVelocity.x += glm::sign(move.x) * (float)actualDelta * increaseAccelleration;
m_CamVelocity.x = glm::max(m_CamVelocity.x, -glm::abs(move.x));
m_CamVelocity.x = glm::min(m_CamVelocity.x, glm::abs(move.x));
} }
if (move.y == 0) {
m_CamVelocity.y -= m_CamVelocity.y * (float)actualDelta * decreaseAccelleration;
//m_CamVelocity.y -= glm::sign(m_CamVelocity.y) * (float)actualDelta * decreaseAccelleration;
if (glm::abs(m_CamVelocity.y) < 0.01f) {
m_CamVelocity.y = 0;
}
} else {
m_CamVelocity.y += glm::sign(move.y) * (float)actualDelta * increaseAccelleration;
m_CamVelocity.y = glm::max(m_CamVelocity.y, -glm::abs(move.y));
m_CamVelocity.y = glm::min(m_CamVelocity.y, glm::abs(move.y));
}
if (move.z == 0) {
m_CamVelocity.z -= m_CamVelocity.z * (float)actualDelta * decreaseAccelleration;
//m_CamVelocity.z -= glm::sign(m_CamVelocity.z) * (float)actualDelta * decreaseAccelleration;
if (glm::abs(m_CamVelocity.z) < 0.01f) {
m_CamVelocity.z = 0;
}
} else {
m_CamVelocity.z += glm::sign(move.z) * (float)actualDelta * increaseAccelleration;
m_CamVelocity.z = glm::max(m_CamVelocity.z, -glm::abs(move.z));
m_CamVelocity.z = glm::min(m_CamVelocity.z, glm::abs(move.z));
}
pos += m_CamVelocity * glm::inverse(glm::quat(ori)) * (float)actualDelta;
} }
void EditorSystem::Enable() void EditorSystem::Enable()
@@ -159,11 +117,11 @@ void EditorSystem::Enable()
void EditorSystem::Disable() void EditorSystem::Disable()
{ {
//m_EditorCameraInputController->Disable(); m_EditorCameraInputController->Disable();
m_EventBroker->Publish(Events::LockMouse()); m_EventBroker->Publish(Events::LockMouse());
Events::SetCamera e; Events::SetCamera e;
e.CameraEntity = m_ActualCamera; e.CameraEntity = m_ActualCamera;
//m_EventBroker->Publish(e); m_EventBroker->Publish(e);
m_Enabled = false; m_Enabled = false;
} }
+1 -1
View File
@@ -747,7 +747,7 @@ void Server::resetMap()
reliableBroadcast(removeMap); reliableBroadcast(removeMap);
removeWorld(); removeWorld();
// Hardcoded for now. // Hardcoded for now.
auto entityFile = ResourceManager::Load<EntityFile>("Schema/Entities/CP_Rocky2.xml"); auto entityFile = ResourceManager::Load<EntityFile>("Schema/Entities/CP_Valhalla.xml");
entityFile->MergeInto(m_World); entityFile->MergeInto(m_World);
Packet newWorld(MessageType::Snapshot); Packet newWorld(MessageType::Snapshot);
createWorldSnapshot(newWorld); createWorldSnapshot(newWorld);
+5 -373
View File
@@ -6,7 +6,6 @@ AnimationSystem::AnimationSystem(SystemParams params)
EVENT_SUBSCRIBE_MEMBER(m_EAutoAnimationBlend, &AnimationSystem::OnAutoAnimationBlend); EVENT_SUBSCRIBE_MEMBER(m_EAutoAnimationBlend, &AnimationSystem::OnAutoAnimationBlend);
EVENT_SUBSCRIBE_MEMBER(m_EEntityDeleted, &AnimationSystem::OnEntityDeleted); EVENT_SUBSCRIBE_MEMBER(m_EEntityDeleted, &AnimationSystem::OnEntityDeleted);
EVENT_SUBSCRIBE_MEMBER(m_ESetBlendWeight, &AnimationSystem::OnSetBlendWeight); EVENT_SUBSCRIBE_MEMBER(m_ESetBlendWeight, &AnimationSystem::OnSetBlendWeight);
EVENT_SUBSCRIBE_MEMBER(m_EInputCommand, &AnimationSystem::OnInputCommand);
} }
void AnimationSystem::Update(double dt) void AnimationSystem::Update(double dt)
@@ -15,19 +14,6 @@ void AnimationSystem::Update(double dt)
CreateBlendTrees(); CreateBlendTrees();
UpdateWeights(dt); UpdateWeights(dt);
EntityWrapper aimEntity = m_World->GetFirstEntityByName("ThirdPerson").FirstChildByName("Aim");
(Field<double>)aimEntity["Animation"]["Time"] = glm::clamp((const double&)(Field<double>)aimEntity["Animation"]["Time"] + ((aimMove * 0.2f) * dt), 0.0, 1.0);
EntityWrapper aimTextEntity = m_World->GetFirstEntityByName("AimText");
if (aimMove > 0) {
(Field<std::string>)aimTextEntity["Text"]["Content"] = "Up";
} else if (aimMove < 0) {
(Field<std::string>)aimTextEntity["Text"]["Content"] = "Down";
} else {
(Field<std::string>)aimTextEntity["Text"]["Content"] = " ";
}
for(auto& autoBlendQueue : m_AutoBlendQueues) { for(auto& autoBlendQueue : m_AutoBlendQueues) {
autoBlendQueue.second.UpdateTime(dt); autoBlendQueue.second.UpdateTime(dt);
@@ -51,7 +37,7 @@ void AnimationSystem::CreateBlendTrees()
continue;; continue;;
} }
Skeleton* skeleton = model->m_RawModel->m_Skeleton; Skeleton* skeleton = model->m_Skeleton;
if (skeleton == nullptr) { if (skeleton == nullptr) {
continue; continue;
} }
@@ -93,7 +79,7 @@ void AnimationSystem::UpdateAnimations(double dt)
continue; continue;
} }
Skeleton* skeleton = model->m_RawModel->m_Skeleton; Skeleton* skeleton = model->m_Skeleton;
if (skeleton == nullptr) { if (skeleton == nullptr) {
continue; continue;
} }
@@ -191,7 +177,7 @@ bool AnimationSystem::OnAutoAnimationBlend(Events::AutoAnimationBlend& e)
return false; return false;
} }
Skeleton* skeleton = model->m_RawModel->m_Skeleton; Skeleton* skeleton = model->m_Skeleton;
if (skeleton == nullptr) { if (skeleton == nullptr) {
LOG_ERROR("%s, RootNode skeleton invalid %s", e.NodeName, e.RootNode.Name().c_str()); LOG_ERROR("%s, RootNode skeleton invalid %s", e.NodeName, e.RootNode.Name().c_str());
return false; return false;
@@ -314,7 +300,7 @@ bool AnimationSystem::OnEntityDeleted(Events::EntityDeleted& e)
return false; return false;
} }
Skeleton* skeleton = model->m_RawModel->m_Skeleton; Skeleton* skeleton = model->m_Skeleton;
if (skeleton == nullptr) { if (skeleton == nullptr) {
return false; return false;
} }
@@ -345,7 +331,7 @@ bool AnimationSystem::OnSetBlendWeight(Events::SetBlendWeight& e)
return false; return false;
} }
Skeleton* skeleton = model->m_RawModel->m_Skeleton; Skeleton* skeleton = model->m_Skeleton;
if (skeleton == nullptr) { if (skeleton == nullptr) {
return false; return false;
} }
@@ -367,357 +353,3 @@ bool AnimationSystem::OnSetBlendWeight(Events::SetBlendWeight& e)
} }
} }
bool AnimationSystem::OnInputCommand(Events::InputCommand& e)
{
EntityWrapper firstPerson = m_World->GetFirstEntityByName("FirstPerson");
EntityWrapper thirdPerson = m_World->GetFirstEntityByName("ThirdPerson");
EntityWrapper currentBlend = m_World->GetFirstEntityByName("CurrentBlend");
EntityWrapper queuedBlend = m_World->GetFirstEntityByName("QueuedBlend");
EntityWrapper MovementText = m_World->GetFirstEntityByName("MovementText");
if (e.Command == "ClearText") {
if (e.Value > 0) {
(Field<std::string>)currentBlend["Text"]["Content"] = " ";
(Field<std::string>)queuedBlend["Text"]["Content"] = " ";
}
}
if(e.Command == "Jump") {
if(e.Value > 0) {
(Field<std::string>)currentBlend["Text"]["Content"] = "Jump";
(Field<std::string>)queuedBlend["Text"]["Content"] = "Movement";
Events::AutoAnimationBlend blendEvent;
blendEvent.RootNode = thirdPerson;
blendEvent.Duration = 0.2f;
blendEvent.NodeName = "Jump";
blendEvent.Start = true;
blendEvent.Restart = true;
m_EventBroker->Publish(blendEvent);
Events::AutoAnimationBlend blendEventQueued;
blendEventQueued.RootNode = thirdPerson;
blendEventQueued.Delay = -0.1;
blendEventQueued.Duration = 0.3f;
blendEventQueued.NodeName = "MovementBlend";
blendEventQueued.AnimationEntity = thirdPerson.FirstChildByName("Jump");
m_EventBroker->Publish(blendEventQueued);
}
}
if (e.Command == "DashL") {
if (e.Value > 0) {
(Field<std::string>)currentBlend["Text"]["Content"] = "Dash Left";
(Field<std::string>)queuedBlend["Text"]["Content"] = "Movement";
Events::AutoAnimationBlend blendEvent;
blendEvent.RootNode = thirdPerson;
blendEvent.Duration = 0.2f;
blendEvent.NodeName = "DashLeft";
blendEvent.Start = true;
blendEvent.Restart = true;
m_EventBroker->Publish(blendEvent);
Events::AutoAnimationBlend blendEventQueued;
blendEventQueued.RootNode = thirdPerson;
blendEventQueued.Delay = -0.1;
blendEventQueued.Duration = 0.3f;
blendEventQueued.NodeName = "MovementBlend";
blendEventQueued.AnimationEntity = thirdPerson.FirstChildByName("DashLeft");
m_EventBroker->Publish(blendEventQueued);
}
}
if (e.Command == "DashR") {
if (e.Value > 0) {
(Field<std::string>)currentBlend["Text"]["Content"] = "Dash Right";
(Field<std::string>)queuedBlend["Text"]["Content"] = "Movement";
Events::AutoAnimationBlend blendEvent;
blendEvent.RootNode = thirdPerson;
blendEvent.Duration = 0.2f;
blendEvent.NodeName = "DashRight";
blendEvent.Start = true;
blendEvent.Restart = true;
m_EventBroker->Publish(blendEvent);
Events::AutoAnimationBlend blendEventQueued;
blendEventQueued.RootNode = thirdPerson;
blendEventQueued.Delay = -0.1;
blendEventQueued.Duration = 0.3f;
blendEventQueued.NodeName = "MovementBlend";
blendEventQueued.AnimationEntity = thirdPerson.FirstChildByName("DashRight");
m_EventBroker->Publish(blendEventQueued);
}
}
if (e.Command == "DashF") {
if (e.Value > 0) {
(Field<std::string>)currentBlend["Text"]["Content"] = "Dash Forward";
(Field<std::string>)queuedBlend["Text"]["Content"] = "Movement";
Events::AutoAnimationBlend blendEvent;
blendEvent.RootNode = thirdPerson;
blendEvent.Duration = 0.2f;
blendEvent.NodeName = "DashForward";
blendEvent.Start = true;
blendEvent.Restart = true;
m_EventBroker->Publish(blendEvent);
Events::AutoAnimationBlend blendEventQueued;
blendEventQueued.RootNode = thirdPerson;
blendEventQueued.Delay = -0.1;
blendEventQueued.Duration = 0.3f;
blendEventQueued.NodeName = "MovementBlend";
blendEventQueued.AnimationEntity = thirdPerson.FirstChildByName("DashForward");
m_EventBroker->Publish(blendEventQueued);
}
}
if (e.Command == "DashB") {
if (e.Value > 0) {
(Field<std::string>)currentBlend["Text"]["Content"] = "Dash Backward";
(Field<std::string>)queuedBlend["Text"]["Content"] = "Movement";
Events::AutoAnimationBlend blendEvent;
blendEvent.RootNode = thirdPerson;
blendEvent.Duration = 0.2f;
blendEvent.NodeName = "DashBackward";
blendEvent.Start = true;
blendEvent.Restart = true;
m_EventBroker->Publish(blendEvent);
Events::AutoAnimationBlend blendEventQueued;
blendEventQueued.RootNode = thirdPerson;
blendEventQueued.Delay = -0.1;
blendEventQueued.Duration = 0.3f;
blendEventQueued.NodeName = "MovementBlend";
blendEventQueued.AnimationEntity = thirdPerson.FirstChildByName("DashBackward");
m_EventBroker->Publish(blendEventQueued);
}
}
if (e.Command == "Right") {
if (e.Value > 0) {
(Field<std::string>)MovementText["Text"]["Content"] = "Right";
Events::AutoAnimationBlend blendEvent;
blendEvent.RootNode = thirdPerson;
blendEvent.Duration = 0.3f;
blendEvent.NodeName = "Right";
blendEvent.Start = true;
m_EventBroker->Publish(blendEvent);
Events::AutoAnimationBlend blendEventFP;
blendEventFP.RootNode = firstPerson;
blendEventFP.Duration = 0.3f;
blendEventFP.NodeName = "Run";
blendEventFP.Start = true;
m_EventBroker->Publish(blendEventFP);
} else if (e.Value < 0) {
(Field<std::string>)MovementText["Text"]["Content"] = "Left";
Events::AutoAnimationBlend blendEvent;
blendEvent.RootNode = thirdPerson;
blendEvent.Duration = 0.3f;
blendEvent.NodeName = "Left";
blendEvent.Start = true;
m_EventBroker->Publish(blendEvent);
Events::AutoAnimationBlend blendEventFP;
blendEventFP.RootNode = firstPerson;
blendEventFP.Duration = 0.3f;
blendEventFP.NodeName = "Run";
blendEventFP.Reverse = true;
blendEventFP.Start = true;
m_EventBroker->Publish(blendEventFP);
}
}else if (e.Command == "Up") {
if (e.Value > 0) {
(Field<std::string>)MovementText["Text"]["Content"] = "Forward";
Events::AutoAnimationBlend blendEvent;
blendEvent.RootNode = thirdPerson;
blendEvent.Duration = 0.3f;
if (Crouch) {
blendEvent.NodeName = "Walk";
Events::AutoAnimationBlend blendEventFP;
blendEventFP.RootNode = firstPerson;
blendEventFP.Duration = 0.3f;
blendEventFP.NodeName = "Idle";
blendEventFP.Start = true;
m_EventBroker->Publish(blendEventFP);
} else {
blendEvent.NodeName = "Run";
Events::AutoAnimationBlend blendEventFP;
blendEventFP.RootNode = firstPerson;
blendEventFP.Duration = 0.3f;
blendEventFP.NodeName = "Run";
blendEventFP.Start = true;
m_EventBroker->Publish(blendEventFP);
}
blendEvent.Start = true;
m_EventBroker->Publish(blendEvent);
}else if (e.Value < 0) {
(Field<std::string>)MovementText["Text"]["Content"] = "Backward";
Events::AutoAnimationBlend blendEvent;
blendEvent.RootNode = thirdPerson;
blendEvent.Duration = 0.3f;
if(Crouch) {
blendEvent.NodeName = "Walk";
Events::AutoAnimationBlend blendEventFP;
blendEventFP.RootNode = firstPerson;
blendEventFP.Duration = 0.3f;
blendEventFP.NodeName = "Idle";
blendEventFP.Start = true;
m_EventBroker->Publish(blendEventFP);
} else {
blendEvent.NodeName = "Run";
Events::AutoAnimationBlend blendEventFP;
blendEventFP.RootNode = firstPerson;
blendEventFP.Duration = 0.3f;
blendEventFP.NodeName = "Run";
blendEventFP.Reverse = true;
blendEventFP.Start = true;
m_EventBroker->Publish(blendEventFP);
}
blendEvent.Start = true;
blendEvent.Reverse = true;
m_EventBroker->Publish(blendEvent);
}
}
if (e.Command == "Idle"){
if (e.Value > 0) {
(Field<std::string>)MovementText["Text"]["Content"] = "Idle";
Events::AutoAnimationBlend blendEvent;
blendEvent.RootNode = thirdPerson;
blendEvent.Duration = 0.5f;
blendEvent.NodeName = "Idle";
blendEvent.Start = true;
blendEvent.Reverse = true;
m_EventBroker->Publish(blendEvent);
Events::AutoAnimationBlend blendEventFP;
blendEventFP.RootNode = firstPerson;
blendEventFP.Duration = 0.3f;
blendEventFP.NodeName = "Idle";
blendEventFP.Start = true;
m_EventBroker->Publish(blendEventFP);
}
}
if (e.Command == "Crouch") {
if (e.Value > 0) {
Events::AutoAnimationBlend blendEvent;
blendEvent.RootNode = thirdPerson;
blendEvent.Duration = 0.5f;
blendEvent.NodeName = "CrouchMovement";
blendEvent.Start = true;
blendEvent.Reverse = true;
m_EventBroker->Publish(blendEvent);
Crouch = true;
} else {
Events::AutoAnimationBlend blendEvent;
blendEvent.RootNode = thirdPerson;
blendEvent.Duration = 0.5f;
blendEvent.NodeName = "StandMovement";
blendEvent.Start = true;
blendEvent.Reverse = true;
m_EventBroker->Publish(blendEvent);
Crouch = false;
}
}
if (e.Command == "Aim") {
aimMove = e.Value;
}
if (e.Command == "Shoot") {
if (e.Value > 0) {
(Field<std::string>)currentBlend["Text"]["Content"] = "Fire";
(Field<std::string>)queuedBlend["Text"]["Content"] = "Idle";
Events::AutoAnimationBlend blendEvent;
blendEvent.RootNode = thirdPerson;
blendEvent.Duration = 0.1f;
blendEvent.NodeName = "Fire";
blendEvent.Start = true;
blendEvent.Restart = true;
m_EventBroker->Publish(blendEvent);
Events::AutoAnimationBlend blendEventFP;
blendEventFP.RootNode = firstPerson;
blendEventFP.Duration = 0.1f;
blendEventFP.NodeName = "Fire";
blendEventFP.Start = true;
blendEventFP.Restart = true;
m_EventBroker->Publish(blendEventFP);
}
}
if (e.Command == "Reload") {
if (e.Value > 0) {
(Field<std::string>)currentBlend["Text"]["Content"] = "Reload";
(Field<std::string>)queuedBlend["Text"]["Content"] = "Idle";
Events::AutoAnimationBlend blendEvent;
blendEvent.RootNode = thirdPerson;
blendEvent.Duration = 0.1f;
blendEvent.NodeName = "Reload";
blendEvent.Start = true;
blendEvent.Restart = true;
m_EventBroker->Publish(blendEvent);
Events::AutoAnimationBlend blendEventQ;
blendEventQ.RootNode = thirdPerson;
blendEventQ.Duration = 0.2f;
blendEventQ.Delay = -0.1;
blendEventQ.NodeName = "Fire";
blendEventQ.Start = false;
blendEventQ.Restart = true;
blendEventQ.AnimationEntity = thirdPerson.FirstChildByName("Reload");
m_EventBroker->Publish(blendEventQ);
Events::AutoAnimationBlend blendEventFP;
blendEventFP.RootNode = firstPerson;
blendEventFP.Duration = 0.1f;
blendEventFP.NodeName = "Reload";
blendEventFP.Start = true;
blendEventFP.Restart = true;
m_EventBroker->Publish(blendEventFP);
Events::AutoAnimationBlend blendEventFPQ;
blendEventFPQ.RootNode = firstPerson;
blendEventFPQ.Duration = 0.2f;
blendEventFPQ.Delay = -0.1;
blendEventFPQ.NodeName = "Fire";
blendEventFPQ.Start = false;
blendEventFPQ.Restart = true;
blendEventFPQ.AnimationEntity = thirdPerson.FirstChildByName("Reload");
m_EventBroker->Publish(blendEventFPQ);
}
}
return true;
}
+3 -3
View File
@@ -22,7 +22,7 @@ void AutoBlendQueue::Insert(AutoBlendJob autoBlendJob)
return; return;
} }
Skeleton* skeleton = model->m_RawModel->m_Skeleton; Skeleton* skeleton = model->m_Skeleton;
if (skeleton == nullptr) { if (skeleton == nullptr) {
return; return;
} }
@@ -130,7 +130,7 @@ bool AutoBlendQueue::HasActiveBlendJob()
return HasActiveBlendJob(); return HasActiveBlendJob();
} }
Skeleton* skeleton = model->m_RawModel->m_Skeleton; Skeleton* skeleton = model->m_Skeleton;
if (skeleton == nullptr) { if (skeleton == nullptr) {
m_BlendQueue.pop_front(); m_BlendQueue.pop_front();
return HasActiveBlendJob(); return HasActiveBlendJob();
@@ -173,7 +173,7 @@ std::shared_ptr<BlendTree> AutoBlendQueue::GetBlendTree()
return nullptr; return nullptr;
} }
Skeleton* skeleton = model->m_RawModel->m_Skeleton; Skeleton* skeleton = model->m_Skeleton;
if (skeleton == nullptr) { if (skeleton == nullptr) {
return nullptr; return nullptr;
} }
@@ -26,7 +26,7 @@ void BoneAttachmentSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapp
return; return;
} }
Skeleton* skeleton = model->m_RawModel->m_Skeleton; Skeleton* skeleton = model->m_Skeleton;
if(skeleton == nullptr) { if(skeleton == nullptr) {
return; return;
+12 -5
View File
@@ -11,7 +11,7 @@ void CubeMapPass::LoadTextures(std::string cubemapName)
if (m_PreviusCubeMapTexture != cubemapName) { if (m_PreviusCubeMapTexture != cubemapName) {
m_CubeMapTextures.clear(); m_CubeMapTextures.clear();
for (int i = 0; i < 6; i++) { for (int i = 0; i < 6; i++) {
std::string path = "Textures/Test/CubeMap/" + cubemapName + "/CubeMapTest0" + std::to_string(i) + ".png"; std::string path = "Textures/Test/CubeMap/" + cubemapName + "/CubeMapTest0" + std::to_string(i) + ".dds";
m_CubeMapTextures.push_back(path); m_CubeMapTextures.push_back(path);
} }
GenerateCubeMapTexture(); GenerateCubeMapTexture();
@@ -21,15 +21,22 @@ void CubeMapPass::LoadTextures(std::string cubemapName)
void CubeMapPass::GenerateCubeMapTexture() void CubeMapPass::GenerateCubeMapTexture()
{ {
if (m_CubeMapTexture == -1) { if (m_CubeMapTexture == 0) {
glGenTextures(1, &m_CubeMapTexture); glGenTextures(1, &m_CubeMapTexture);
} }
glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapTexture); glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapTexture);
for (int i = 0; i < 6; i++) { for (int i = 0; i < 6; i++) {
PNG* img = ResourceManager::Load<PNG>(m_CubeMapTextures[i]); DDS* img = ResourceManager::Load<DDS>(m_CubeMapTextures[i]);
glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, GL_RGBA32F, img->Width, img->Height, 0, GL_RGBA, GL_UNSIGNED_BYTE, img->Data); std::size_t bpe = 16;
ResourceManager::Release("PNG", m_CubeMapTextures[i]); std::size_t numBlocksWide = std::max<std::size_t>(1, (img->Width + 3) / 4);
std::size_t numBlocksHigh = std::max<std::size_t>(1, (img->Height + 3) / 4);
std::size_t rowBytes = numBlocksWide * bpe;
std::size_t numRows = numBlocksHigh;
std::size_t numBytes = rowBytes * numBlocksHigh;
glCompressedTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, img->Width, img->Height, 0, numBytes, img->Data);
//glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, 0, GL_RGBA32F, img->Width, img->Height, 0, GL_COMPRESSED_RGBA, GL_UNSIGNED_BYTE, img->Data);
ResourceManager::Release("DDS", m_CubeMapTextures[i]);
} }
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+121
View File
@@ -0,0 +1,121 @@
#include "Rendering/DDS.h"
DDS::DDS(std::string path)
{
std::ifstream in(path.c_str(), std::ios_base::binary | std::ios_base::ate);
if (!in.is_open()) {
throw Resource::FailedLoadingException("Failed to open file.");
}
unsigned int fileSize = static_cast<unsigned int>(in.tellg());
in.seekg(0, std::ios_base::beg);
if (fileSize < sizeof(MagicNumber) + sizeof(DDS::Header_t)) {
throw Resource::FailedLoadingException("Invalid DDS file; not even big enough to contain the DDS header!");
}
// Read magic number
uint32_t magicNumber;
in.read(reinterpret_cast<char*>(&magicNumber), sizeof(MagicNumber));
if (magicNumber != DDS::MagicNumber) {
throw Resource::FailedLoadingException("Invalid DDS file; magic number doesn't match.");
}
// Read header
in.read(reinterpret_cast<char*>(&m_Header), sizeof(DDS::Header_t));
// Validate header
if (m_Header.Size != sizeof(DDS::Header_t) || m_Header.PixelFormat.Size != sizeof(DDS::Header_t::PixelFormat_t)) {
throw Resource::FailedLoadingException("Corrupt DDS file; header size doesn't match!");
}
// Make sure it's DC3 (DXT5)
char format[5];
memcpy(&format, &m_Header.PixelFormat.FourCC, 4);
format[4] = '\0';
if (strcmp(format, "DXT5")) {
std::stringstream ss;
ss << "Invalid DDS file; Unsupported compression format \"" << format << "\"";
throw Resource::FailedLoadingException(ss.str().c_str());
}
this->Width = m_Header.Width;
this->Height = m_Header.Height;
this->Format = Image::ImageFormat::RGBA;
this->Compressed = true;
if (m_Header.MipMapCount != 0) {
this->MipMapLevels = m_Header.MipMapCount - 1;
}
// Read data
std::size_t dataSize = fileSize - sizeof(MagicNumber) - sizeof(DDS::Header_t);
this->Data = new unsigned char[dataSize];
this->ByteSize = dataSize;
in.read(reinterpret_cast<char*>(this->Data), dataSize);
// Flip!
unsigned int w = this->Width;
unsigned int h = this->Height;
unsigned char* mipMapData = this->Data;
for (unsigned int i = 0; i < this->MipMapLevels; ++i) {
std::size_t bpe = 16;
std::size_t numBlocksWide = std::max<std::size_t>(1, (w + 3) / 4);
std::size_t numBlocksHigh = std::max<std::size_t>(1, (h + 3) / 4);
std::size_t rowBytes = numBlocksWide * bpe;
std::size_t numRows = numBlocksHigh;
std::size_t numBytes = rowBytes * numBlocksHigh;
FlipY(mipMapData, rowBytes, numBytes, numBlocksWide);
w = w >> 1;
h = h >> 1;
mipMapData += numBytes;
}
}
DDS::~DDS()
{
if (this->Data != nullptr) {
delete[] this->Data;
this->Data = nullptr;
}
}
void DDS::FlipY(unsigned char* data, std::size_t rowBytes, std::size_t totalSize, std::size_t numBlocksWide)
{
std::size_t height = totalSize / rowBytes;
unsigned char* topLine = data;
unsigned char* bottomLine = data + (height - 1) * rowBytes;
for (std::size_t line = 0; line < height / 2; ++line) {
Block_t* topBlocks = reinterpret_cast<Block_t*>(topLine);
Block_t* bottomBlocks = reinterpret_cast<Block_t*>(bottomLine);
for (std::size_t block = 0; block < numBlocksWide; ++block) {
flipBlock(&topBlocks[block]);
flipBlock(&bottomBlocks[block]);
std::swap(topBlocks[block], bottomBlocks[block]);
}
topLine += rowBytes;
bottomLine -= rowBytes;
}
}
void DDS::flipBlock(Block_t* block)
{
// Extract both rows of pixel Data into a 32 bit sized values.
uint32_t pixelRow0 = block->Alpha.Data[0] + ((block->Alpha.Data[1] + (block->Alpha.Data[2] << 8)) << 8);
uint32_t pixelRow1 = block->Alpha.Data[3] + ((block->Alpha.Data[4] + (block->Alpha.Data[5] << 8)) << 8);
// Swap the extracted row Data. These values will be read from and shifted into the final block locations.
uint32_t pixelRow0Swapped = ((pixelRow0 & 0x000fff) << 12) | ((pixelRow0 & 0xfff000) >> 12);
uint32_t pixelRow1Swapped = ((pixelRow1 & 0x000fff) << 12) | ((pixelRow1 & 0xfff000) >> 12);
// Swapped Data from row 1 is written
block->Alpha.Data[0] = static_cast<uint8_t>(pixelRow1Swapped & 0x0000ff);
block->Alpha.Data[1] = static_cast<uint8_t>((pixelRow1Swapped & 0x00ff00) >> 8);
block->Alpha.Data[2] = static_cast<uint8_t>((pixelRow1Swapped & 0xff0000) >> 16);
// Swapped Data from row 0 is written
block->Alpha.Data[3] = static_cast<uint8_t>(pixelRow0Swapped & 0x0000ff);
block->Alpha.Data[4] = static_cast<uint8_t>((pixelRow0Swapped & 0x00ff00) >> 8);
block->Alpha.Data[5] = static_cast<uint8_t>((pixelRow0Swapped & 0xff0000) >> 16);
std::swap(block->Data.Data[0], block->Data.Data[3]);
std::swap(block->Data.Data[1], block->Data.Data[2]);
}
+25 -30
View File
@@ -332,14 +332,6 @@ void DrawFinalPass::Draw(RenderScene& scene, BlurHUD* blurHUDPass)
glClearStencil(0x00); glClearStencil(0x00);
glClear(GL_STENCIL_BUFFER_BIT); glClear(GL_STENCIL_BUFFER_BIT);
//Fill depth buffer
state->Enable(GL_STENCIL_TEST);
state->StencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
state->StencilFunc(GL_ALWAYS, 1, 0xFF);
state->StencilMask(0xFF);
state->DepthMask(GL_FALSE);
//DrawToDepthStencilBuffer(scene.Jobs.ShieldObjects, scene);
state->DepthMask(GL_TRUE);
//Draw Opaque shielded objects //Draw Opaque shielded objects
state->Disable(GL_STENCIL_TEST); state->Disable(GL_STENCIL_TEST);
@@ -354,10 +346,10 @@ void DrawFinalPass::Draw(RenderScene& scene, BlurHUD* blurHUDPass)
GLERROR("OpaqueObjects"); GLERROR("OpaqueObjects");
//state->Disable(GL_STENCIL_TEST); //state->Disable(GL_STENCIL_TEST);
//Draw Transparen Shielded objects //Draw Transparen objects
state->BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); state->BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
DrawModelRenderQueuesWithShieldCheck(scene.Jobs.TransparentObjects, scene); //might need changing DrawModelRenderQueuesWithShieldCheck(scene.Jobs.TransparentObjects, scene); //might need changing
GLERROR("Shielded Transparent objects"); GLERROR("Transparent objects");
//Generate blur texture. //Generate blur texture.
delete state; delete state;
@@ -379,12 +371,6 @@ void DrawFinalPass::Draw(RenderScene& scene, BlurHUD* blurHUDPass)
} else { } else {
stateSprite = new DrawFinalPassState(m_FinalPassFrameBuffer->GetHandle()); stateSprite = new DrawFinalPassState(m_FinalPassFrameBuffer->GetHandle());
} }
//Draw Transparen objects
//state->BlendFunc(GL_ONE, GL_ONE);
//state->StencilFunc(GL_EQUAL, 1, 0xFF);
//DrawModelRenderQueues(scene.Jobs.TransparentObjects, scene);
GLERROR("TransparentObjects");
//state->BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
stateSprite->Enable(GL_DEPTH_TEST); stateSprite->Enable(GL_DEPTH_TEST);
//stateSprite->AlphaFunc(GL_GEQUAL, 0.05f); //stateSprite->AlphaFunc(GL_GEQUAL, 0.05f);
//stateSprite->Enable(GL_ALPHA_TEST); //stateSprite->Enable(GL_ALPHA_TEST);
@@ -638,7 +624,7 @@ void DrawFinalPass::DrawModelRenderQueues(std::list<std::shared_ptr<RenderJob>>&
std::vector<glm::mat4> frameBones; std::vector<glm::mat4> frameBones;
if (modelJob->BlendTree != nullptr) { if (modelJob->BlendTree != nullptr) {
frameBones = modelJob->BlendTree->GetFinalPose(); frameBones = modelJob->BlendTree->GetFinalPose();
} else { } else if (modelJob->Skeleton != nullptr) {
frameBones = modelJob->Skeleton->GetTPose(); frameBones = modelJob->Skeleton->GetTPose();
} }
glUniformMatrix4fv(glGetUniformLocation(forwardSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0])); glUniformMatrix4fv(glGetUniformLocation(forwardSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
@@ -1537,10 +1523,12 @@ void DrawFinalPass::BindExplosionTextures(GLuint shaderHandle, std::shared_ptr<E
if (job->NormalTexture.size() > 0 && job->NormalTexture[0]->Texture != nullptr) { if (job->NormalTexture.size() > 0 && job->NormalTexture[0]->Texture != nullptr) {
glBindTexture(GL_TEXTURE_2D, job->NormalTexture[0]->Texture->m_Texture); glBindTexture(GL_TEXTURE_2D, job->NormalTexture[0]->Texture->m_Texture);
glUniform2fv(glGetUniformLocation(shaderHandle, "NormalUVRepeat"), 1, glm::value_ptr(job->NormalTexture[0]->UVRepeat)); glUniform2fv(glGetUniformLocation(shaderHandle, "NormalUVRepeat"), 1, glm::value_ptr(job->NormalTexture[0]->UVRepeat));
glUniform1i(glGetUniformLocation(shaderHandle, "NormalTextureType"), job->NormalTexture[0]->Texture->m_Type);
} }
else { else {
glBindTexture(GL_TEXTURE_2D, m_NeutralNormalTexture->m_Texture); glBindTexture(GL_TEXTURE_2D, m_NeutralNormalTexture->m_Texture);
glUniform2fv(glGetUniformLocation(shaderHandle, "NormalUVRepeat"), 1, glm::value_ptr(glm::vec2(1.0f, 1.0f))); glUniform2fv(glGetUniformLocation(shaderHandle, "NormalUVRepeat"), 1, glm::value_ptr(glm::vec2(1.0f, 1.0f)));
glUniform1i(glGetUniformLocation(shaderHandle, "NormalTextureType"), m_NeutralNormalTexture->m_Type);
} }
glActiveTexture(GL_TEXTURE3); glActiveTexture(GL_TEXTURE3);
@@ -1593,10 +1581,12 @@ void DrawFinalPass::BindExplosionTextures(GLuint shaderHandle, std::shared_ptr<E
if (job->NormalTexture.size() > i && job->NormalTexture[i]->Texture != nullptr) { if (job->NormalTexture.size() > i && job->NormalTexture[i]->Texture != nullptr) {
glBindTexture(GL_TEXTURE_2D, job->NormalTexture[i]->Texture->m_Texture); glBindTexture(GL_TEXTURE_2D, job->NormalTexture[i]->Texture->m_Texture);
glUniform2fv(glGetUniformLocation(shaderHandle, std::string(UniformName + ((char)(i + '1'))).c_str()), 1, glm::value_ptr(job->NormalTexture[i]->UVRepeat)); glUniform2fv(glGetUniformLocation(shaderHandle, std::string(UniformName + ((char)(i + '1'))).c_str()), 1, glm::value_ptr(job->NormalTexture[i]->UVRepeat));
glUniform1i(glGetUniformLocation(shaderHandle, "NormalTextureType"), job->NormalTexture[0]->Texture->m_Type);
} }
else { else {
glBindTexture(GL_TEXTURE_2D, m_NeutralNormalTexture->m_Texture); glBindTexture(GL_TEXTURE_2D, m_NeutralNormalTexture->m_Texture);
glUniform2fv(glGetUniformLocation(shaderHandle, std::string(UniformName + ((char)(i + '1'))).c_str()), 1, glm::value_ptr(glm::vec2(1.0f, 1.0f))); glUniform2fv(glGetUniformLocation(shaderHandle, std::string(UniformName + ((char)(i + '1'))).c_str()), 1, glm::value_ptr(glm::vec2(1.0f, 1.0f)));
glUniform1i(glGetUniformLocation(shaderHandle, "NormalTextureType"), m_NeutralNormalTexture->m_Type);
} }
texturePosition++; texturePosition++;
} }
@@ -1655,10 +1645,12 @@ void DrawFinalPass::BindModelTextures(GLuint shaderHandle, std::shared_ptr<Model
if (job->NormalTexture.size() > 0 && job->NormalTexture[0]->Texture != nullptr) { if (job->NormalTexture.size() > 0 && job->NormalTexture[0]->Texture != nullptr) {
glBindTexture(GL_TEXTURE_2D, job->NormalTexture[0]->Texture->m_Texture); glBindTexture(GL_TEXTURE_2D, job->NormalTexture[0]->Texture->m_Texture);
glUniform2fv(glGetUniformLocation(shaderHandle, "NormalUVRepeat"), 1, glm::value_ptr(job->NormalTexture[0]->UVRepeat)); glUniform2fv(glGetUniformLocation(shaderHandle, "NormalUVRepeat"), 1, glm::value_ptr(job->NormalTexture[0]->UVRepeat));
glUniform1i(glGetUniformLocation(shaderHandle, "NormalTextureType"), job->NormalTexture[0]->Texture->m_Type);
} }
else { else {
glBindTexture(GL_TEXTURE_2D, m_NeutralNormalTexture->m_Texture); glBindTexture(GL_TEXTURE_2D, m_NeutralNormalTexture->m_Texture);
glUniform2fv(glGetUniformLocation(shaderHandle, "NormalUVRepeat"), 1, glm::value_ptr(glm::vec2(1.0f, 1.0f))); //glUniform2fv(glGetUniformLocation(shaderHandle, "NormalUVRepeat"), 1, glm::value_ptr(glm::vec2(1.0f, 1.0f)));
glUniform1i(glGetUniformLocation(shaderHandle, "NormalTextureType"), m_NeutralNormalTexture->m_Type);
} }
glActiveTexture(GL_TEXTURE3); glActiveTexture(GL_TEXTURE3);
@@ -1690,57 +1682,60 @@ void DrawFinalPass::BindModelTextures(GLuint shaderHandle, std::shared_ptr<Model
int texturePosition = GL_TEXTURE2; int texturePosition = GL_TEXTURE2;
//Bind 5 diffuse textures //Bind 5 diffuse textures
std::string UniformName = "DiffuseUVRepeat"; std::string UVRepeatName = "DiffuseUVRepeat";
for (unsigned int i = 0; i < 3; i++) { for (unsigned int i = 0; i < 3; i++) {
glActiveTexture(texturePosition); glActiveTexture(texturePosition);
if (job->DiffuseTexture.size() > i && job->DiffuseTexture[i]->Texture != nullptr) { if (job->DiffuseTexture.size() > i && job->DiffuseTexture[i]->Texture != nullptr) {
glBindTexture(GL_TEXTURE_2D, job->DiffuseTexture[i]->Texture->m_Texture); glBindTexture(GL_TEXTURE_2D, job->DiffuseTexture[i]->Texture->m_Texture);
glUniform2fv(glGetUniformLocation(shaderHandle, std::string(UniformName + ((char)(i + '1'))).c_str()), 1, glm::value_ptr(job->DiffuseTexture[i]->UVRepeat)); glUniform2fv(glGetUniformLocation(shaderHandle, std::string(UVRepeatName + ((char)(i + '1'))).c_str()), 1, glm::value_ptr(job->DiffuseTexture[i]->UVRepeat));
} else { } else {
glBindTexture(GL_TEXTURE_2D, m_WhiteTexture->m_Texture); glBindTexture(GL_TEXTURE_2D, m_WhiteTexture->m_Texture);
glUniform2fv(glGetUniformLocation(shaderHandle, std::string(UniformName + ((char)(i + '1'))).c_str()), 1, glm::value_ptr(glm::vec2(1.0f, 1.0f))); glUniform2fv(glGetUniformLocation(shaderHandle, std::string(UVRepeatName + ((char)(i + '1'))).c_str()), 1, glm::value_ptr(glm::vec2(1.0f, 1.0f)));
} }
texturePosition++; texturePosition++;
} }
//Bind 5 Normal textures //Bind 5 Normal textures
UniformName = "NormalUVRepeat"; std::string textureType = "NormalTextureType";
UVRepeatName = "NormalUVRepeat";
for (unsigned int i = 0; i < 3; i++) { for (unsigned int i = 0; i < 3; i++) {
glActiveTexture(texturePosition); glActiveTexture(texturePosition);
if (job->NormalTexture.size() > i && job->NormalTexture[i]->Texture != nullptr) { if (job->NormalTexture.size() > i && job->NormalTexture[i]->Texture != nullptr) {
glBindTexture(GL_TEXTURE_2D, job->NormalTexture[i]->Texture->m_Texture); glBindTexture(GL_TEXTURE_2D, job->NormalTexture[i]->Texture->m_Texture);
glUniform2fv(glGetUniformLocation(shaderHandle, std::string(UniformName + ((char)(i + '1'))).c_str()), 1, glm::value_ptr(job->NormalTexture[i]->UVRepeat)); glUniform2fv(glGetUniformLocation(shaderHandle, std::string(UVRepeatName + ((char)(i + '1'))).c_str()), 1, glm::value_ptr(job->NormalTexture[i]->UVRepeat));
glUniform1i(glGetUniformLocation(shaderHandle, std::string(textureType + ((char)(i + '1'))).c_str()), job->NormalTexture[i]->Texture->m_Type);
} else { } else {
glBindTexture(GL_TEXTURE_2D, m_NeutralNormalTexture->m_Texture); glBindTexture(GL_TEXTURE_2D, m_NeutralNormalTexture->m_Texture);
glUniform2fv(glGetUniformLocation(shaderHandle, std::string(UniformName + ((char)(i + '1'))).c_str()), 1, glm::value_ptr(glm::vec2(1.0f, 1.0f))); glUniform2fv(glGetUniformLocation(shaderHandle, std::string(UVRepeatName + ((char)(i + '1'))).c_str()), 1, glm::value_ptr(glm::vec2(1.0f, 1.0f)));
glUniform1i(glGetUniformLocation(shaderHandle, std::string(textureType + ((char)(i + '1'))).c_str()), m_NeutralNormalTexture->m_Type);
} }
texturePosition++; texturePosition++;
} }
//Bind 5 Specular textures //Bind 5 Specular textures
UniformName = "SpecularUVRepeat"; UVRepeatName = "SpecularUVRepeat";
for (unsigned int i = 0; i < 3; i++) { for (unsigned int i = 0; i < 3; i++) {
glActiveTexture(texturePosition); glActiveTexture(texturePosition);
if (job->SpecularTexture.size() > i && job->SpecularTexture[i]->Texture != nullptr) { if (job->SpecularTexture.size() > i && job->SpecularTexture[i]->Texture != nullptr) {
glBindTexture(GL_TEXTURE_2D, job->SpecularTexture[i]->Texture->m_Texture); glBindTexture(GL_TEXTURE_2D, job->SpecularTexture[i]->Texture->m_Texture);
glUniform2fv(glGetUniformLocation(shaderHandle, std::string(UniformName + ((char)(i + '1'))).c_str()), 1, glm::value_ptr(job->SpecularTexture[i]->UVRepeat)); glUniform2fv(glGetUniformLocation(shaderHandle, std::string(UVRepeatName + ((char)(i + '1'))).c_str()), 1, glm::value_ptr(job->SpecularTexture[i]->UVRepeat));
} else { } else {
glBindTexture(GL_TEXTURE_2D, m_GreyTexture->m_Texture); glBindTexture(GL_TEXTURE_2D, m_GreyTexture->m_Texture);
glUniform2fv(glGetUniformLocation(shaderHandle, std::string(UniformName + ((char)(i + '1'))).c_str()), 1, glm::value_ptr(glm::vec2(1.0f, 1.0f))); glUniform2fv(glGetUniformLocation(shaderHandle, std::string(UVRepeatName + ((char)(i + '1'))).c_str()), 1, glm::value_ptr(glm::vec2(1.0f, 1.0f)));
} }
texturePosition++; texturePosition++;
} }
//Bind 5 Incandescence textures //Bind 5 Incandescence textures
UniformName = "GlowUVRepeat"; UVRepeatName = "GlowUVRepeat";
for (unsigned int i = 0; i < 3; i++) { for (unsigned int i = 0; i < 3; i++) {
glActiveTexture(texturePosition); glActiveTexture(texturePosition);
if (job->IncandescenceTexture.size() > i && job->IncandescenceTexture[i]->Texture != nullptr) { if (job->IncandescenceTexture.size() > i && job->IncandescenceTexture[i]->Texture != nullptr) {
glBindTexture(GL_TEXTURE_2D, job->IncandescenceTexture[i]->Texture->m_Texture); glBindTexture(GL_TEXTURE_2D, job->IncandescenceTexture[i]->Texture->m_Texture);
glUniform2fv(glGetUniformLocation(shaderHandle, std::string(UniformName + ((char)(i + '1'))).c_str()), 1, glm::value_ptr(job->IncandescenceTexture[i]->UVRepeat)); glUniform2fv(glGetUniformLocation(shaderHandle, std::string(UVRepeatName + ((char)(i + '1'))).c_str()), 1, glm::value_ptr(job->IncandescenceTexture[i]->UVRepeat));
} else { } else {
glBindTexture(GL_TEXTURE_2D, m_BlackTexture->m_Texture); glBindTexture(GL_TEXTURE_2D, m_BlackTexture->m_Texture);
glUniform2fv(glGetUniformLocation(shaderHandle, std::string(UniformName + ((char)(i + '1'))).c_str()), 1, glm::value_ptr(glm::vec2(1.0f, 1.0f))); glUniform2fv(glGetUniformLocation(shaderHandle, std::string(UVRepeatName + ((char)(i + '1'))).c_str()), 1, glm::value_ptr(glm::vec2(1.0f, 1.0f)));
} }
texturePosition++; texturePosition++;
} }
+24 -12
View File
@@ -3,9 +3,9 @@
Model::Model(std::string fileName) Model::Model(std::string fileName)
{ {
//Try loading the model asyncronously, if it throws any exceptions then let it propagate back to caller. //Try loading the model asyncronously, if it throws any exceptions then let it propagate back to caller.
m_RawModel = ResourceManager::Load<RawModel, true>(fileName); auto rawModel = ResourceManager::Load<RawModel, true>(fileName);
for (auto& materialProperty : m_RawModel->m_Materials) { for (auto& materialProperty : rawModel->m_Materials) {
switch (materialProperty.type) { switch (materialProperty.type) {
case RawModel::MaterialType::SingleTextures: case RawModel::MaterialType::SingleTextures:
{ {
@@ -46,11 +46,11 @@ Model::Model(std::string fileName)
glGenBuffers(1, &buffer); glGenBuffers(1, &buffer);
glBindBuffer(GL_ARRAY_BUFFER, buffer); glBindBuffer(GL_ARRAY_BUFFER, buffer);
glBufferData(GL_ARRAY_BUFFER, m_RawModel->NumVertices() * m_RawModel->VertexSize(), m_RawModel->Vertices(), GL_STATIC_DRAW); glBufferData(GL_ARRAY_BUFFER, rawModel->NumVertices() * rawModel->VertexSize(), rawModel->Vertices(), GL_STATIC_DRAW);
glGenBuffers(1, &ElementBuffer); glGenBuffers(1, &ElementBuffer);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ElementBuffer); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ElementBuffer);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, m_RawModel->m_Indices.size() * sizeof(unsigned int), &m_RawModel->m_Indices[0], GL_STATIC_DRAW); glBufferData(GL_ELEMENT_ARRAY_BUFFER, rawModel->Indices().size() * sizeof(unsigned int), rawModel->Indices().data(), GL_STATIC_DRAW);
glGenVertexArrays(1, &VAO); glGenVertexArrays(1, &VAO);
glBindVertexArray(VAO); glBindVertexArray(VAO);
@@ -58,7 +58,7 @@ Model::Model(std::string fileName)
glBindBuffer(GL_ARRAY_BUFFER, buffer); glBindBuffer(GL_ARRAY_BUFFER, buffer);
std::vector<int> structSizes; std::vector<int> structSizes;
if (m_RawModel->IsSkinned()) { if (rawModel->IsSkinned()) {
structSizes = { 3, 3, 3, 3, 2, 4, 4 }; structSizes = { 3, 3, 3, 3, 2, 4, 4 };
} else { } else {
structSizes = { 3, 3, 3, 3, 2 }; structSizes = { 3, 3, 3, 3, 2 };
@@ -77,7 +77,7 @@ Model::Model(std::string fileName)
glVertexAttribPointer(element, structSizes[element], GL_FLOAT, GL_FALSE, stride, (GLvoid*)(sizeof(GLfloat) * (offset += structSizes[element - 1]))); element++; glVertexAttribPointer(element, structSizes[element], GL_FLOAT, GL_FALSE, stride, (GLvoid*)(sizeof(GLfloat) * (offset += structSizes[element - 1]))); element++;
glVertexAttribPointer(element, structSizes[element], GL_FLOAT, GL_FALSE, stride, (GLvoid*)(sizeof(GLfloat) * (offset += structSizes[element - 1]))); element++; glVertexAttribPointer(element, structSizes[element], GL_FLOAT, GL_FALSE, stride, (GLvoid*)(sizeof(GLfloat) * (offset += structSizes[element - 1]))); element++;
glVertexAttribPointer(element, structSizes[element], GL_FLOAT, GL_FALSE, stride, (GLvoid*)(sizeof(GLfloat) * (offset += structSizes[element - 1]))); element++; glVertexAttribPointer(element, structSizes[element], GL_FLOAT, GL_FALSE, stride, (GLvoid*)(sizeof(GLfloat) * (offset += structSizes[element - 1]))); element++;
if (m_RawModel->IsSkinned()) { if (rawModel->IsSkinned()) {
glVertexAttribPointer(element, structSizes[element], GL_FLOAT, GL_FALSE, stride, (GLvoid*)(sizeof(GLfloat) * (offset += structSizes[element - 1]))); element++; glVertexAttribPointer(element, structSizes[element], GL_FLOAT, GL_FALSE, stride, (GLvoid*)(sizeof(GLfloat) * (offset += structSizes[element - 1]))); element++;
glVertexAttribPointer(element, structSizes[element], GL_FLOAT, GL_FALSE, stride, (GLvoid*)(sizeof(GLfloat) * (offset += structSizes[element - 1]))); element++; glVertexAttribPointer(element, structSizes[element], GL_FLOAT, GL_FALSE, stride, (GLvoid*)(sizeof(GLfloat) * (offset += structSizes[element - 1]))); element++;
} }
@@ -89,7 +89,7 @@ Model::Model(std::string fileName)
glEnableVertexAttribArray(2); glEnableVertexAttribArray(2);
glEnableVertexAttribArray(3); glEnableVertexAttribArray(3);
glEnableVertexAttribArray(4); glEnableVertexAttribArray(4);
if (m_RawModel->IsSkinned()) { if (rawModel->IsSkinned()) {
glEnableVertexAttribArray(5); glEnableVertexAttribArray(5);
glEnableVertexAttribArray(6); glEnableVertexAttribArray(6);
} }
@@ -99,17 +99,29 @@ Model::Model(std::string fileName)
glm::vec3 mini(INFINITY); glm::vec3 mini(INFINITY);
glm::vec3 maxi(-INFINITY); glm::vec3 maxi(-INFINITY);
for (unsigned int i = 0; i < rawModel->NumVertices(); i++) {
for (unsigned int i = 0; i < m_RawModel->NumVertices(); i++) { const auto& v = rawModel->Vertices()[i];
const auto& v = m_RawModel->Vertices()[i];
mini = glm::min(mini, v.Position); mini = glm::min(mini, v.Position);
maxi = glm::max(maxi, v.Position); maxi = glm::max(maxi, v.Position);
} }
m_Box = AABB(mini, maxi); m_Box = AABB(mini, maxi);
m_Skeleton = rawModel->m_Skeleton;
m_Materials = rawModel->m_Materials;
m_Indices = rawModel->CollisionIndices();
m_IsSkinned = rawModel->IsSkinned();
// Copy vertex positions for collisions later
m_Vertices = rawModel->CollisionVertices();
ResourceManager::Release("RawModel", fileName);
} }
Model::~Model() Model::~Model()
{ {
if (m_Skeleton != nullptr) {
delete m_Skeleton;
}
for (auto material : m_Materials) {
delete material.material;
}
} }
+2 -2
View File
@@ -96,10 +96,10 @@ PNG::~PNG()
void PNG::pngErrorFunction(png_structp png_ptr, png_const_charp error_msg) void PNG::pngErrorFunction(png_structp png_ptr, png_const_charp error_msg)
{ {
LOG_WARNING("%s", error_msg); LOG_WARNING("libpng error: %s", error_msg);
} }
void PNG::pngWarningFunction(png_structp png_ptr, png_const_charp warning_msg) void PNG::pngWarningFunction(png_structp png_ptr, png_const_charp warning_msg)
{ {
LOG_WARNING("%s", warning_msg); LOG_WARNING("libpng warning: %s", warning_msg);
} }
+1 -1
View File
@@ -115,7 +115,7 @@ void PickingPass::Draw(RenderScene& scene)
std::vector<glm::mat4> frameBones; std::vector<glm::mat4> frameBones;
if (modelJob->BlendTree != nullptr) { if (modelJob->BlendTree != nullptr) {
frameBones = modelJob->BlendTree->GetFinalPose(); frameBones = modelJob->BlendTree->GetFinalPose();
} else { } else if (modelJob->Skeleton != nullptr) {
frameBones = modelJob->Skeleton->GetTPose(); frameBones = modelJob->Skeleton->GetTPose();
} }
glUniformMatrix4fv(glGetUniformLocation(shaderSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0])); glUniformMatrix4fv(glGetUniformLocation(shaderSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
+87 -10
View File
@@ -11,6 +11,7 @@ RawModelCustom::RawModelCustom(std::string fileName)
ReadMeshFile(fileName); ReadMeshFile(fileName);
ReadMaterialFile(fileName); ReadMaterialFile(fileName);
ReadAnimationFile(fileName); ReadAnimationFile(fileName);
ReadCollisionFile(fileName);
} }
void RawModelCustom::ReadMeshFile(std::string filePath) void RawModelCustom::ReadMeshFile(std::string filePath)
@@ -71,11 +72,11 @@ void RawModelCustom::ReadVertices(std::size_t& offset, char* fileData, const uns
memcpy(&m_SkinedVertices[0], fileData + offset, m_SkinedVertices.size() * sizeof(SkinedVertex)); memcpy(&m_SkinedVertices[0], fileData + offset, m_SkinedVertices.size() * sizeof(SkinedVertex));
offset += m_SkinedVertices.size() * sizeof(SkinedVertex); offset += m_SkinedVertices.size() * sizeof(SkinedVertex);
} else { } else {
if (offset + m_Vertices.size() * sizeof(Vertex) > fileByteSize) { if (offset + m_Vertices.size() * sizeof(RenderVertex) > fileByteSize) {
throw Resource::FailedLoadingException("Reading vertices failed"); throw Resource::FailedLoadingException("Reading vertices failed");
} }
memcpy(&m_Vertices[0], fileData + offset, m_Vertices.size() * sizeof(Vertex)); memcpy(&m_Vertices[0], fileData + offset, m_Vertices.size() * sizeof(RenderVertex));
offset += m_Vertices.size() * sizeof(Vertex); offset += m_Vertices.size() * sizeof(RenderVertex);
} }
#else #else
#endif #endif
@@ -286,7 +287,7 @@ void RawModelCustom::ReadMaterialTextureProperties(RawModelCustom::TextureProper
} }
texture.TexturePath = "Textures/"; texture.TexturePath = "Textures/";
texture.TexturePath += (fileData + offset); texture.TexturePath += (fileData + offset);
texture.TexturePath += ".png"; texture.TexturePath += ".dds";
offset += nameLength; offset += nameLength;
if (offset + sizeof(glm::vec2) > fileByteSize) { if (offset + sizeof(glm::vec2) > fileByteSize) {
throw Resource::FailedLoadingException("Reading Material texture UVTiling failed"); throw Resource::FailedLoadingException("Reading Material texture UVTiling failed");
@@ -491,14 +492,90 @@ void RawModelCustom::ReadAnimationKeyFrame(std::size_t& offset, char* fileData,
} }
void RawModelCustom::ReadCollisionFile(std::string filePath) {
char* fileData;
filePath += ".colli";
std::ifstream in(filePath.c_str(), std::ios_base::binary | std::ios_base::ate);
if (!in.is_open()) {
return;
}
unsigned int fileByteSize = static_cast<unsigned int>(in.tellg());
in.seekg(0, std::ios_base::beg);
fileData = new char[fileByteSize];
in.read(fileData, fileByteSize);
in.close();
std::size_t offset = 0;
if (fileByteSize > 0) {
ReadCollisionFileData(offset, fileData, fileByteSize);
}
hasCollisionMesh = true;
delete[] fileData;
}
const std::vector<glm::vec3>& RawModelCustom::CollisionVertices() {
if (hasCollisionMesh) {
return m_CollisionVertices;
}
else if (hasSkin) {
// We don't do collisions against skinned meshes now.
m_CollisionVertices = std::vector<glm::vec3>();
return m_CollisionVertices;
}
else {
return ConstructCollisionList();
}
};
void RawModelCustom::ReadCollisionFileData(std::size_t& offset, char* fileData, const unsigned int& fileByteSize){
m_CollisionVertices.resize(static_cast<std::size_t>(*(unsigned int*)(fileData + offset)));
offset += sizeof(unsigned int);
m_CollisionIndices.resize(static_cast<std::size_t>(*(unsigned int*)(fileData + offset)));
offset += sizeof(unsigned int);
if (offset + m_CollisionVertices.size() * sizeof(glm::vec3) > fileByteSize) {
throw Resource::FailedLoadingException("Reading collision vertices failed");
}
memcpy(&m_CollisionVertices[0], fileData + offset, m_CollisionVertices.size() * sizeof(glm::vec3));
offset += m_CollisionVertices.size() * sizeof(glm::vec3);
if (offset + m_CollisionIndices.size() * sizeof(unsigned int) > fileByteSize) {
throw Resource::FailedLoadingException("Reading collision indices failed");
}
memcpy(&m_CollisionIndices[0], fileData + offset, m_CollisionIndices.size() * sizeof(unsigned int));
offset += m_CollisionIndices.size() * sizeof(unsigned int);
}
const std::vector<glm::vec3>& RawModelCustom::ConstructCollisionList()
{
if (!hasCollisionMesh && m_CollisionVertices.size() == 0) {
if (hasSkin) {
m_CollisionVertices.reserve(m_SkinedVertices.size());
for (const auto& vertex : m_SkinedVertices) {
m_CollisionVertices.push_back(vertex.Position);
}
} else {
m_CollisionVertices.reserve(m_Vertices.size());
for (const auto& vertex : m_Vertices) {
m_CollisionVertices.push_back(vertex.Position);
}
}
}
return m_CollisionVertices;
}
RawModelCustom::~RawModelCustom() RawModelCustom::~RawModelCustom()
{ {
if (m_Skeleton != nullptr) { // Ownership of skeleton and materials get transferred to Model
delete m_Skeleton; // if (m_Skeleton != nullptr) {
} // delete m_Skeleton;
for (auto material : m_Materials) { // }
delete material.material; //for (auto material : m_Materials) {
} // delete material.material;
//}
} }
#endif #endif
-1
View File
@@ -19,7 +19,6 @@ void Renderer::Initialize()
{ {
m_SSAO_Quality = m_Config->Get<int>("SSAO.Quality", 0); m_SSAO_Quality = m_Config->Get<int>("SSAO.Quality", 0);
m_GLOW_Quality = m_Config->Get<int>("GLOW.Quality", 0); m_GLOW_Quality = m_Config->Get<int>("GLOW.Quality", 0);
m_MSAA_Level = m_Config->Get<unsigned int>("MSAA.Level", 0);
InitializeWindow(); InitializeWindow();
InitializeRenderPasses(); InitializeRenderPasses();
+1 -1
View File
@@ -261,7 +261,7 @@ void ShadowPass::Draw(RenderScene & scene)
std::vector<glm::mat4> frameBones; std::vector<glm::mat4> frameBones;
if (modelJob->BlendTree != nullptr) { if (modelJob->BlendTree != nullptr) {
frameBones = modelJob->BlendTree->GetFinalPose(); frameBones = modelJob->BlendTree->GetFinalPose();
} else { } else if (modelJob->Skeleton != nullptr) {
frameBones = modelJob->Skeleton->GetTPose(); frameBones = modelJob->Skeleton->GetTPose();
} }
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0])); glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
+58 -9
View File
@@ -2,11 +2,21 @@
Texture::Texture(std::string path) Texture::Texture(std::string path)
{ {
PNG* img = ResourceManager::Load<PNG, true>(path); //TODO: Make this threaded. Catch exeptions in all other load places. std::string ext = boost::filesystem::path(path).extension().string();
Image* img;
if (ext == ".png") {
img = ResourceManager::Load<PNG, true>(path);
m_Type = TextureType::cPNG;
} else if (ext == ".dds") {
img = ResourceManager::Load<DDS, true>(path);
m_Type = TextureType::cDDS;
} else {
m_Type = TextureType::cInvalid;
throw Resource::FailedLoadingException("Texture extension is not .png nor .dds");
}
this->Width = img->Width; this->Width = img->Width;
this->Height = img->Height; this->Height = img->Height;
this->Data = img->Data;
GLint format; GLint format;
switch (img->Format) { switch (img->Format) {
@@ -17,20 +27,59 @@ Texture::Texture(std::string path)
format = GL_RGBA; format = GL_RGBA;
break; break;
} }
//Master hade PNG release here...
// Construct the OpenGL texture // Construct the OpenGL texture
glGenTextures(1, &m_Texture); glGenTextures(1, &m_Texture);
glBindTexture(GL_TEXTURE_2D, m_Texture); glBindTexture(GL_TEXTURE_2D, m_Texture);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glTexImage2D(GL_TEXTURE_2D, 0, format, img->Width, img->Height, 0, format, GL_UNSIGNED_BYTE, img->Data);
glGenerateMipmap(GL_TEXTURE_2D);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
GLERROR("Texture load"); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
if (!img->Compressed) {
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
}
unsigned int w = img->Width;
unsigned int h = img->Width;
unsigned char* data = img->Data;
for (int mipLevel = 0; mipLevel < 1 + img->MipMapLevels; mipLevel++) {
if (img->Compressed) {
//LOG_DEBUG("mipLevel: %i", mipLevel);
//LOG_DEBUG("w: %i", w);
//LOG_DEBUG("h: %i", h);
ResourceManager::Release("PNG", path); std::size_t bpe = 16;
std::size_t numBlocksWide = std::max<std::size_t>(1, (w + 3) / 4);
std::size_t numBlocksHigh = std::max<std::size_t>(1, (h + 3) / 4);
std::size_t rowBytes = numBlocksWide * bpe;
std::size_t numRows = numBlocksHigh;
std::size_t numBytes = rowBytes * numBlocksHigh;
//LOG_DEBUG("numBytes: %i", numBytes);
glCompressedTexImage2D(GL_TEXTURE_2D, mipLevel, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, w, h, 0, numBytes, data);
data += numBytes;
} else {
glTexImage2D(GL_TEXTURE_2D, mipLevel, format, img->Width, img->Height, 0, format, GL_UNSIGNED_BYTE, img->Data);
}
w = w >> 1;
h = h >> 1;
}
//LOG_DEBUG("REMAINDER: %i", img->ByteSize - (data - img->Data));
// Generate mipmaps if the image file doesn't contain them
if (img->MipMapLevels == 0) {
glGenerateMipmap(GL_TEXTURE_2D);
}
if (ext == ".png") {
ResourceManager::Release("PNG", path);
} else if (ext == ".dds") {
ResourceManager::Release("DDS", path);
}
if (GLERROR("Texture load")) {
throw Resource::FailedLoadingException("GL texture generation failed");
}
} }
Texture::~Texture() Texture::~Texture()
+2 -1
View File
@@ -54,8 +54,9 @@ Game::Game(int argc, char* argv[])
ResourceManager::RegisterType<Model>("Model"); ResourceManager::RegisterType<Model>("Model");
ResourceManager::RegisterType<RawModel>("RawModel"); ResourceManager::RegisterType<RawModel>("RawModel");
ResourceManager::RegisterType<Texture>("Texture"); ResourceManager::RegisterType<Texture>("Texture");
ResourceManager::RegisterType<TextureSprite>("TextureSprite");
ResourceManager::RegisterType<PNG>("PNG"); ResourceManager::RegisterType<PNG>("PNG");
ResourceManager::RegisterType<TextureSprite>("TextureSprite");
ResourceManager::RegisterType<DDS>("DDS");
ResourceManager::RegisterType<ShaderProgram>("ShaderProgram"); ResourceManager::RegisterType<ShaderProgram>("ShaderProgram");
ResourceManager::RegisterType<EntityFile>("EntityFile"); ResourceManager::RegisterType<EntityFile>("EntityFile");
ResourceManager::RegisterType<EntityXMLFile>("EntityXMLFile"); ResourceManager::RegisterType<EntityXMLFile>("EntityXMLFile");
+2 -2
View File
@@ -25,9 +25,9 @@ bool HealthSystem::OnPlayerDamaged(Events::PlayerDamage& e)
//if player has the boost from a defender, subtract the damage taken by StrengthOfEffect amount //if player has the boost from a defender, subtract the damage taken by StrengthOfEffect amount
auto playerBoostDefenderEntity = e.Victim.FirstChildByName("BoostDefender"); auto playerBoostDefenderEntity = e.Victim.FirstChildByName("BoostDefender");
if (playerBoostDefenderEntity.Valid()) { if (playerBoostDefenderEntity.Valid()) {
e.Damage -= (double)playerBoostDefenderEntity["BoostDefender"]["StrengthOfEffect"]; e.Damage -= (const double&)playerBoostDefenderEntity["BoostDefender"]["StrengthOfEffect"];
} }
if (health > 0) { if (health > 0 && e.Damage > 0) {
health -= e.Damage; health -= e.Damage;
if (health <= 0.0) { if (health <= 0.0) {
Events::PlayerDeath ePlayerDeath; Events::PlayerDeath ePlayerDeath;
+2
View File
@@ -135,6 +135,8 @@ bool MainMenuSystem::OnInputCommand(const Events::InputCommand& e)
OpenSubMenu(e); OpenSubMenu(e);
} else if (e.Command == "Resolution" && e.Value == 1) { } else if (e.Command == "Resolution" && e.Value == 1) {
OpenDropDown(e); OpenDropDown(e);
} else if (e.Command == "Quit" && e.Value == 1) {
exit(EXIT_FAILURE);
} }
return true; return true;
} }
+22 -19
View File
@@ -10,8 +10,7 @@ PlayerDeathSystem::PlayerDeathSystem(SystemParams params)
} }
void PlayerDeathSystem::Update(double dt) void PlayerDeathSystem::Update(double dt)
{ { }
}
bool PlayerDeathSystem::OnPlayerDeath(Events::PlayerDeath& e) bool PlayerDeathSystem::OnPlayerDeath(Events::PlayerDeath& e)
{ {
@@ -33,31 +32,35 @@ void PlayerDeathSystem::createDeathEffect(EntityWrapper player)
auto entityFile = ResourceManager::Load<EntityFile>("Schema/Entities/PlayerDeathExplosionWithCamera.xml"); auto entityFile = ResourceManager::Load<EntityFile>("Schema/Entities/PlayerDeathExplosionWithCamera.xml");
EntityWrapper deathEffectEW = entityFile->MergeInto(m_World); EntityWrapper deathEffectEW = entityFile->MergeInto(m_World);
//components that we need from player
auto playerModel = player.FirstChildByName("PlayerModel"); auto playerModel = player.FirstChildByName("PlayerModel");
if (!playerModel.HasComponent("Model") || !playerModel.HasComponent("Animation")) { if (!playerModel.Valid()) {
if (player == LocalPlayer) { if (player == LocalPlayer) {
setSpectatorCamera(); setSpectatorCamera();
} }
return; return;
} }
auto playerEntityModel = playerModel["Model"]; if (!playerModel.HasComponent("Model")) {
auto playerEntityAnimation = playerModel["Animation"]; return;
}
//copy the data from player to explosioneffectmodel EntityWrapper deathEffect = playerModel.Clone();
playerEntityModel.Copy(deathEffectEW["Model"]); for (auto& cAnim : deathEffect.ChildrenWithComponent("Animation")) {
playerEntityAnimation.Copy(deathEffectEW["Animation"]); cAnim["Animation"]["Play"] = false;
}
//copy the models position,orientation deathEffect.AttachComponent("ExplosionEffect");
deathEffectEW["Transform"]["Position"] = (glm::vec3)player["Transform"]["Position"]; deathEffectEW["ExplosionEffect"].Copy(deathEffect["ExplosionEffect"]);
deathEffectEW["Transform"]["Orientation"] = (glm::vec3)player["Transform"]["Orientation"]; deathEffect.AttachComponent("Lifetime");
//effect,camera is relative to playersPosition deathEffectEW["Lifetime"].Copy(deathEffect["Lifetime"]);
//deathEffectEW["ExplosionEffect"]["ExplosionOrigin"] = glm::vec3(0, 0, 0); deathEffect["Transform"]["Position"] = (glm::vec3)player["Transform"]["Position"];
deathEffect["Transform"]["Orientation"] = (glm::vec3)player["Transform"]["Orientation"];
for (auto& cModel : deathEffect.ChildrenWithComponent("Model")) {
EntityWrapper e(m_World, cModel.ID);
e.AttachComponent("ExplosionEffect");
deathEffectEW["ExplosionEffect"].Copy(e["ExplosionEffect"]);
}
EntityWrapper cam = deathEffectEW.FirstChildByName("Camera").Clone(deathEffect);
//camera (with lifetime) behind the player //camera (with lifetime) behind the player
if (player == LocalPlayer) { if (player == LocalPlayer) {
m_LocalPlayerDeathEffect = deathEffectEW; m_LocalPlayerDeathEffect = deathEffect;
auto cam = deathEffectEW.FirstChildByName("Camera");
Events::SetCamera eSetCamera; Events::SetCamera eSetCamera;
eSetCamera.CameraEntity = cam; eSetCamera.CameraEntity = cam;
m_EventBroker->Publish(eSetCamera); m_EventBroker->Publish(eSetCamera);
+3 -3
View File
@@ -112,15 +112,15 @@ bool SpawnerSystem::spawnedEntityIsColliding(EntityWrapper spawnedEntity, Entity
if (!spawnedBox.Entity.HasComponent("Model")) { if (!spawnedBox.Entity.HasComponent("Model")) {
return true; return true;
} }
RawModel* model = nullptr; Model* model = nullptr;
try { try {
model = ResourceManager::Load<RawModel, true>(otherEntity["Model"]["Resource"]); model = ResourceManager::Load<Model, true>(otherEntity["Model"]["Resource"]);
} catch (const std::exception&) { } catch (const std::exception&) {
} }
if (model != nullptr && Collision::AABBvsTriangles( if (model != nullptr && Collision::AABBvsTriangles(
spawnedBox, spawnedBox,
model->Vertices(), model->m_Vertices,
model->m_Indices, model->m_Indices,
TransformSystem::ModelMatrix(otherEntity))) { TransformSystem::ModelMatrix(otherEntity))) {
return true; return true;
@@ -160,9 +160,9 @@ bool DefenderWeaponBehaviour::OnInputCommand(ComponentWrapper cWeapon, WeaponInf
} }
} }
if (IsServer) { SpawnerSystem::Spawn(attachment, attachment);
SpawnerSystem::Spawn(attachment, attachment);
} /*
EntityWrapper backAttachment = attachment.FirstChildByName("Back"); EntityWrapper backAttachment = attachment.FirstChildByName("Back");
if (backAttachment.Valid()) { if (backAttachment.Valid()) {
@@ -172,7 +172,11 @@ bool DefenderWeaponBehaviour::OnInputCommand(ComponentWrapper cWeapon, WeaponInf
eDeployShieldAttachement.Restart = true; eDeployShieldAttachement.Restart = true;
eDeployShieldAttachement.Start = true; eDeployShieldAttachement.Start = true;
m_EventBroker->Publish(eDeployShieldAttachement); m_EventBroker->Publish(eDeployShieldAttachement);
} else {
LOG_ERROR("back shield invalid");
} }
EntityWrapper frontAttachment = attachment.FirstChildByName("Front"); EntityWrapper frontAttachment = attachment.FirstChildByName("Front");
if (frontAttachment.Valid()) { if (frontAttachment.Valid()) {
Events::AutoAnimationBlend eDeployShieldAttachement; Events::AutoAnimationBlend eDeployShieldAttachement;
@@ -182,7 +186,10 @@ bool DefenderWeaponBehaviour::OnInputCommand(ComponentWrapper cWeapon, WeaponInf
eDeployShieldAttachement.Start = true; eDeployShieldAttachement.Start = true;
m_EventBroker->Publish(eDeployShieldAttachement); m_EventBroker->Publish(eDeployShieldAttachement);
} else {
LOG_ERROR("front shield invalid");
} }
*/
if (IsClient) { if (IsClient) {
EntityWrapper root = wi.FirstPersonEntity; EntityWrapper root = wi.FirstPersonEntity;
+22 -5
View File
@@ -5,7 +5,7 @@ Export::Export()
} }
bool Export::Meshes(std::string pathName, bool selectedOnly) bool Export::Meshes(std::string pathName, bool selectedOnly, bool isCollision)
{ {
MStatus status; MStatus status;
if (pathName.empty()) { if (pathName.empty()) {
@@ -92,8 +92,14 @@ bool Export::Meshes(std::string pathName, bool selectedOnly)
Objects.append(node); Objects.append(node);
} }
} }
GetMeshData(Objects); GetMeshData(Objects, isCollision);
WriteMeshData(pathName);
if (!isCollision) {
WriteMeshData(pathName);
} else {
WriteCollisionData(pathName);
}
MGlobal::displayInfo(MString() + "Enabling IKSolvers"); MGlobal::displayInfo(MString() + "Enabling IKSolvers");
status = MGlobal::executeCommand("doEnableNodeItems true all;"); status = MGlobal::executeCommand("doEnableNodeItems true all;");
if (status != MS::kSuccess) { if (status != MS::kSuccess) {
@@ -144,9 +150,9 @@ bool Export::Animations(std::string pathName, std::vector<AnimationInfo> animInf
return true; return true;
} }
bool Export::GetMeshData(MObjectArray object) bool Export::GetMeshData(MObjectArray object, bool collision)
{ {
meshes = m_MeshHandler.GetMeshData(object); meshes = m_MeshHandler.GetMeshData(object, collision);
return true; return true;
} }
@@ -185,6 +191,17 @@ void Export::WriteMeshData(std::string pathName)
m_MeshFile.CloseFiles(); m_MeshFile.CloseFiles();
} }
void Export::WriteCollisionData(std::string pathName) {
m_ColliFile.ASCIIFilePath(pathName + "_colli.txt");
m_ColliFile.binaryFilePath(pathName + ".colli");
m_ColliFile.OpenFiles();
m_ColliFile.writeToFiles((OutputData*)&meshes);
m_ColliFile.CloseFiles();
}
void Export::WriteAnimData(std::string pathName) void Export::WriteAnimData(std::string pathName)
{ {
if (allBindPoses.size() > 0) { if (allBindPoses.size() > 0) {
+4 -2
View File
@@ -22,18 +22,19 @@ public:
int End; int End;
}; };
bool Meshes(std::string pathName, bool selectedOnly = false); bool Meshes(std::string pathName, bool selectedOnly = false, bool isCollision = false);
bool Materials(std::string pathName); bool Materials(std::string pathName);
bool Animations(std::string pathName, std::vector<AnimationInfo> animInfo); bool Animations(std::string pathName, std::vector<AnimationInfo> animInfo);
private: private:
bool GetMeshData(MObjectArray object); bool GetMeshData(MObjectArray object, bool collision);
bool GetMaterialData(); bool GetMaterialData();
bool GetAnimationData(AnimationInfo info); bool GetAnimationData(AnimationInfo info);
void WriteMeshData(std::string pathName); void WriteMeshData(std::string pathName);
void WriteAnimData(std::string pathName); void WriteAnimData(std::string pathName);
void WriteMaterialData(std::string pathName); void WriteMaterialData(std::string pathName);
void WriteCollisionData(std::string pathName);
Material m_MaterialHandler; Material m_MaterialHandler;
Skeleton m_SkeletonHandler; Skeleton m_SkeletonHandler;
@@ -44,6 +45,7 @@ private:
WriteToFile m_MeshFile; WriteToFile m_MeshFile;
WriteToFile m_AnimFile; WriteToFile m_AnimFile;
WriteToFile m_MtrlFile; WriteToFile m_MtrlFile;
WriteToFile m_ColliFile;
//Mesh Data //Mesh Data
Mesh meshes; Mesh meshes;
+35 -30
View File
@@ -25,6 +25,7 @@ Menu::Menu(QDialog* dialog)
m_ExportSelectedButton = new QCheckBox(tr("&Export Selected")); m_ExportSelectedButton = new QCheckBox(tr("&Export Selected"));
m_ExportAnimationsButton = new QCheckBox(tr("&Export Animations")); m_ExportAnimationsButton = new QCheckBox(tr("&Export Animations"));
m_ExportMaterialButton = new QCheckBox(tr("&Export Material"));; m_ExportMaterialButton = new QCheckBox(tr("&Export Material"));;
m_IsCollision = new QCheckBox(tr("&Export as collision mesh"));
m_ExportAnimationsButton->setChecked(true); m_ExportAnimationsButton->setChecked(true);
m_ExportMaterialButton->setChecked(true); m_ExportMaterialButton->setChecked(true);
@@ -32,6 +33,7 @@ Menu::Menu(QDialog* dialog)
vbox->addWidget(m_ExportSelectedButton); vbox->addWidget(m_ExportSelectedButton);
vbox->addWidget(m_ExportAnimationsButton); vbox->addWidget(m_ExportAnimationsButton);
vbox->addWidget(m_ExportMaterialButton); vbox->addWidget(m_ExportMaterialButton);
vbox->addWidget(m_IsCollision);
vbox->addStretch(1); vbox->addStretch(1);
optionsBox->setLayout(vbox); optionsBox->setLayout(vbox);
@@ -46,6 +48,7 @@ Menu::Menu(QDialog* dialog)
connect(m_ExportSelectedButton, SIGNAL(clicked(bool)), this, SLOT(NULL)); connect(m_ExportSelectedButton, SIGNAL(clicked(bool)), this, SLOT(NULL));
connect(m_ExportAnimationsButton, SIGNAL(clicked(bool)), this, SLOT(NULL)); connect(m_ExportAnimationsButton, SIGNAL(clicked(bool)), this, SLOT(NULL));
connect(m_ExportMaterialButton, SIGNAL(clicked(bool)), this, SLOT(NULL)); connect(m_ExportMaterialButton, SIGNAL(clicked(bool)), this, SLOT(NULL));
connect(m_IsCollision, SIGNAL(clicked(bool)), this, SLOT(NULL));
// Creating several layouts, adding widgets & adding them to one layout in the end // Creating several layouts, adding widgets & adding them to one layout in the end
QHBoxLayout* topLayout = new QHBoxLayout; QHBoxLayout* topLayout = new QHBoxLayout;
@@ -163,40 +166,42 @@ void Menu::RemoveClipClicked(bool)
void Menu::ExportAll(bool) void Menu::ExportAll(bool)
{ {
if (m_ExportPath->text().isEmpty()) { if (m_ExportPath->text().isEmpty()) {
MGlobal::displayError(MString() + "Please select a folder."); MGlobal::displayError(MString() + "Please select a folder.");
return; return;
} }
//Export meshes //Export meshes
if (!m_Export.Meshes(m_ExportPath->text().toLocal8Bit().constData(), m_ExportSelectedButton->isChecked())) { if (!m_Export.Meshes(m_ExportPath->text().toLocal8Bit().constData(), m_ExportSelectedButton->isChecked(), m_IsCollision->isChecked())) {
MGlobal::displayError(MString() + "Could not export mesh"); MGlobal::displayError(MString() + "Could not export mesh");
return; return;
} }
if (m_ExportMaterialButton->isChecked()) { if (!m_IsCollision->isChecked()){
if (!m_Export.Materials(m_ExportPath->text().toLocal8Bit().constData())) { if (m_ExportMaterialButton->isChecked()) {
MGlobal::displayError(MString() + "Could not export materials"); if (!m_Export.Materials(m_ExportPath->text().toLocal8Bit().constData())) {
return; MGlobal::displayError(MString() + "Could not export materials");
} return;
} }
}
std::vector<Export::AnimationInfo> animations; std::vector<Export::AnimationInfo> animations;
for (unsigned int i = 0; i < m_AnimationClipName.size(); i++) { for (unsigned int i = 0; i < m_AnimationClipName.size(); i++) {
Export::AnimationInfo thisClip; Export::AnimationInfo thisClip;
thisClip.Name = std::string(m_AnimationClipName[i]->text().toLocal8Bit().constData()); thisClip.Name = std::string(m_AnimationClipName[i]->text().toLocal8Bit().constData());
thisClip.Start = m_StartFrameLines[i]->text().toInt(); thisClip.Start = m_StartFrameLines[i]->text().toInt();
thisClip.End = m_EndFrameLines[i]->text().toInt(); thisClip.End = m_EndFrameLines[i]->text().toInt();
animations.push_back(thisClip); animations.push_back(thisClip);
} }
if (m_ExportAnimationsButton->isChecked()) { if (m_ExportAnimationsButton->isChecked()) {
//Export Animations //Export Animations
if (!m_Export.Animations(m_ExportPath->text().toLocal8Bit().constData(), animations)) { if (!m_Export.Animations(m_ExportPath->text().toLocal8Bit().constData(), animations)) {
MGlobal::displayError(MString() + "Could not export animations"); MGlobal::displayError(MString() + "Could not export animations");
return; return;
} }
} }
}
} }
void Menu::CancelClicked(bool) void Menu::CancelClicked(bool)
+1
View File
@@ -66,6 +66,7 @@ private:
QCheckBox* m_ExportSelectedButton = nullptr; QCheckBox* m_ExportSelectedButton = nullptr;
QCheckBox* m_ExportAnimationsButton = nullptr; QCheckBox* m_ExportAnimationsButton = nullptr;
QCheckBox* m_ExportMaterialButton = nullptr; QCheckBox* m_ExportMaterialButton = nullptr;
QCheckBox* m_IsCollision = nullptr;
QLineEdit* m_ExportPath = nullptr; QLineEdit* m_ExportPath = nullptr;
QFileDialog* m_FileDialog = nullptr; QFileDialog* m_FileDialog = nullptr;
+62 -58
View File
@@ -94,33 +94,37 @@ MeshClass::MeshClass()
// return weightMap; // return weightMap;
//} //}
Mesh MeshClass::GetMeshData(MObjectArray object) Mesh MeshClass::GetMeshData(MObjectArray object, bool collision)
{ {
MS status; MS status;
Mesh newMesh; Mesh newMesh;
newMesh.isCollison = collision;
vector<VertexLayout>& vertexList = newMesh.Vertices; vector<VertexLayout>& vertexList = newMesh.Vertices;
map<string, vector<int>>& indexLists = newMesh.Indices; map<string, vector<int>>& indexLists = newMesh.Indices;
for (int ObjectID = 0; ObjectID < object.length(); ObjectID++) { for (int ObjectID = 0; ObjectID < object.length(); ObjectID++) {
if (!object[ObjectID].hasFn(MFn::kMesh)) if (!object[ObjectID].hasFn(MFn::kMesh))
continue; continue;
MObject node = object[ObjectID]; MObject node = object[ObjectID];
MFnDependencyNode thisNode(node); MFnDependencyNode thisNode(node);
MPlugArray connections; MPlugArray connections;
thisNode.findPlug("inMesh").connectedTo(connections, true, true); thisNode.findPlug("inMesh").connectedTo(connections, true, true);
MPlug weightList, weights; MPlug weightList, weights;
MObject weightListObject; MObject weightListObject;
for (unsigned int i = 0; i < connections.length(); i++) {
if (connections[i].node().apiType() == MFn::kSkinClusterFilter) {
MFnSkinCluster skinCluster(connections[i].node());
weightList = skinCluster.findPlug("weightList", &status);
weightListObject = weightList.attribute();
weights = skinCluster.findPlug("weights");
newMesh.hasSkin = true;
break;
}
}
if (!collision) {
for (unsigned int i = 0; i < connections.length(); i++) {
if (connections[i].node().apiType() == MFn::kSkinClusterFilter) {
MFnSkinCluster skinCluster(connections[i].node());
weightList = skinCluster.findPlug("weightList", &status);
weightListObject = weightList.attribute();
weights = skinCluster.findPlug("weights");
newMesh.hasSkin = true;
break;
}
}
}
// In here, we retrieve triangulated polygons from the mesh // In here, we retrieve triangulated polygons from the mesh
MFnMesh mesh(object[ObjectID]); MFnMesh mesh(object[ObjectID]);
@@ -257,62 +261,62 @@ Mesh MeshClass::GetMeshData(MObjectArray object)
thisVertex.Pos[0] = pos.x; thisVertex.Pos[0] = pos.x;
thisVertex.Pos[1] = pos.y; thisVertex.Pos[1] = pos.y;
thisVertex.Pos[2] = pos.z; thisVertex.Pos[2] = pos.z;
thisVertex.isCollision = collision;
status = faceVert.getNormal(normal, MSpace::kObject); if (!collision) {
if (status != MS::kSuccess) { status = faceVert.getNormal(normal, MSpace::kObject);
MGlobal::displayError(MString() + "faceVert.getNormal() ERROR: " + status.errorString() + "for local vertex " + i + " in " + faceID + " in mesh " + thisMeshPath.fullPathName()); if (status != MS::kSuccess) {
break; MGlobal::displayError(MString() + "faceVert.getNormal() ERROR: " + status.errorString() + "for local vertex " + i + " in " + faceID + " in mesh " + thisMeshPath.fullPathName());
} break;
}
thisVertex.Normal[0] = normal[0]; thisVertex.Normal[0] = normal[0];
thisVertex.Normal[1] = normal[1]; thisVertex.Normal[1] = normal[1];
thisVertex.Normal[2] = normal[2]; thisVertex.Normal[2] = normal[2];
MFloatVector Tangent = Tangents[faceVert.tangentId()]; MFloatVector Tangent = Tangents[faceVert.tangentId()];
//MVector tmp = faceVert.getTangent(MSpace::kObject, NULL); //MVector tmp = faceVert.getTangent(MSpace::kObject, NULL);
//tmp.get(biTangent); //tmp.get(biTangent);
thisVertex.Tangent[0] = Tangent[0]; thisVertex.Tangent[0] = Tangent[0];
thisVertex.Tangent[1] = Tangent[1]; thisVertex.Tangent[1] = Tangent[1];
thisVertex.Tangent[2] = Tangent[2]; thisVertex.Tangent[2] = Tangent[2];
MFloatVector biNormal = biNormals[faceVert.tangentId()]; MFloatVector biNormal = biNormals[faceVert.tangentId()];
//faceVert.getBinormal().get(biNormal); //faceVert.getBinormal().get(biNormal);
thisVertex.BiNormal[0] = biNormal[0]; thisVertex.BiNormal[0] = biNormal[0];
thisVertex.BiNormal[1] = biNormal[1]; thisVertex.BiNormal[1] = biNormal[1];
thisVertex.BiNormal[2] = biNormal[2]; thisVertex.BiNormal[2] = biNormal[2];
status = faceVert.getUV(UV); status = faceVert.getUV(UV);
if (status != MS::kSuccess) { if (status != MS::kSuccess) {
MGlobal::displayError(MString() + " faceVert.getUV() ERROR: " + status.errorString() + "for local vertex " + i + " in " + faceID + " in mesh " + thisMeshPath.fullPathName()); MGlobal::displayError(MString() + " faceVert.getUV() ERROR: " + status.errorString() + "for local vertex " + i + " in " + faceID + " in mesh " + thisMeshPath.fullPathName());
break; break;
} }
thisVertex.Uv[0] = UV[0]; thisVertex.Uv[0] = UV[0];
thisVertex.Uv[1] = UV[1]; thisVertex.Uv[1] = UV[1];
if (newMesh.hasSkin) { if (newMesh.hasSkin) {
thisVertex.useWeights = true; thisVertex.useWeights = true;
float totalWeight = 0.0f; float totalWeight = 0.0f;
unsigned int totalBones = 0; unsigned int totalBones = 0;
MIntArray jointIDs /* ??? */; MIntArray jointIDs /* ??? */;
weights.selectAncestorLogicalIndex(vertexIndex, weightListObject); weights.selectAncestorLogicalIndex(vertexIndex, weightListObject);
weights.getExistingArrayAttributeIndices(jointIDs); weights.getExistingArrayAttributeIndices(jointIDs);
for (unsigned int i = 0; i < jointIDs.length() && i < 4; i++) { for (unsigned int i = 0; i < jointIDs.length() && i < 4; i++) {
if (weights[i].asFloat() > 0.001f) { if (weights[i].asFloat() > 0.001f) {
thisVertex.BoneIndices[totalBones] = jointIDs[i]; thisVertex.BoneIndices[totalBones] = jointIDs[i];
thisVertex.BoneWeights[totalBones] = weights[i].asFloat(); thisVertex.BoneWeights[totalBones] = weights[i].asFloat();
totalWeight = totalWeight + weights[i].asFloat(); totalWeight = totalWeight + weights[i].asFloat();
totalBones++; totalBones++;
} }
} }
for (unsigned int i = 0; i < 4; i++) { for (unsigned int i = 0; i < 4; i++) {
//thisVertex.BoneWeights[i] = thisVertex.BoneWeights[i] / totalWeight; //thisVertex.BoneWeights[i] = thisVertex.BoneWeights[i] / totalWeight;
} }
} else { }
thisVertex.useWeights = false;
} }
//float totalWeight = thisVertex.BoneWeights[0] + thisVertex.BoneWeights[1] + thisVertex.BoneWeights[2] + thisVertex.BoneWeights[3]; //float totalWeight = thisVertex.BoneWeights[0] + thisVertex.BoneWeights[1] + thisVertex.BoneWeights[2] + thisVertex.BoneWeights[3];
//if (totalWeight > 0.0001f) { //if (totalWeight > 0.0001f) {
// thisVertex.BoneWeights[0] /= totalWeight; // thisVertex.BoneWeights[0] /= totalWeight;
+32 -23
View File
@@ -11,7 +11,8 @@
class VertexLayout : public OutputData class VertexLayout : public OutputData
{ {
public: public:
bool useWeights = true; bool isCollision = false;
bool useWeights = false;
float Pos[3]{ 0 }; float Pos[3]{ 0 };
float Normal[3]{ 0 }; float Normal[3]{ 0 };
float Tangent[3]{ 0 }; float Tangent[3]{ 0 };
@@ -23,28 +24,31 @@ public:
virtual void WriteBinary(std::ostream& out) virtual void WriteBinary(std::ostream& out)
{ {
out.write((char*)&Pos, sizeof(float) * 3); out.write((char*)&Pos, sizeof(float) * 3);
out.write((char*)&Normal, sizeof(float) * 3); if (!isCollision) {
out.write((char*)&Tangent, sizeof(float) * 3); out.write((char*)&Normal, sizeof(float) * 3);
out.write((char*)&BiNormal, sizeof(float) * 3); out.write((char*)&Tangent, sizeof(float) * 3);
out.write((char*)&Uv, sizeof(float) * 2); out.write((char*)&BiNormal, sizeof(float) * 3);
if (useWeights) { out.write((char*)&Uv, sizeof(float) * 2);
out.write((char*)&BoneIndices, sizeof(float) * 4); if (useWeights) {
out.write((char*)&BoneWeights, sizeof(float) * 4); out.write((char*)&BoneIndices, sizeof(float) * 4);
out.write((char*)&BoneWeights, sizeof(float) * 4);
}
} }
} }
virtual void WriteASCII(std::ostream& out) const virtual void WriteASCII(std::ostream& out) const
{ {
out << Pos[0] << " " << Pos[1] << " " << Pos[2] << endl; out << Pos[0] << " " << Pos[1] << " " << Pos[2] << endl;
out << Normal[0] << " " << Normal[1] << " " << Normal[2] << endl; if (!isCollision) {
out << Tangent[0] << " " << Tangent[1] << " " << Tangent[2] << endl; out << Normal[0] << " " << Normal[1] << " " << Normal[2] << endl;
out << BiNormal[0] << " " << BiNormal[1] << " " << BiNormal[2] << endl; out << Tangent[0] << " " << Tangent[1] << " " << Tangent[2] << endl;
out << Uv[0] << " " << Uv[1] << endl; out << BiNormal[0] << " " << BiNormal[1] << " " << BiNormal[2] << endl;
if (useWeights) { out << Uv[0] << " " << Uv[1] << endl;
out << BoneIndices[0] << " " << BoneIndices[1] << " " << BoneIndices[2] << " " << BoneIndices[3] << endl; if (useWeights) {
out << BoneWeights[0] << " " << BoneWeights[1] << " " << BoneWeights[2] << " " << BoneWeights[3] << endl; out << BoneIndices[0] << " " << BoneIndices[1] << " " << BoneIndices[2] << " " << BoneIndices[3] << endl;
out << BoneWeights[0] << " " << BoneWeights[1] << " " << BoneWeights[2] << " " << BoneWeights[3] << endl;
}
} }
} }
bool operator==(const VertexLayout& right) bool operator==(const VertexLayout& right)
{ {
@@ -62,6 +66,7 @@ public:
class Mesh : public OutputData { class Mesh : public OutputData {
public: public:
bool isCollison = false;
bool hasSkin = false; bool hasSkin = false;
unsigned int NumVertices; unsigned int NumVertices;
unsigned int NumIndices; unsigned int NumIndices;
@@ -70,7 +75,9 @@ public:
virtual void WriteBinary(std::ostream& out) virtual void WriteBinary(std::ostream& out)
{ {
out.write((char*)&hasSkin, sizeof(bool)); if (!isCollison) {
out.write((char*)&hasSkin, sizeof(bool));
}
out.write((char*)&NumVertices, sizeof(int)); out.write((char*)&NumVertices, sizeof(int));
out.write((char*)&NumIndices, sizeof(int)); out.write((char*)&NumIndices, sizeof(int));
for (auto aVertex : Vertices) { for (auto aVertex : Vertices) {
@@ -86,11 +93,13 @@ public:
virtual void WriteASCII(std::ostream& out) const virtual void WriteASCII(std::ostream& out) const
{ {
out << "New Mesh _ not in binary" << endl; out << "New Mesh _ not in binary" << endl;
out << "hasSkin: "; if (!isCollison) {
if(hasSkin) out << "hasSkin: ";
out << "true" << endl; if (hasSkin)
else out << "true" << endl;
out << "false" << endl; else
out << "false" << endl;
}
out << "Number of vertices: " << NumVertices << endl; out << "Number of vertices: " << NumVertices << endl;
out << "number of indices: " << NumIndices << endl; out << "number of indices: " << NumIndices << endl;
int vertexNumber = 0; int vertexNumber = 0;
@@ -115,7 +124,7 @@ class MeshClass
{ {
public: public:
MeshClass(); MeshClass();
Mesh GetMeshData(MObjectArray Object); Mesh GetMeshData(MObjectArray Object, bool collision = false);
~MeshClass(); ~MeshClass();
private: private:
struct WeightInfo { struct WeightInfo {