SHADERS is a keyword for you
you know basic of fragment shader = you know how to do it.
then just change texture in material → it will recompile shader and change texture / fragment of color on texture or other blending / etc.
there is other way, using TexturePainter or similar class, but it work slooower.
about cashing, after load asset, AssetManager Cashe this asset so you can prepare “parts” and just replace them.
anyway, i have done what you want to do, so it is possible.
This is a huge subject, and one that many AAA games studios are still refining their approach too.
This is all just off the top of my head but essentially you have 4 possibilities, with vary level of difficulty/work involved. From easiest to hardest these are:
- Use a custom shader to change the colour of clothes etc.
- Swap in custom textures for various parts of the model.
- Have 3 or 4 models with different clothes combinations combined with 1 and/or 2.
- Have the person + the various items all be separate geometries and combine them
4.a Rigid geometry (sword/shield/hat/some armour) is easy
4.b Non-rigid geometry is much harder
Start to think about the complexity of for example putting a robe over a character and having them walk and the robe deforming naturally around their legs as they move…without the leg ever sticking through the robe or vica versa.
You then put boots on the characters feet and now the complexity gets one step worse as you need to have the feet inside the boots, boots outside feet, but inside robe…now add some baggy trousers as well and it just gets horrible.