Splatmapping now working.

Rendering pipleline now support 3 different types of Material:
Basic: a material with a single color on every property (diffuse, specular, ect).
SingleTextures: a material with a single texture in all or any property. Have a single color on the rest.
SplatMapping: has a SplatMap and 0 to 5 different textures to every property. Properties with o texture uses a single color insted.

All materials with a texture has a UVRepeat, telling how many time to till in U and in V.

modelJobs now uses ShadeID, ModelID and TextureID for the Hash insted of only Texture

MayaExported exports 3 differnt types of material, the same as the piplen now supports.
This commit is contained in:
Teejoon
2016-02-07 13:39:13 +01:00
parent ceab837e27
commit 92ab22e779
20 changed files with 971 additions and 309 deletions
+8 -8
View File
@@ -76,10 +76,10 @@ public:
struct MaterialSingleTextures : public MaterialBasic
{
TextureProperties ColorMaps;
TextureProperties NormalMaps;
TextureProperties SpecularMaps;
TextureProperties IncandescenceMaps;
TextureProperties ColorMap;
TextureProperties NormalMap;
TextureProperties SpecularMap;
TextureProperties IncandescenceMap;
};
enum class MaterialType { Basic = 1, SplatMapping, SingleTextures };
@@ -136,10 +136,10 @@ private:
void ReadMaterialFile(std::string filePath);
void ReadMaterials(std::size_t& offset, char* fileData, const unsigned int& fileByteSize);
void ReadMaterialSingle(std::size_t& offset, char* fileData, const unsigned int& fileByteSize);
void ReadMaterialBasic(MaterialBasic* Material, unsigned int &offset, char* fileData, unsigned int& fileByteSize);
void ReadMaterialSingleTexture(MaterialSingleTextures* Material, unsigned int &offset, char* fileData, unsigned int& fileByteSize);
void ReadMaterialSplatMapping(MaterialSplatMapping* Material, unsigned int &offset, char* fileData, unsigned int& fileByteSize);
void ReadMaterialTextureProperties(TextureProperties& texture, unsigned int &offset, char* fileData, unsigned int& fileByteSize);
void ReadMaterialBasic(MaterialBasic* Material, std::size_t& offset, char* fileData, const unsigned int& fileByteSize);
void ReadMaterialSingleTexture(MaterialSingleTextures* Material, std::size_t& offset, char* fileData, const unsigned int& fileByteSize);
void ReadMaterialSplatMapping(MaterialSplatMapping* Material, std::size_t& offset, char* fileData, const unsigned int& fileByteSize);
void ReadMaterialTextureProperties(TextureProperties& texture, std::size_t& offset, char* fileData, const unsigned int& fileByteSize);
void ReadAnimationFile(std::string filePath);
void ReadAnimationBindPoses(std::size_t& offset, char* fileData, const unsigned int& fileByteSize);