Dreikblack Posted August 2 Share Posted August 2 Need to apply different mats to different entities with same model. Since i'm using Quake models making another model file with new mat is not an option Quote Link to comment Share on other sites More sharing options...
Solution Dreikblack Posted August 4 Author Solution Share Posted August 4 void MakeModelUnique(shared_ptr<Model> model) { vector<shared_ptr<Mesh>> copiedMeshes; for (auto& lod : model->lods) { for (auto& mesh : lod->meshes) { copiedMeshes.push_back(mesh->Copy()); break; } } model->Clear(); for (auto& mesh : copiedMeshes) { model->AddMesh(mesh); } } 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.