Skip to content

Making capes and hair work, manually and through Cloth Simulation

ZeroGravitas edited this page Aug 1, 2024 · 20 revisions

(WIP, by RandomUser, Crunch, Captain Kodatto the Dashing Hero, and ZeroGravitas).

The problem of missing Physics bones

In Blender, SWTOR objects meant to be animated by the bones of a skeleton (armature) have their vertices grouped into Vertex Groups (VG) named after those bones. Vertices can belong to several VGs/bones at once (their influence is determined by the combination of weights stored in the VGs for the vertices).

Capes, flaps, Twi'lek lekku, hair, and other dangling or flowing parts work exactly the same way, the only difference being that their bones are animated by SWTOR's Cloth Simulation system.

(We can check their related VGs via the Properties Editor > Data tab > Vertex Groups panel: the physics bones-related VGs typically have weird names like "newtonparticle_lekku", and are numbered with an underline and two-digit numbers such as "_02", "_12"…)

THE PROBLEM IS, THE PHYSICS BONES AREN'T IN THE SKELETONS!!! They are defined in .clo files, and we can't read them! (That is, we can read the SWTOR 32-bit ones. Very badly. Until we get better at that… 😐).

Without those bones, the vertices in those VGs won't follow the rest when the skeletons are manipulated in Pose Mode or animated by an imported .jba file. So, we need to either assign them to some existing bones' VGs and weight them so that they follow their movements, or try more advanced stuff.

Available solutions

Use the bones present in the skeleton instead

Weight painting in this case is used in order to move hair and capes of characters with the skeleton. Not all hair types require it to work, but for some it is needed to avoid the hair deforming whenever the head is moved in Pose mode.

It is recommended to do this prior to any posing or loading of SWTOR-animations.

Note that there are separate methods for capes with manual posing and capes with SWTOR-animations.

Hair

  1. Open the mesh in Edit Mode.

  2. Select All (Menu or Press A)

  3. Change to Object Data Properties (Green Upside-Down Triangle) found on the right hand side 'Properties' window.

  4. Select the Head Vertex Group.

  5. Press 'Assign' making sure everything is still selected.

  6. Note: Resetting animation/poses may be required via the Reset Position function on the Skeleton. Refer to Wiki for best practice here. (Credit to: Crunch#0298)

Capes (for manual posing)

  1. Shift-select the skeleton, then the cape (or whichever object the cape is a part of) while keeping the skeleton selected.

  2. Switch to Weight Paint mode in the top left corner.

  3. Select the “Skirt1” bone with a left-click on it while holding down Control. This bone is located below the Pelvis bone, and will have one bone connected to it further down (Skirt2). It is likely intended for use with long robes and their skirts (like Jedi/Sith robes), but in the absence of those it is free to be used for the cape instead.

  4. With the brush that is automatically selected upon entering Weight Paint Mode, paint the entire cape red. Make sure you paint it completely from both sides, and that you do not paint any part of the object that is not a part of the cape, because otherwise it will be moved with the cape, and we don’t want that.

  5. You’re done! In pose mode, you can now use the Skirt1 bone to move the skirt around. Note that the cape won’t be deformed by physics in any way, so wind etc. will not have any effect.

Capes (for importing SWTOR Animations)

  1. Shift-select the skeleton, then the cape (or whichever object the cape is a part of) while keeping the skeleton selected.

  2. Switch to Weight Paint mode in the top left corner.

  3. Select the “Pelvis” bone with a left-click on it while holding down Control.

  4. With the brush that is automatically selected upon entering Weight Paint Mode, paint the entire cape red. Make sure you paint it completely from both sides, and that you do not paint any part of the object that is not a part of the cape, because otherwise it will be moved with the cape, and we don’t want that.

  5. You’re done! If you now load a SWTOR-animation to this skeleton, the cape will be moved with the rest of the character correctly.

Apply Blender Cloth Simulations

Blender's Cloth Simulation feature is a complex beast. Pay attention to details such as object's scale and realism-enhancing cheats. There are lots of guides and videotutorials around, but still can be frustrating to work out the best settings. There are free Add-ons that try to apply sensible ones, and we list a few at the end of this guide.

Capes

  1. Make sure the cape is parented to the armature. This will make later steps easier.

  2. Go into Edit mode and remove overlapping vertices by selecting all vertices (A) and using the F3 menu to type in ‘Merge By Distance’

  3. In the modifiers tab for the cape mesh, activate ‘Display modifier in Edit mode’ and ‘Adjust edit cage to modifier result’

  4. Go into pose mode on the armature, and move the rig off to one side. The vertices that will be simulated should stay where they are.

  5. Leave pose mode, and go into Edit mode on the mesh. The mesh shouldn’t move when doing this.

  6. Go into wireframe view (Z -> Wireframe) and make sure all vertices are deselected (Alt+A)

  7. Box select (B) all the vertices that you DON’T want to simulate (this will be the section of the mesh that moved along with the armature. Typically, the non-cape areas of the mesh.)

  8. Go into the Object Data Properties tab and add a new vertex group. Call it something memorable (e.g. ClothPinGroup)

  9. With the vertices selected, click ‘Assign’.

  10. We can now deactivate the buttons we clicked in Step 3.

  11. Go into Pose mode on the armature, select all the bones (A) and move them back to the origin (Alt + G)

  12. Click on the mesh, and go into the Physics Properties tab

  13. Select ‘Cloth’ and under the ‘Shape’ heading, click on ‘Pin Group’ and find the vertex group you created previously.

  14. The cape should now simulate whilst the rest of the mesh will stay put.

Some important things to note are self-collisions, collision distance distance, object scale, and interaction with the Subdivision modifier.

Without self-collision, the cape will phase through itself and simulate unrealistically. This can be enabled under the ‘Collisions’ heading in the physics tab.

The default collision distance of 0.015 m, in my experience, seems to be a bit too big if only scaling the meshes up 10x. Dividing these values by 10 seems to work better, but experimenting with these values yourself may prove better.

In relation to object scale, SWTOR’s assets import at a very small scale. This can be troublesome with Blender’s cloth simulations and may not work entirely. For the most part, scaling the meshes up by a factor of 10 seems to resolve these issues, but scaling by 100 temporarily may produce better results.

If you are applying a Subdivision modifier to the mesh, it may be best to have it below the Cloth modifier in the modifier stack. This helps to keep the simulation quick if you are wanting to view it in realtime whilst still producing a nice looking result. However, if you aren’t concerned with speed then placing it before can produce more accurate results.

Other approaches

  • Adding to the skeleton new bones with the same names as those "orphan" Vertex Groups, placed where their vertices are (by eyeballing it). It works well for some cases such as Twi'lek lekku, where the placement is fairly obvious.

  • Adding to the skeleton new bones with original names, and using Blender's Assign Automatic From Bones weighting tool to auto-create the necessary Vertex Groups and weight maps (maybe retouching the latter if not quite perfect, afterwards). It works decently (Twi'lek lekku is again a good case) and it's far faster to do than the previous method.

