Using clothes in OBJ format from Marvelous Designer or CLO
You can use simple clothes exported from Marvelous Designer or Clo in OBJ format.
- Introduction
- Preparing garments in Marvelous Designer
- Exporting garments from Marvelous Designer in OBJ format
- Importing Marvelous Designer garments in OBJ format
- Wrapping garments
- Configure materials for imported garment
Please also follow this video tutorial below.
1. Introduction
uDraper's OBJ import relies on UV mapping to reconstruct 2D patterns data. In particular, scaling of the patterns during the simulation in UE is based on the UV mapping. Therefore, if you see distortions or wrong sizing of imported garments during the simulation, it is an indication of the UV mapping mismatch.
If you plan to use your textures along with the imported OBJ file, you need to keep an original UV mapping while exporting your OBJ file. In addition, you should export another OBJ file to preserve 2D patterns data. In this case, please follow the Option B below when exporting your OBJ files.
2. Preparing garments in Marvelous Designer
Refer to Preparing garments in MD/CLO article.
3. Exporting garments from Marvelous Designer in OBJ format
Option A - no textures
See also OBJ-file export without textures
-
Before exporting your OBJ file make sure to select Reset UV to 2D arrangement in the UV editor.
- Select the patterns you want to export and select the Export OBJ Selected menu.
- Select the folder and the name for your OBJ file.
- In the Export OBJ dialog, select the following options:
- Single Object,
- Weld, and
- Thin.
- Select Unified UV coordinates.
- Make sure Scale is set to centimeters (100%)
- Click OK.
Option B - with textures
To keep the garment textures when importing into Unreal Editor, you need to export two OBJ files: with textures and with the patterns' UV coordinates.
See also OBJ-file export with textures
- For the first exported file, uncheck the Unified UV Coordinates option and select Save with Texture Files Zip.
- Before exporting the second OBJ file, open the UV editor and select Reset UV to 2D arrangement.
- Invoke the OBJ export command and specify another name for the OBJ file that should contain the patterns’ information.
- In the export OBJ dialog, keep the “Unified UV Coordinates” option checked and deselect the “Save with Texture Files”.
- Click OK.
Option C - with baked textures
If you want to bake additional graphics (e.g., stitches, overlays) into the textures you also need to export two OBJ files: with baked textures and with the patterns' UV coordinates.
See also Exporting OBJ files with baked texture
- For the first exported file, select the Unified UV Coordinates option
- Select the textures you want to create (e.g., Diffuse, Normal).
- Specify larger map size e.g. 4096 but not larger.
- Select Save with Texture Files Zip.
- Before exporting the second OBJ file, open the UV editor and select Reset UV to 2D arrangement.
- Invoke the OBJ export command and specify another name for the OBJ file that should contain the patterns’ information.
- In the export OBJ dialog, keep the “Unified UV Coordinates” option checked and deselect the “Save with Texture Files”.
- Click OK.
4. Importing Marvelous Designer garments in OBJ format
Option A - no textures
- In Unreal Editor, add the Draper Garment to your Draper Simulation component and click the Import button.
- In the Import Garment dialog, select the OBJ file you’ve just exported. Leave the pattern part empty.
- Specify a location where you want the imported garment to be saved.
- Since you do not import any textures, the Texture Processing option is set to Skip.
- Click import and your garment gets imported.
Option B and C - with textures
- Unzip the archive with the first OBJ file and textures.
- Repeat the OBJ import as in Option A above but this time select the second pattern OBJ file. This time you are importing the textures, so the texture processing is set to Compress.
- Click import to Import the garment.
5. Wrapping and saving garments
uDraper utilizes wrapping method to influence the garment shape by the avatar.
See Refitting clothes tutorial
6. Configure materials for imported garment
- With the Draper Garment component selected, click the Edit button to open the Draper Editor.
- You should see the materials that you configured for this garment in Marvelous Designer.
- Adjust the parameters for the garment materials such as Thickness, Bias, and Curvature. You should see how these parameters affect the appearance of the garment in your scene.
- Edit the visual appearance of the fabrics.
- For those parts that need to fit well to the avatar during the animation, you may want to increase the Rigidity gain and add some Bindings to prevent the garment from falling or tearing apart.
- Save the new materials to apply your new fabric settings before starting to run the simulation and animation.