How do I re-use NPC clothes on my pawn?

Imagine a hitman game, RPG or survival game where you can change the dress of your character. How would you do this for contemporary clothing when you didn’t know the colour of your Player Character?

I would prefer not to do this assuming a pre-set skin colour. This means I don’t want to just make an NPC model wearing a set of clothes, and then a huge variation of PC models with different skin colours, wearing the same clothes.

What about gathering all your NPC types/races into an array, then apply some filters based on the name of the mesh instead of the skin preset?

Not entirely sure regarding this, but are you looking also for a kind of “refit” clothing system based on the NPC, or the main issue is related only to the pawn skin colour?
If you need a refit thingy for the NPCs I can help you, otherwise I think you need to dig further into blueprint setup and conditions :wink:

Sorry, I’m not sure what you mean by “refit”. :slight_smile:

I want my character to be able to steal and wear the same clothes as an NPC. The NPC will never wear just one item, (like a shirt) only the whole suit. I do not need to mix-and-match.

I currently have mesh of an NPC wearing a police uniform and a mesh of a (caucasian) PC wearing a police uniform.

From your answer, I guess I want to store the base skin colour, and I can apply it somehow to the bare skin parts of the mesh of the PC. is that right?

For refit I mean that you can apply the same kind of shirt to multiple characters, being them different in height, body shape, and so on.

If you’re going to do something like that ( stealing clothes ) you have two options:

  • Both male/female NPCs will have the same body/height shape, so that you’re basically swapping the cloth mesh, since the NPCs are basically clones with different textures.
  • Use a morphable mesh which will adapt its shape to the current pawn…by doing this you can “refit” a cloth from a skinny guy to a fat guy and so on…

I’m using extensively the 2nd method, it works nicely.

In specific to extend my answer on the skin colour: you have your NPCs in a list ( array ) so that you can filter which ones will be using the caucasian material and which one iwll be using the african-american material…Create dynamic instance material could do the job in order to assign the materials, but I’m not 100% sure since I haven’t tested it yet.