Garment Processor

Garments are often designed in dedicated packages such as Marvelous Designer or Optitex. These packages can export “thin” simulation meshes and thicker render meshes, (that encase the sim mesh). For many applications these render meshes are good enough for final use. Also, it’s helpful even for Hero movie characters to quickly preview something with the thicker render meshes rather than thin sim meshes. We have put together a Carbon Garment Processor workflow (macro) to support the import of simulation and render meshes and it includes a highly optimized deformer to map render meshes to sim mesh with very little processing overhead.

For this tutorial, we use the Carbon Garment Processor to import and setup a simple T-Shirt.

_images/tutorial_garment_processor_initial.png

T-Shirt.

The T-Shirt is made up from panels, and has:

  • Thin simulation geometry panels (typically lower resolution than render geometry)
  • Thick higher resolution render geometry panels
  • A number of higher res render geometry details (i.e. stitches, button holes etc.)

Details can also include buttons or these can be set up and simulated separately as rigids.

The number and names of panels of simulation geometry and render geometry must match. The names of the detail geometry are irrelevant.

See separate tutorials on exporting simulation and render geometry from garment design packages.

Note

Maya does not allow import of two FBX with same panel etc. names! So, if needed, to work around this, open two Maya sessions and import thick and thin into different sessions. Then cut and paste one into the other - job almost done. Now, use Modify -> Search and Replace Names to replace the pasted__ in the names with ‘’.

Stage 1 - Select Geometry

Set Geometry

  1. Please place all thin simulation geometry in a group, i.e. under a collective transform.
  2. Please place all thick render geometry in a group, i.e. under a collective transform.
  3. Please place all details geometry in a group, i.e. under a collective transform.
  4. Now, create a Carbon Garment Processor node and select it in the outliner.
  5. Then point the Simulation Panels dropdown to the thin simulation geometry.
  6. Then point the Render Panels dropdown to the thick render geometry.
  7. Then point the Render Details dropdown to the details geometry.
_images/tutorial_garment_processor_stage1.png

Stage 1.

Move to Stage 2

Next, press Move to Stage 2 to run a basic check on the input data. This is simply to test if simulation and render geometry indeed has the same number and names of panels.

So this would for example trigger in this case:

_images/tutorial_garment_processor_check_data.png

Data check fail.

And you see the following error message:

// Error: Carbon Garment Processor carbonGarmentProcessorShape1: Simulation Panels and Render Panels must have the same number of meshes, and same mesh names. //

If there are no issues, Stage 1 gets locked and we move to Stage 2.

Stage 2 - Edit Mapping

You can see that all of the input geometry has been moved inside the carbonGarmentProcessor and is located under a new simulationGeometry and deformerGeometry transform.

All Render Panels and Render Details have been automatically matched under deformerGeometry.

_images/tutorial_garment_processor_stage2_start.png

Stage 2.

The automatically generated mapping tries to associate each detail geometry with a render geometry panel, so that it can later be deformed correctly. However, this automatically generated mapping might not always be correct and manual adjustments might be needed.

This is what this stage is for.

To edit, tick Color Results to visualize the matches, and click Edit Detail Assignments to open the Assignment Editor pop-up window.

_images/tutorial_garment_processor_stage2_edit1.png

Stage 2 - Edit Details Assignment.

At this stage, it can happen that neighboring panels are assigned similar colors.

_images/tutorial_garment_processor_stage2_same_colors.png

Stage 2 - Similar colors.

There are two ways to change colors of panels. First, press the Change All Colors button on the Garment Processor itself. This will completely reassign random colors to all pairings.

Alternatively, a more fine grain approach is using the Change Color button on the Assignment Editor pop-up window. Simply select either a main panel, or a detail panel, and then press the button. It will assign a new random color to the selected panel and all its pairings.

_images/tutorial_garment_processor_stage2_changed_colors.png

Stage 2 - Changed colors.

Now, let’s assume that for example the neck stitch detail had accidentally been associated with the front panel, such as this:

_images/tutorial_garment_processor_stage2_edit2.png

Stage 2 - Edit Details Assignment.

To change the detail assignment, go in the viewport and first select the detail that was wrongly assigned, then press Shift and select the new main render panel that it should be associated with:

_images/tutorial_garment_processor_stage2_edit3.png

Stage 2 - Edit Details Assignment.

Then click Change Assignment. And, voila, it is now correctly assigned to the neck piece, as can be seen in the outliner, and by the matching color in the viewport:

_images/tutorial_garment_processor_stage2_edit4.png

Stage 2 - Edit Details Assignment.

Once you are satisfied with all mappings, close the Assignment Editor pop-up window and click Move to Stage 3.

Stage 3 - Merge Details

At this stage, you can decide to merge all details that are assigned to the same panel. The main upside of this is to reduce the number of Carbon Mesh Deformer nodes that will be needed in the final setup. Some garments could have hundreds of details assigned to each render panel, if for example each piece of a zipper was stored in a separate geometry.

Note

Merging details is optional.

Before:

_images/tutorial_garment_processor_stage3_1.png

Stage 3 - Merge Details.

After:

_images/tutorial_garment_processor_stage3_2.png

Stage 3 - Merge Details.

Note

The Merge Details button will become disabled once clicked.

Now, please click Move to Stage 4.

Stage 4 - Create Simulation

Moving to Stage 4 will automatically generate a panel stitched simulation.

_images/tutorial_garment_processor_stage4.png

Stage 4 - Create Simulation.

For ease of use, all Carbon Stitching can be controlled via the Stitching parameters in the Stage 4 - Create Simulation section.

Note

You may need to tweak the stitching settings either now or later to get the stitching required. After tweaking the settings you need to reset the simulation to see the impact of the change. Please refer to Carbon Stitching for more information on the individual parameters.

Also, all Carbon Cloth are connected to an automatically generated carbonClothMaterial1. See Carbon Cloth Material.

Stage 5 - Apply Deformers

At any point, you can press Apply Deformers to create and apply Carbon Mesh Deformer nodes. Render panels will be deformed by the Carbon Cloth output geometries, and details will be deformed by their assigned Render panels’ deformer’s output. Upon clicking Apply Deformers, you should see a pop-up progress window, such as this:

_images/tutorial_garment_processor_stage5_1.png

Stage 4 - Apply Deformers.

Note

For geometries with lots of points/primitives, this process can take up to several minutes.

Note

The Apply Deformers Stage will become disabled once clicked.

Once complete, you should see the final setup, like this:

_images/tutorial_garment_processor_stage5_2.png

Final Setup.

Note

At this stage, you are also able to reassign details that you might have missed at Stage 2. Please refer to Stage 2 for more information on how to reassign details.