Overview

The VCloth in CRYENGINE needs two meshes: One mesh is used for simulation and one mesh is used for rendering - the latter mesh is skinned according to the simulated mesh. While it's possible to use the same mesh, it's recommended to tweak the simulation mesh according to your needs. Additionally, you might use a hi-res mesh for rendering and a low-res mesh for simulation, which would improve the overall performance considerably.

Cloth Setup

Create a Simulation Mesh out of your Render Mesh. When doing this, consider the following:

Pic1: A hi-res render mesh and a lo-res simulation mesh

At the end of the process, your cloth should look something like this in Maya:

Pic2: Cloth ready to be exported (Replace?)

Cloth Export to CRYENGINE

CRYENGINE needs some additional metadata for cloth meshes. These metadata can be generated by the Resource Compiler (RC) of the CRYENGINE. However, if the metadata is missing, these data sets are generated by the CRYENGINE on the fly - which would result in stuttering at run-time, since the pre-process is probably too expensive for a smooth run-time experience. Therefore, it is strongly recommended to use one of the following two exporting methods to include the metadata in the exported skin file.

If you have the latest exporter-plugin, the exporting process is fairly simple and is described in Method 1. If your plugin is outdated, you will want to use Method 2. (This method is still using the Export (old) button though, just like Method 1, even though 2 is for outdated plugins. Is that correct?)

Method 1: Export - using Plugin

Pic4: Crytek Exporter settings - Method 1 (Replace with proper style arrows/boxes)

 

The render mesh can be exported the same way, but the "VCloth Pre-Process" flag is not needed for exporting, resulting in smaller file size.

Method 2: Export - using RC command-line commands

  1. In the Exporter:
    • Set Export Path
    • Select the simulation mesh
    • Set the Custom Export Path
    • Open CRYENGINE Settings

      Pic6: Crytek Exporter settings - Method 2 (Replace with proper style arrows/boxes)
  2. In the Resource Compiler tab, add the command line option: "/forceVCloth":

    Pic7: Adding /forceVCloth in the CryEngine Settings
     
  3. Now close the CRYENGINE Settings Manger and export the simulation mesh by clicking "Export Selected"
Now open the CRYENGINE Settings Manager again and remove the option "/forceVCloth", since this is a global option. If you don't do this, all following exported skins (including NON-CLOTH!) would store the cloth-metadata, which is totally unnecessary and unwanted and would increase file-sizes unnecessarily!

   4. The render mesh can be exportet the same way, but without specifying the "/forceVCloth" command-line option.