Commit 013f4714 by Kai Westerkamp

texture

parent ff75af82
......@@ -247,6 +247,17 @@ void AProceduralEntity::processNode(aiNode* node, const aiScene* scene, FMatrix
void AProceduralEntity::loadModel(const uint8* RawFileData, int32 lenght) {
if (MasterMaterialRef == nullptr) {
MasterMaterialRef = LoadObject<UMaterialInterface>(NULL, TEXT("/Game/Materials/TexturedMaterial"), NULL, LOAD_None, NULL);
//= FindObject<UMaterialInterface>(GetWorld(), TEXT("TexturedMaterial"));
UE_LOG(GLTF, Error, TEXT("Material: %s"), *MasterMaterialRef->GetName());
}
if (UniformMaterialRef == nullptr) {
UniformMaterialRef = LoadObject<UMaterialInterface>(NULL, TEXT("/Game/Materials/TexturedMaterial"), NULL, LOAD_None, NULL);
//= FindObject<UMaterialInterface>(GetWorld(), TEXT("UniformMaterial"));
}
Assimp::Importer importer;
const aiScene* scene = importer.ReadFileFromMemory(RawFileData, lenght, aiProcess_Triangulate | aiProcess_FlipUVs | aiProcess_GenNormals, "glb");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment