Creating Custom Cloth - Kamzik123/AnvilToolkit-Resources GitHub Wiki

This tutorial teaches you how to make your own simulated cloth, capes, coat tails, scarves, robe skirts, sashes, flags, dangling straps, and anything else that should sway and flow instead of staying stiff, and add it to an Assassin's Creed game using AnvilToolkit.

If you can use Blender (or any 3D program) at a basic level and follow steps, you can do this.

Read this first:

Assassin's Creed games did not all use the same cloth system. There are two of them, and the exact steps differ slightly depending on your game:

Cloth System Games Which part of this guide
Classic cloth AC1, AC2, Brotherhood, Revelations, AC3, AC4: Black Flag, AC Rogue Main guide (all sections)
MotionCloth AC Unity, AC Syndicate, AC Origins (and later Anvil games) Main guide + the special MotionCloth section

Most of this tutorial is the same for both. When something is different for the newer (MotionCloth) games, it will be clearly marked. Do the whole guide, and if your game is Unity / Syndicate / Origins, also do Part 7.


Table of Contents


Part 1: What Is Cloth Simulation?

When you see Ezio's cape swing as a character runs, the game is not animating that by hand. It is running a tiny physics simulation every single frame, imagine a net of invisible points connected by invisible elastic threads. The game tugs those points with gravity and wind, keeps the threads from stretching too far, and bounces the points off the character's body. The visible cloth is then draped over that moving net.

There are two meshes involved, and understanding this is the single most important idea in the whole tutorial:

  1. The Visual Mesh - the pretty, detailed cloth you actually see in the game. It can have lots of triangles, nice textures, wrinkles, trim, etc.

  2. The Simulation Mesh (often called the "sim mesh") - a much simpler, low-detail version of the same cloth. This is the invisible "net" the game actually simulates. It is never shown, it just moves. The visual mesh is glued on top and copies its movement.

Why two meshes? Physics is expensive. Simulating 5,000 detailed triangles would wreck performance. So the game simulates maybe 80–150 simple points, and the beautiful high-detail cloth just rides along on top. This is exactly how the real games do it.

Your job in this tutorial is to:

  • Make (or obtain) both meshes.
  • "Paint" the simulation mesh to tell the game which parts are pinned and which parts swing freely.
  • Feed both meshes into AnvilToolkit, which bundles them into a game-ready Cloth file.

Part 2: What You Need Before You Start

Gather these first. Don't skip any, missing pieces cause 90% of beginner problems.

Thing you need What it is / where to get it
AnvilToolkit The modding tool this whole guide uses. You should already have it working and be able to open your game's files with it.
Your game, unpacked You need to be able to browse the game's files in AnvilToolkit (select your game, open a .forge, unpack, etc.).
A 3D program Blender is free and recommended. Anything that can export GLB (glTF 2.0) files works.
A visual cloth mesh The detailed cloth model you want to add (a cape, coat, skirt, etc.), correctly rigged to the character's skeleton (weighted to bones). For character clothing this is essential.
A simulation mesh A simplified low-poly version of that cloth (you'll make this in Part 3), also rigged to the same skeleton.
A ClothSettings file A small settings file that controls the feel of the cloth (how heavy, how much wind, etc.). You can reuse an existing one from the game, e.g. Edward's scarf ClothSettings in AC4. See the separate Cloth Settings Tutorial for what every value means.

Optional extras (you can skip these at first):

  • ActionSettings file - special one-off cloth behaviours tied to animations. Leave blank unless you know you need it.
  • LiteRagdoll file - a simplified body-collision definition. Leave blank unless you know you need it.

Beginner tip: For your very first attempt, reuse an existing ClothSettings file from a similar in-game cloth (a scarf ClothSettings for a scarf, a cape ClothSettings for a cape). Get the pipeline working end-to-end first, then tune the feel later.


Part 3: Preparing Your Two Meshes in Blender

This is where most of the actual work happens. Take your time here.

3.1 The Visual Mesh

This is the cloth you want people to see. Requirements:

  • It must be rigged (skinned) to the character's skeleton, every vertex assigned to one or more bones with weights. If your cloth isn't attached to bones, it can't follow the character at all.
  • Textures/materials are fine and encouraged, this is the visible model.
  • It can be as detailed as you like (within reason for game performance).

If you're replacing or adding onto an existing outfit, your visual cloth should use the same skeleton as that character.

3.2 The Simulation Mesh (the important one)

This is the simple "net" the physics runs on. Make it a separate, low-poly mesh roughly the same shape and position as the visual cloth.

Rules for a good simulation mesh:

  1. Keep it simple. Aim for a low, evenly-spaced grid of quads/triangles that roughly covers the cloth shape. Somewhere around 50–200 vertices is typical. More points = smoother but slower, fewer = faster but blockier. Non-MotionCloth games cannot handle simulation meshes with more than 300 vertices correctly.

  2. Even spacing. Try to keep triangles roughly the same size and evenly laid out, like a fishing net. Long thin slivers and wildly uneven triangles cause ugly, jittery simulation.

  3. It must be rigged to the same skeleton as the visual mesh, with sensible weights.

  4. It must sit close to the visual mesh. The visual mesh will be "projected" onto the sim mesh, so they should occupy roughly the same space. Don't have the sim mesh floating far away from the visual cloth.

  5. MotionCloth games only - the mesh must be "manifold." For Unity / Syndicate / Origins or later, every edge of the simulation mesh may be shared by at most two triangles. In plain terms: no weird junctions where three or more faces meet along one edge, and no duplicated/overlapping faces. In Blender you can check this with Select → All by Trait → Non-Manifold. If nothing gets selected, you're good. (Classic-cloth games are more forgiving here, but a clean manifold mesh is still best.)


Don't export anything yet, first you need to paint the sim mesh's behaviour, which is Part 4.


Part 4: Painting the Cloth Behaviour with Vertex Colors

Here's the clever part. AnvilToolkit does not ask you to type in which vertices are pinned and which swing free. Instead, you paint that information directly onto the simulation mesh using vertex colors. The color of each point tells the game how that point should behave.

This uses your 3D program's Vertex Paint / Vertex Color feature (in Blender: Vertex Paint mode, painting into a Color Attribute).

4.1 The one rule you must remember

On the first/base color layer (Color 0): WHITE = pinned to the body, BLACK = free to swing. Grey = in between.

  • White points are treated as anchored, they stick to the character's body and barely move (this is where the cloth attaches, like a cape's collar or a coat's waistband).
  • Black points are completely free, they flap and swing with full physics (like the bottom edge of a cape or the tip of a scarf). It is recommended to not go below 0.05, the games don't handle 100% simulated vertices very well.
  • Grey is a blend, the darker the grey, the freer the movement.

Any vertex you don't paint is treated as white = pinned. So if you forget to paint, your whole cape will be glued to the body and won't move at all! You must paint the free-swinging areas dark. A common approach is to fill the entire sim mesh black first, then paint the attachment edge white.

Think of it as a gradient from the top of a curtain to the bottom, white at the rod where it's fixed, fading to black at the hem where it swings.

4.2 The full color map

The base color layer (Color 0) always controls rigidity. The newer MotionCloth games use the additional color layers (Color 1-4) for extra per-point tuning. Classic-cloth games use fewer. Here's the complete map:

Color layer Classic cloth (AC4, Rogue, AC3, …) MotionCloth (Unity / Syndicate / Origins or later)
Color 0 (base) Rigidity: white = pinned, black = free Rigidity: white = pinned, black = free
Color 1 Collision thickness: how far the cloth floats off the body (white = thicker gap) BackStop Distance: how far a point may travel behind its resting position
Color 2 (not used) Damping: white = more damping (settles faster, less floppy)
Color 3 (not used) Skin Width Scale: per-point collision thickness
Color 4 (not used) Friction: white = grippier against the body

For your first cloth, you only need to paint Color 0 (rigidity) and Color 1/3 (Collision thickness) Leave the other layers unpainted/white until you're comfortable, the defaults are fine. Recommended collision thickness is around 0.02-0.06.

4.3 A note on "round-tripping"

For MotionCloth, AnvilToolkit can also export an existing game cloth back out to a mesh with these color layers already filled in. That means you can open a shipped cloth (say, a robe from Unity), export it, study or tweak its painted colors in Blender, and re-import it. If you're learning, exporting a real cloth and looking at how Ubisoft painted it is one of the best ways to understand good values.

4.4 Exporting to GLB

Once painted:

  1. Select your simulation mesh in Blender.
  2. File → Export → glTF 2.0 (.glb).
  3. In the export options, make sure vertex colors are included and that the mesh's armature/skinning weights are exported (glTF exports these by default when the mesh is parented to an armature).
  4. Save it as a .glb file somewhere easy to find.

Note: The visual mesh does not have to be a GLB you import here, in the next part it comes from the mesh already loaded in AnvilToolkit. Only the simulation mesh is imported as a GLB. (If you're also adding the visual mesh into the game, that's a separate model-import step outside this cloth guide.)


Part 5: Converting the Mesh to Cloth in AnvilToolkit

Now you bring it all together inside AnvilToolkit's Mesh Viewer.

5.1 Open the visual mesh

  1. In AnvilToolkit, navigate to and open the visual cloth mesh (the detailed one) in the Mesh Viewer. It should appear in the mesh tree on the side.

5.2 Start the conversion

  1. In the mesh tree, right-click the mesh you want to turn into cloth.
  2. Choose "Convert to Cloth" from the menu.

5.3 The Cloth Generation Settings window

A small window titled "Cloth Generation Settings" appears. Here's every field, top to bottom:

Field What to do
SoftBody/Cloth Settings Required. Click ... and browse to your ClothSettings file (for character cloth) or SoftBodySettings file (for static cloth). The OK button stays greyed out until you pick one.
Action Settings Optional. Leave blank unless you specifically have a .ClothActionSettings file to use.
Lite Ragdoll Optional. Leave blank unless you have a .LiteRagdoll collision file.
Sphere Radius Scale Controls the size of the invisible collision bubbles around each cloth point (keeps cloth from clipping through the body). 0 means Automatic, a good starting choice. Otherwise a small number like 1.0. (Mainly relevant to classic cloth.)

Tooltip reminder: "Use ClothSettings for character cloth and SoftBodySettings for static cloth meshes." A cape on a character = ClothSettings. A static hanging banner in the world = SoftBodySettings.

If your game is Unity / Syndicate / Origins or later, this window will be taller and show an extra panel of MotionCloth options, those are explained in Part 7. For classic-cloth games that panel is hidden and you can ignore it.

5.4 Confirm and pick the simulation mesh

  1. Once your ClothSettings file is chosen (and the OK button is enabled), click OK.
  2. A file picker appears titled "Select simulation mesh GLB file". Browse to and select the .glb you exported from Blender in Part 4.
  3. Click Open.

AnvilToolkit now does the heavy lifting, it takes your visual mesh + your painted simulation mesh + your ClothSettings and bundles them into a game-ready Cloth file. If it succeeds, a new SoftBody frame appears in the mesh tree.

Important matching rule: The visual mesh and the simulation mesh must agree on skinning:

  • Character cloth: both meshes must be rigged to bones (skinned). This is the normal case.
  • Static cloth: both meshes must be un-rigged (no bones).
  • If one is skinned and the other isn't, you'll get the error "Cannot use one skinned mesh and one static mesh." Fix the mismatch in Blender and re-export.


Part 6: Saving and Testing In-Game

  1. Save / export the Mesh (the Mesh must have the "Dynamic" flag set for it to work with the cloth) and the resulting Cloth from AnvilToolkit into your game files (the same way you save any edited mesh/file in the toolkit).
  2. Reference the cloth in your character's BuildTables so the game can load the Cloth file along the visual Mesh.
  3. Repack your data and forge so the game can load it.
  4. Launch the game and look at your cloth in motion.

What to look for:

  • Does the cloth swing where it should and stay put where it attaches? (If it's totally stiff, revisit your Color 0 painting, you probably left it too white.)
  • Does it clip through the body? (Adjust Sphere Radius / collision settings, see the Cloth Settings Tutorial.)
  • Does it explode / fly around wildly? (See Troubleshooting.)

Example provided by Trigger.


Part 7: Special Section for MotionCloth Games (Unity / Syndicate / Origins)

Available only in AnvilToolkit 1.3.7+

Only read this part if your game is Assassin's Creed Unity, Syndicate, or Origins (or a later Anvil title that uses the newer cloth). If you're on AC4, Rogue, AC3, or earlier, you can skip this entirely.

These newer games replaced the classic cloth system with one called MotionCloth. It's more advanced, and AnvilToolkit gives you extra options for it. The good news, everything from Parts 1-6 still applies. This section just covers the differences.

7.1 What's different, in plain terms

  • The cloth data is stored in a more complex internal package (you don't need to understand it, the toolkit does it for you).
  • Your simulation mesh must be manifold, every edge shared by at most two triangles (see 3.2, rule 5). MotionCloth is strict about this, a non-manifold sim mesh will be rejected.
  • You get extra per-point paint layers (Color 1-4) and a panel of physics options in the conversion window.

7.2 The extra "Motion" options panel

When you open Convert to Cloth on a Unity/Syndicate/Origins or later mesh, the settings window is taller and shows these additional fields. You can leave every one of them at its default for your first attempt, the defaults are chosen to match original cloth.

Option Plain-English meaning Safe default
Gravity (X, Y, Z) The direction and strength of gravity pulling on the cloth. Z is up/down in these games, so -10 in Z means normal downward gravity. 0, 0, -10
Gravity Scale A single overall multiplier on gravity for the whole cloth. 1.0 = full gravity, lower = floatier. This one value applies to every point (gravity isn't painted per-point). 1.0
Blend Factor How strongly the simulation blends toward the animated pose. Higher = the cloth hugs the intended shape more. 1.0
Max Speed A safety cap on how fast cloth points may move. Stops runaway explosions. 1000
Constraints: Structural The main threads holding the weave together along the mesh edges. Keep this ON. On
Constraints: Shearing Diagonal threads that resist the cloth skewing. Usually off. Off
Constraints: Bending Threads that resist sharp folding, giving the cloth some stiffness. Usually on. On
Constraints: Stretching Extra threads pinning attachment points. Usually on. On

Beginner advice: Don't touch this panel at first. Fill in your ClothSettings file, leave the Motion options at their defaults, and click OK. Only start tweaking these once your cloth is working and you want to change how it feels.

7.3 The extra paint layers (Color 1–4)

As shown in the color map in Part 4, MotionCloth reads all five vertex-color layers:

  • Color 0 - Rigidity (white = pinned, black = free). The important one.
  • Color 1 - BackStop distance (how far a point can drift behind its rest position).
  • Color 2 - Damping (white = settles faster, less jiggle).
  • Color 3 - Skin Width Scale (per-point collision padding).
  • Color 4 - Friction (white = grips the body more).

Again: paint Color 0 and Color 3 first, get it working, then experiment with the others. Leaving Colors 1,2,4 unpainted uses sensible defaults.


Part 8: Troubleshooting Common Problems

Problem Most likely cause Fix
Cloth is completely stiff, doesn't move at all Color 0 left too white (everything pinned). Remember: unpainted = white = pinned! Paint the free areas of the sim mesh darker. Only the attachment edge should be white.
Cloth floats away from / hovers off the body Collision bubbles too big. Lower Sphere Radius Scale or paint Color 1 or 3 darker. MotionCloth games do not use the Sphere Radius Scale.
Cloth clips through the body Collision too weak, or attachment weights wrong. Increase collision thickness (Color 1 or 3 / ClothSettings sphere radius), check the sim mesh is weighted to the right bones.
Cloth explodes / flies around wildly Sim mesh problems, bad/uneven triangles, sim mesh far from the visual mesh, or (MotionCloth) a non-manifold mesh. Rebuild the sim mesh cleaner and more evenly, keep it close to the visual mesh, run Blender's Non-Manifold check for MotionCloth games.
Error: "Cannot use one skinned mesh and one static mesh." One mesh is rigged to bones, the other isn't. Make both meshes skinned (character cloth) or both static (world cloth), then re-export the GLB.
"Simulation mesh has no vertices." The GLB didn't export geometry, or the wrong object was selected on export. Re-export the correct simulation mesh object as GLB.
OK button is greyed out No ClothSettings file selected yet. Click the ... next to "SoftBody/Cloth Settings" and pick a .ClothSettings (or .SoftBodySettings) file.
Cloth looks jittery / twitchy Uneven sim-mesh triangles, or too much movement energy. Even out the sim mesh triangles, paint Color 0 brighter, (MotionCloth) add a little Damping via Color 2, increase ClothSettings friction/damping.

Quick Reference Cheat Sheet

The whole process in 8 steps:

  1. Make/obtain a visual mesh (detailed, rigged) and a simulation mesh (simple, rigged, evenly spaced; manifold for MotionCloth).
  2. In Blender, vertex-paint Color 0 on the sim mesh: white = pinned, black = free. (Fill black, then paint the attachment edge white.)
  3. Export the sim mesh as GLB, including vertex colors and skinning.
  4. In AnvilToolkit, open the visual mesh, right-click it → Convert to Cloth.
  5. Pick a ClothSettings file (required). Leave optional fields blank. (MotionCloth: leave the Motion panel at defaults.)
  6. Click OK, then select your simulation GLB.
  7. Save/export the new cloth, then repack data + forge.
  8. Launch, and admire your flowing cloth.

Remember the golden rule: Anything you don't paint is pinned. If your cloth won't move, it's almost always because Color 0 is too white.


Related guide: Cloth Settings Tutorial (what every ClothSettings value does)

⚠️ **GitHub.com Fallback** ⚠️