• Menu
Home › Tutorials › Changing clothes at runtime
Blog Menu
Tutorials
  • Installation and Activation
    • System requirements
    • Installation
    • Malware false positives
    • Bugs and issues
  • Using uDraper plugin
    • Setting up Draper components
    • Ready-to-wear clothes
    • Design clothes in 3D Draper
    • Import clothes in UE
    • Running cloth simulation in UE
    • Geometry Cache
  • Marvelous Designer & CLO
    • Preparing garments in MD
      • Clothes with layers
      • Pleats and folds
      • Shrinkage
    • Import from Marvelous Designer
    • Using MD OBJ files
  • Advanced uDraper
    • Refitting clothes
    • Using native UE materials
    • Wind functionality
    • Reducing Collider Mesh
    • Using clothes in OBJ format
      • Optimizing OBJ files for wrapping
    • Changing clothes at runtime
    • Using with Path Tracing
    • Simulation cache
    • Packaging SDK
  • 3D Draper
    • 2D Design
    • Sewing, Zippers, Buttons, Pleats
    • 3D Draping
    • Mannequins and measurements
    • Materials and textures
    • Import/Export

Changing clothes at runtime

There are two ways to change clothes on an avatar during an animation sequence or at runtime:

  1. By enabling/disabling specific garments. This method is suitable when all the garments are pre-set for the avatar beforehand and can be switched on and off during the simulation/animation.
  2. By explicitly specifying garment folders. This method allows loading garments dynamically at runtime without setting all the garments beforehand.

See also Changing clothes during animation with uDraper video tutorial.

In order to implement these method, you can use the following functions and variables.

  • Draper Simulation: Reload - puts changed garment properties into effect. Must be called after changing garment properties. E.g.


     
  • Draper Garment: Reset - Modifies the following Garment parameters:
    • Folder (Directory Path) - specifies a path to the garment folder.
    • Disable (Boolean)  - if True, disables the garment.
    • No Wrap (Boolean) - if True, disables garment wrapping.
    • No Simulate (Boolean) - if True, disables garment simulation.


     
  • Draper Garment: Enable (Boolean) - Enables/Disables Garment.
  • Draper Garment: Simulate (Boolean) - Enables/Disables Garment simulation.
  • Draper Garment: Order (Integer) - Garment's order in relation to an avatar's body. Garment with Order 0 is the closest to the body.
  • Draper Garment: Resnap - returns garment to its wrapped position. It may be useful if garment falls or gets teared during animation.

     
     

Depending on your scenario, you can combine these functions to achieve a desired result. E.g. this ChangeGarment function sets Enable, Simulate and Order parameters:

This ChangeGarment function combines Reset and Set order functions:

You can use this functionality in your Sequencer by adding corresponding Garments' and Simulation' tracks along with the Events Trigger Tracks and setting these functions in the Directors Blueprint.

 

 

 

See also:

Tutorials
  • Installation and Activation
    • System requirements
    • Installation
    • Malware false positives
    • Bugs and issues
  • Using uDraper plugin
    • Setting up Draper components
    • Ready-to-wear clothes
    • Design clothes in 3D Draper
    • Import clothes in UE
    • Running cloth simulation in UE
    • Geometry Cache
  • Marvelous Designer & CLO
    • Preparing garments in MD
      • Clothes with layers
      • Pleats and folds
      • Shrinkage
    • Import from Marvelous Designer
    • Using MD OBJ files
  • Advanced uDraper
    • Refitting clothes
    • Using native UE materials
    • Wind functionality
    • Reducing Collider Mesh
    • Using clothes in OBJ format
      • Optimizing OBJ files for wrapping
    • Changing clothes at runtime
    • Using with Path Tracing
    • Simulation cache
    • Packaging SDK
  • 3D Draper
    • 2D Design
    • Sewing, Zippers, Buttons, Pleats
    • 3D Draping
    • Mannequins and measurements
    • Materials and textures
    • Import/Export