Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
1. Cloth Setup

Overview

The VCloth in

CryEngine

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

is

'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

strongly.

considerably.

Table of Contents
maxLevel3
minLevel2

Cloth Setup

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

  • Cloth simulation in general is an expensive process, so the simulation mesh should be kind of quite low-resolutionalresolution.
  • Best The best results are achieved with a clean and homogeneous edge - flow, since the edges are used directly within the simulation.
  • For performance reasons, the simulation mesh should contain have a lower resolution than the render mesh. A clean edge - flow of the simulation mesh improves quality. The render mesh is used for visual representation and is animated by skinning according to the simulation mesh.
Image Removed 

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

is used for cloth simulation in CryEngine.


Image Added

  • The cloth mesh needs vertex colors (greyscale) applied, which represent the constraints of attached vertices. Hence, vertex colors define the relationship between cloth physics and original skinning.
    • Typically, virtual cloth is constraint constrained around shoulders and other fast moving body parts, or in areas , where a cloth should not move physically, but is rather skinned. Black vertex colors indicates a full constraint (which basically means , the according vertex positions are determined by skinning). White vertex colors indicate unconstraint unconstrained vertices, whose movement is determined entirely by the simulation. Grey values in between indicate the strength of simulation vs. skinning. ThusThis way, fine transitions between fully skinned and fully simulated areas can be defined.

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

Pic2: Cloth ready to be exported
Image Modified

2.

Cloth Export to

CryEngine

CRYENGINE

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

There are two ways of exporting cloth to the CryEngineCRYENGINE. If you got have the latest exporter-plugin, the exporting process is fairly simple and is described in the followingbelow. If your plugin is outdated, you might use the second way of exporting.2.1.

Method 1: Export - using Plugin

  • Open the "Export old" plugin from the Crytek Maya Plugins:

 

  • In the Exporter:
    • Set "Export Path"
    • Select the simulation mesh
    • Select the "VCloth Pre-Process" Flag
    • Set the "Custom Export Path"

  • 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.
2.2. 


Method 2:

 Export

 Export - using RC command-line commands

  • Open the "Export old" plugin from the Crytek Maya Plugins:

 

  • In the Exporter:
    • Set "Export Path"
    • Select the simulation mesh
    • Set the "Custom Export Path"
    • Open "CryEngine CRYENGINE Settings"
  • In the Tab "Resource Compiler" add the command line option: "/forceVCloth" 
  • Now close the CryEngine CRYENGINE Settings Manger and export the simulation mesh by clicking "Export Selected"
  • IMPORTANT: Now open the CryEngine 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!
  • The render mesh can be exportet the same way, but without specifying the "/forceVCloth" command-line option.