Eng 繁中 日本語 한국어 简中

Cloth Simulation

The cloth simulation system is now available to use on XPS and PMX models. The key characteristics of the new system are

  • Unconditionally stable, the simulation will always recover to stable state no matter how extreme the conditions are.
  • Running parallel in real-time on a seperate thread alongside the existing physics and animation systems. This allows us to utilize power of multi-core CPUs and deliver the best performance possible.
  • Custom curved collider shapes. Unlike traditional geometry shapes, our custom collider model allows us to match the curved body parts almost perfectly.

Configurations

“Cloth Simulation” configurations can be found under “Pro” section in actor menus.

  • Quick controls: on top of the settings you can find controls to “Reset” the simulation or “Rebuild” the cloth mesh quickly.
  • Mesh configurations: You can create 2 cloth meshes and configurate them seperately. Here you can control the shape, size, density and anchoring options.
  • Surface & textures: Adjust the material for the cloth meshes.
  • Interaction: Here you can shrink the cloth mesh on the fly, enable dragging and tearing, yes you can tear the cloth mesh with your pointer or let it break by its own weight.
  • Collider adjustments: Adjust colliders for the model.
  • Simulation settings: control particle size & constraint compliances
  • Self collision: control collision between particles
  • Physics properties: gravity, friction etc
  • Compute settings: controls simulation frame rate, substeps and other parameters

Mesh creation

The cloth mesh is generated procedurally based on the configurations you set. You can checkout the mesh presets for some examples.

The base configuration includes

  • Inner radius: The radius of the starting circle of the cloth mesh
  • Length: How long does the cloth mesh extend
  • Slope: The angle at which the cloth mesh extends. 0 results in a cylinder shape and 90 results in a flat circle.
  • Resolution: The density of the particles in the cloth mesh. Higher resolution means more particles and more computation.

There are a few different topology options you can choose from.

With the adaptive hex or rectangle options, the cloth mesh will increase or decrese the number of particles for each row based on the circumference of the that row. The split option allows you to split cloth mesh on left and right sides.

With the horizontal layout option, it’s mostly the same to the above 2 but you can specify the anchoring partially.

With the vertical layout option, each row has exactly the same number of particles but you can split the cloth mesh at an interval.

Anchoring

You can anchor the cloth mesh to the model by selecting the body parts you want to anchor to. The cloth mesh will be attached to the selected body parts and will move with them.

Performance guide

The simulation prefers higher and stable frame rates. Our recommendation is to choose a suitable fixed frame rate in your “Display & UI” settings, and select a comparible framerate in the “Compute” settings for cloth simulation.

The default settings sets the simulation frame rate at fixed 90, if your system can only do 60 or 30, it should still work fine except a little slow motion effect. You can increase the number of substeps to compensate for this.

Collider adjustments

The cloth simualtion system uses its own collider models and will not interact with physics componenets. The default settings are tuned on a XPS model and should work on most DOA models. For PMX the body proportions varies a lot so we don’t have a one-size-fit-all solution, but it should be fairly straight forward to findtune the colliders to fit the model.

First turn on visualization so you can see the colliders, then go to each of the sections to adjust the shape and sizes for body parts.

You can imagine the collider as 2 spheres on both ends with adjustable smooth curve that connect the spheres. You can adjust

  • The positions of the 2 spheres
  • The radius of the spheres separetely
  • The value of the cuve inbetween. Positive is convex and negative is concave.

There are no interaction between the cloth system and other physics comonenet at the moment. The only exception is the XPS Boobs Physics which contains new settings to create cloth simulation compatible colliders.

Motion Updates

Major changes have been made to the motion system to allow cloth simulation to work smoothly. This also comes with a few other benefits.

  • Motion system should be more performant with less overhead interacting with GameObjects
  • PMX models with complex recursive inheritance structure should work perfectly now.
  • More accurate and consistent motion playback across different model types.
  • Motion adjustments are more precise and accurate.
  • Procedural motions and motion overrides works better too.

Features that are not yet supported in the new motion system:

  • Motion transition anchoring is not working.
  • Ragdoll disabled temeporarily.