Those two solve the skeleton part for posing and maybe some animating, but for actual physics simulation we would need to do something with the bones, such as adding colliders and applying the simulations to them, or other tricks. Those are usually very tedious to setup, but there are free Add-ons that expedite it.

In general, simulations-wise, it's good to search for Add-ons that might automate part of the work: there are many free ones around, and we list a few in the next section.

Some tools and free Add-ons

ZG SWTOR Tools' Merge Physics Bones' Vertex Groups tool

We have added to the ZG SWTOR Tools Add-on a new tool, Merge Physics Bones' Vertex Groups that detects all Physics-related Vertex Groups in an object (or a selection of objects, processed individually) and copies their vertices to a new Vertex Group named "physics" (can be renamed to anything else afterwards).

Alt text

Free third party Add-ons

Also, we keep in our Discord a list of free Add-ons that we've found around (in blenderartists.com, Github, etc.) that facilitate applying cloth simulation or bones dynamics in different ways, from simple wiggling to automating the application of collider objects to bones.

These are the ones we had as of August 2024:


Gravity Collider Bone Physics Plugin by AZmaybe9

A free Blender add-on that automates adding physics-driven collider objects to bones. Available both on the author's Github and the usual Blender resources shops:

https://github.com/MiniEval/Bone-Physics

https://azmaybe9.gumroad.com/l/GCollider

https://blendermarket.com/products/gravity-collider-physics-plugin

Video guide: https://www.youtube.com/watch?v=8rlhOAh5CiU

Quick and silly demo: https://www.youtube.com/watch?v=DY9i0HolVmI


Wiggle Bones & Spring Bones add-ons

Very similar jiggling bone dynamics add-ons, each with their own strenghts and weaknesses. They can coexist to solve issues with different degrees of difficulty or control requirements in a same model.

