Unity 5 customisable Flag Pack utilising CLOTH PHYSICS
Fantasy & Historical games need flags.... and with this in mind, we knew that creating a pack especially for unity 5 and its cloth and material system would be fun. We then decided to create not just a collection of pre created flags, but to split the cloth of the flag up into material zones, so that full customisation can be achieved.
5 Material Zones
The flag cloth mesh is split into the following UV zones:
Each Material of the cloth that is represented above can have 5 different materials added. Common to each zone is the base Black and White Cloth Texture that is the base for the cloth - this features cloth wringles and creases on. This is defined as the base Albedo(diffuse, colour) in the material inspector in unity. You can then choose a colour that overlays this - thus allowing 4 different colour zones on the flag. We then have the border colour as Material 5.
Material elements used:
- Albedo - Base Black & White Cloth texture for the cloth effect - a Colour can be chosen for each 5 sections of the flag
- Normal Map
- Spec Map
- Secondary Detail Map & Mask - to add the motifs to the flag
Flag MOTIF/Detail Image
Finally we have the 'Motif' element (i.e. Crosses on the flag, detail images) - these are placed in the Secondary Maps Section - in the albedo slot in the material inspector. We then add this to the mask slot too, so the transparency it utilised, and the motif is layered ontop of the cloth colours we have just setup
Unity 5 Cloth Physics
The pack utilises the brilliant cloth physics of Unity 5 - and the 6 flags you can see in the promo images, have been created as PREFABS so you can drag and drop into the scene.