HOW-TO: Change clothing colors

colourcharact.jpg

Create varied crowds with ease thanks to character clothing colouring.

Have you noticed that a lot of meshes for character clothing are made with this really bright red color which is rarely used in the game? That color is used as a sort of “green-screen” (red-screen?) on these meshes since it can be changed without much effort in the NPC entity templates.

This allows you to create much variety fast and with few assets.

It is especially useful for big crowds and comes with a relatively low memory and performance cost!

Not all meshes support coloring.
Most main/side quest NPCs have unique meshes that cannot be colored. Colouring works mostly for common crowd meshes.


Create entity

First create a new entity with the class CNewNPC and add the man_base.w2ent as an included template.

ae67dacd-eeb7-4512-8120-93bb9a7efe86.png

Check this guide first if you have never worked with entity templates:HOW-TO: Create a new NPC.


Add appearance

Add an appearance. Right click on the graph and Select Component. Search for “appearance” and select the CAppearanceComponent.

A new Appearances tab will have appeared in the Entity Editor. Choose Add Appearance and type in a name for the default appearance.

Adding body parts

Add body parts to our appearance. Select an entity for a body part in the Asset Browser and then press this button on the right side to add them. Using this method, we will add a head, hair, arms, legs and a small body section from: characters\models\common\man_average\.


Adding clothes

Now for some clothes from characters\models\crowd_npc\novigrad_beggar\.

Notice that red we mentioned at the very beginning?


Color variants

If you added pants and something for the NPC’s torso, the clothes should be red. Time to change the colour.

Switch to the Colours tab and select the appearance you created.

Add a new Color Variant.

Be careful with the naming: you need to choose a name exactly matching the components. You can do this by selecting the torso/legs in the viewport, and seeing which component in the graph become selected.

In our case it’s these two components (t2_01_ma__novigrad_beggar and I0_01__ma_novigrad_beggar).:

Please note that there are two underscores between ma and novigrad. The names must match the components exactly.

After we got that out of the way, we can create a color variant for each.


Change clothing color

You can now edit the different values

  • Hue

  • Saturation

  • Luminance

Some meshes support two different colors for different parts for extra customization. Below you can see one of the possible end results.

Have fun colouring your characters!

 

______________________________________
The Witcher 3: Wild Hunt Complete Edition © 2024 CD PROJEKT S.A. Published by CD PROJEKT S.A. Developed by CD PROJEKT RED. CD PROJEKT®, The Witcher®, REDengine® are registered trademarks of CD PROJEKT Capital Group. All rights reserved. The Witcher game is set in the universe created by Andrzej Sapkowski in his series of books. All rights reserved.