Dreikblack Posted August 2, 2024 Posted August 2, 2024 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
Solution Dreikblack Posted August 4, 2024 Author Solution Posted August 4, 2024 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
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.