(There's a successor to Wiggle Bones, Wiggle 2, still free, that adds physics and collision detection. Still, the original version might still be a better fit for simpler cases)

Spring Bones: https://github.com/artellblender/springbones

  • Better physics simulation.

  • Settings changes affect single bones, not selections of bones, so, they are tedious work.

  • Bones affected by the add-on can't be directly keyframed.

Wiggle Bones: https://blenderartists.org/t/wiggle-bones-a-jiggle-bone-implementation-for-2-8/1154726

  • Its physics simulation isn't as good as the Spring Bones add-on's.

  • Allows for changing parameters to all selected bones at once.

  • Bones stay keyframeable, so, one can combine both keyframed animation with wiggle physics.

There are two fast tutorials by Royal Skies explaining and demonstrating the add-ons' settings and issues for hair and breast movement (NSFW warning to an extent, although it is YouTube, so, nothing explicit).

Spring Bones tutorial: https://www.youtube.com/watch?v=-m0LyMiN-Ik

Wiggle Bones tutorial: https://www.youtube.com/watch?v=gTdRGZA4TXA


Wiggle 2 Add-on

A rewrite of the free Wiggle Bones Add-on from a few posts above, that includes some physics and collisions detection options that seem ideal for lekku, hair, and capes. The controls in the add-on's panel feel simpler and more predictable than Blender's exhaustive simulation parameters

https://github.com/shteeve3d/blender-wiggle-2 (it's the single wiggle_2.py file in the repository)

Blenderartists.org thread: https://blenderartists.org/t/wiggle-2/1454788

Wiggle 2 tutorial (imprescindible, as the repository page's guide is too barebones, pun intended): https://www.youtube.com/watch?v=mwJ_VTUYmFg

Another nice introductory video: https://youtu.be/S-itfgj37GE


Bystedt's Cloth Builder add-on

It's a free cloth simulation add-on that automates parts of Blender's cloth sim workflow and comes with a set of readymade assets, including 3D clothing and male and female characters for use as collision objects:

  • The add-on automates the set-up of Blender’s Cloth modifier, with vertex groups to control cloth parameters. It supports self-collision, and pressure, for creating inflatable objects.

  • It’s possible to control the results of the simulation by adjusting properties like bending stiffness via slider controls, or by painting weights using the built-in weight painting tools.

  • The add-on makes it easier to use pinning to control the shape of cloth, making it possible to pin any vertex on the cloth surface in 3D space, then move the pins around interactively in the viewport.

  • It’s also possible to store the state of the cloth at any point in the simulation as a Shape Key, which can then be used as the starting shape for a new simulation.

  • In addition, Bystedt’s Cloth Builder comes with a set of readymade assets, including items of clothing like capes, pants/trousers and sweaters, plus male and female characters for use as collision objects.

  • The asset browser also includes a Geometry Nodes set-up for use with the clothing that procedurally generates cloth thickness, separates the garment at the seams, and UV unwraps it.

Add-on download: https://3dbystedt.gumroad.com/l/bystedtsClothBuilder

Demo video: https://www.youtube.com/watch?v=EAraCGAaLoU

(The author is a pro in the industry: https://www.artstation.com/dbystedt)


ClothMaster Add-on by Nixo 3D

An Add-on providing some automations for turning objects into cloth simulations with collisions, plus a convert-to-pillow tool. It's fairly simple to use.

Add-on download: https://nixo3d.gumroad.com/l/ClothMaster

Some demos:

https://www.youtube.com/watch?v=k0IIgSKikOo

https://www.youtube.com/shorts/DG_EDp_QI20

Table of Contents


INTRODUCTION

IMPORTING SWTOR MODELS INTO BLENDER: A BRIEF OVERVIEW.
Check this intro first. Afterwards, you can jump directly to the guides on extracting PCs, NPCs and others.


TOOLS

No need to read this section right now: each extracting/assembling guide explains its required tools anyway.

Applications and Blender Add-on tools:

Online Tools:

Deprecated Tools:

  • EasyMYP (Windows app).
  • Noesis (Windows app).

THE COMPLETE GUIDE TO AUTO-EXTRACTING AND ASSEMBLING PLAYER CHARACTERS AND NPCs:

READ THE BROAD STROKES FIRST: YOU'LL SEE IT'S EASIER THAN YOU THINK!


ASSEMBLING GAME LOCATIONS AUTOMATICALLY:


LOCATING AND ASSEMBLING ASSETS MANUALLY:


OTHER GUIDES (WIP):


MODDING (to do)

Modding isn't working at the moment due to SWTOR's change to a 64bit codebase. It's going to take a while 🙁.


DATAMINING (to do)

  • Overview.
  • Tools.

SWTOR TECHNICAL INFORMATION:


OTHER RESOURCES:

Clone this wiki locally