More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Under Construction
Making clothes for Unreal with Marvelous Designer and Maya

 

DESIGN IN MARVELOUS DESIGNER > “BIND” TO MH BONES & COPY “SKIN WEIGHTS” IN MAYA > ADD LOW-QUALITY PHYSICS SIMULATION IN UNREAL ENGINE


But then, once I’ve finished animating my film completely, I use Marvelous Designer to create a much higher quality physics simulation than Unreal can achieve. (Many people use Houdini for this, which is even BETTER quality.) To do this, I go back and I:

ADD FINAL ANIMATION TO BODY IN MARVELOUS DESIGNER AND SIMULATE GARMENT/S > EXPORT ANIMATED CLOTHING AS “ALEMBIC” FROM MARVELOUS DESIGNER > ADD “ALEMBIC” OF ANIMATED CLOTHING IN UNREAL ENGINE

New to Marvelous Designer? Check out my recommendations for the best ‘getting started’ videos!

 

My process, step by step

The following process is under construction and is not finished. Please also see my article about making the “VirtaClothes” MetaHuman clothing packs for the Unreal Marketplace.

Step 1. Get the Maya source file for your MetaHuman

  1. Make sure you have the desktop version of Quixel Bridge installed on your PC. That is, it’s the STANDALONE version of Quixel Bridge – not the version that launches inside Unreal Editor.
  2. Now open up the standalone Quixel Bridge and go to “MetaHumans“, and click on a UE5 MetaHuman tile that is fully colored – which means it is the absolute latest version of the MetaHuman body rig. If you want to use a character that only has a black and white tile, you need to open up MetaHuman Creator and update your character.
  3. Okay, so in the standalone Quixel Bridge, with a MetaHuman tile clicked, make sure you have “8k resolution” showing in the dropdown, and then click the hamburger menu and click on “Download Settings“, then click the “Models” tab, and make sure MetaHumans is set to “UAsset + Source Asset“.
  4. Now go ahead and download your MetaHuman. Once it finishes downloading, right click on the MetaHuman’s tile and then clickGo to files“.
  5. This will open a Windows Explorer window, and it will show the source files for your MetaHuman. Open the folder called “8k“, then “asset_source“, “MetaHumans“, then a folder with the name of your MetaHuman, then “Source Assets“, then you’re going to see a file that ends in “.ma“. For example, “m_med_nrw_body_rig.ma“. That is your MetaHuman Maya source file.
  6. Duplicate that source file, and change the name to add “_clothing” at the end (for example, “m_tal_nrw_body_rig_clothing.ma“).
  7. Open up that new “.ma” file in Maya 2024.

Step 2. Adjust the MetaHuman source file.

  1. In the Maya Outliner, type “combined” in the search bar, then expand the “export_geo_GRP” to get to your combined mesh (eg. “m_med_nrw_combined_lod0_mesh“) and select it.
  2. Go to the FILE menu, and click the BOX next to “Export Selected”.
  3. Change the FILETYPE to OBJ and click EXPORT SELECTION.
  4. Save the file. Optionally, you can name it the same as the combined mesh (eg. “m_med_nrw_combined_lod0_mesh.obj“).

Step 3. xxx

  1. Open Marvelous Designer
  2. Go to FILE>IMPORT>OBJ
  3. Find the OBJ you just exported from Maya, select it and click OPEN
  4. In the next dialogue box, make sure that:
    • the LOAD TYPE is set to OPEN
    • the object type is set to AVATAR
    • the scale is set to CM
    • the AXIS conversion dropdowns are set to Y, Z(up) and X, in that order.
    • the option INVERT is enabled underneath the X axis dropdown
  5. Click OK
  6. The MetaHuman body should now be in the viewport. Go to the 3D Garment top menu and click on “Create Fitting Suit”
  7.  In the next window, the defaults should work fine. Click APPLY, then SAVE. In the next dialogue box, name the file as “MHAVATAR_” and then the name of your body type, for example “MHAVATAR_m_med_nrw“.
  8. Now click CANCEL to close the fit dialogue box

Step 4. Create/fit existing clothing

Now create a garment from scratch or add an existing garment to the scene and ‘fit’ it properly to your character’s body.

Step 5. Export garment

Export the garment as an FBX.

Step 6. Import the garment into Maya

Import the garment into Maya.

Step 7. ‘Bind’ the garment to your skeleton

Ok, in the outliner, click on “body_joints”, then right click and choose “select set members”. Hold down shift and click on the garment mesh. Now go into the Skin menu and choose “Bind Skin”.

Step 8. Copy skin weights.

The skin is bound now but it’s not yet correct because the skins weights are wrong. So in the outliner, click on the character’s lod0 “combined” mesh, then hold down shift and click on the garment mesh, then go into the Skin menu and choose “copy skin weights”.

Step 9. Fix garment tearing

  1. In the viewport, rotate the character’s arms and legs and you’ll see that there is probably “tearing” in various areas.
  2. To fix this, we can use a technique called “hammering”.
  3. Select all of the “edges” on the garment that we want to affect.
  4. So in the outliner, click on the garment . Then at the top of the viewport, click the “isolate” button (it’s three buttons to the left of the X-ray joints button).
  5. Go into EDGE mode (spacebar then Edge?)
  6. Marquee select the item you want to hammer
  7. Spin around to make sure they are all selected.  Hold down shift (maybe) and marquee select any remaining ones you’ve missed. Deselect any incorrect edges.
  8. Now expand the selection by five steps (1,2,3,4,5… press shift period maybe???)
  9. Convert the selection to to “vertex”.
  10. Now go into the skin menu and choose “Hammer Skin Weights”. (You can add it to a shelf to make it easier.)
  11. You can now “mirror skin weights” to copy the changed skinweights to the other side of the character’s body.
  12. Now do the same process for other body parts.

Step 10. Fix ‘stiff’ areas

If your character has a belt, it may need to have its skin weights adjusted.

  1. Click on the character’s left hip (inside the root_drv) and rotate it so that it’s left lig rises up all the way. If you see that this motion affects the solid sections of the belt, you need to make that belt object behave like solid metal.
  2. In the outliner, click on the garment mesh. Then, in the viewport, go into Vertex mode (everything should turn blue). Now go into the Skin menu and choose “Copy Vertex Weights”.
  3. Now click on the belt, and keep (shift-clicking??) to select the entire belt.
  4. Then at the top of the viewport, click the “isolate” button (it’s three buttons to the left of the X-ray joints button).
  5. Now deselect the faces that you don’t want.
  6. Now go into the skin menu and choose “paste vertex weights”.
  7. Now go back into object mode (everything will be green), and get out of isolated mode.
  8. Once again, click on the hips (inside the root_drv) and rotate them to lift the legs up. You’ll see that the belt is now fixed.

Step 11. Fix groin area

The groin (or ‘upper leg’) section of the garment might not be acting like real fabric.

If necessary, you can fix this by creating a mesh called the “cage” mesh, which is just a cutout section of the main dress mesh that only covers the waist to just above the knees.

  1. MAKE CAGE MESH
    • Copy the garment mesh, and name the copy “cage”. Now isolate it. Delete all the vertices that are above the waist, and then delete all the vertices that are below the knees.
    • Once you have this “cage” mesh, you need to duplicate it and name the duplicate “no edgeloops”. Hide the original “cage”. Now in the “no edgeloops” cage, delete the vertical lines in the middle parts (front and back) of the cage.
    • Now turn off isolation.
  2. SKIN THE CAGE WITH “NO EDGELOOPS”
    • Click on “body_joints”. Right click and choose “select set members”. Hold down shift and click on the “no edgeloop” cage. Now go into the skin menu and choose “bind skin”.
    • Now in the viewport, click on the red “body”. (This is a thing inside “rig” inside the outliner, but not sure which it is.) Hold down shift and click on the “no_edgeloop” cage, then go into the skin menu and choose “copy skin weights”.
  3.  SKIN THE MAIN CAGE
    • Unhide the main cage.
    • Click on “body_joints”. Right click and choose “select set members”. Hold down shift and click on the main cage. Now go into the skin menu and choose “bind skin”.
  4. COPY SKINWEIGHTS
    • Now in the Outliner, click on the “no edgeloop” cage then shift click on edgeloop; then go skin menu and “copy skin weights”.
    • In outliner, hide the “no edgeloops” cage.
  5. APPLY TENSION DEFORMER
    • In the viewport, click on the main cage.
    • Press spacebar, then click on “Deform”, then “Tension”.
    • In the Attribute Editor tab, under “Tension Attributes”, disable ‘Pin Border Vertices’.
    • Change “Smoothing Iterations” to 100. Change “smoothing step” to 1.
    • Change “Squash Constraint” to 0.
  6. CREATE A DETACHED COPY OF THE PELVIS JOINTS AND CAGE
    • In the outliner, click on “root_drv” then press H to hide it.
    • Click on “DHroot:body_root” and press H to unhide.
    • Click on the main cage, then in the Channel Box / Layer Editor select all of the channels from translate X down to Scale Z, then right click and choose “unlock geometry”.
    • Now you need to Detach some of the joints. To do that, it’s not entirely clear, but I think in the Viewport you select the left shin bone, then shift click on the right shine bone, then somehow “detach” them. This will make two new items in the Outliner – “DHIbody:calf_l” and “DHIbody:calf_r”.
    • Now click anywhere blank in the viewport to select all. Go up to the belly button of the character and select the bone just above it, then detach that too. This will make a new item in the Outliner – “DHIbody:spine_03”.
    • Now in the viewport, click on the cage, then hold down shift and click on the bones that are left around it. Now duplicate this, and move it to the right.
  7. BAKE DEFORMATION
    • Now click anywhere blank in the viewport to select all.
    • In the skin menu, go to the final option which is  “bake deformation to skin weights”.
    • In the dialogue box that appears, you need to drag an item into each of the four main text fields.
    • In the outliner, click on the main cage mesh (the original one, not the copy) and drag it into the dialogue box under “SOURCE>MESH”.
    • In the outliner, twirl down “DHIbody:root” then drag “DHIbody:pelvis” into the dialogue box under “SOURCE>SKELETON”.
    • In the outliner, click on the duplicate cage mesh (not the original) and drag it into the dialogue box under “DESTINATION>MESH”.
    • In the outliner, twirl down “DHIbody:root” then at the bottom of its objects there will be a standalone item called “pelvis” which is the duplicated pelvis bones, so drag that over into the dialogue box under “DESTINATION>SKELETON”.
    • Change the “number of influences” to its maximum, which will be 50. Then click apply. Then you can close the dialogue box.
    • Now it has a smooth deformation.
  8. RE-ATTACH PELVIS
    • In the outliner, click on the original main cage and press H to hide.
    • In the outliner, twirl down “DHIbody:root” then at the bottom of its objects, click on the standalone item called “pelvis” which is the duplicated pelvis bones. Then in the Channel Box / Layer Editor change translate X to 0. Click again on this standalone “pelvis” and click H to hide it.
    • Now reattach the pelvis. To do that, select the knee bone and the bone above it and click something? Then do same for other leg? Now do same for belly button bknes?
  9. COPY SKIN WEIGHTS
    • Unhide the garment.
    • ??Go into front view.
    • ??Vertex.
    • ??Component mode.
    •   Grab this entire vertices.
    • ??And while selected, right click and go to object mode, select this geometry and select this geometry, then go to vertex mode, and go skin, copy skin weights.
    • ??Now hide skeleton. Hide other skeleton.
    • ??Now it behaves like a cloth.
  10. DELETE DUPE PELVIS
    • Before exporting geometry, need to remove the other pelvis. Delete it.

Step 12. Export garment as FBX

Select the garment, go to file menu and choose export selection. Choose FBX and export it.

Step 13. Import the garment into Unreal

In unreal, setup a character with animation.

Import the garment. Select the skeleton “meta skeleton base skeleton”. And import.

Step 14. Apply the garment to your character.

Go into character blueprint and click on torso. Assign garment. Save it.

Step 15. Make material double sided.

Now make the material double sided.

WHAT NEXT?

Now the garment works well. You can now work on its simulation inside Unreal.

That is, there is a “physics body” that you can adjust to set collisions properly. And also you can paint a “simulation mask” – which sets which sections of the fabric are set to ‘simulate’.

This MadPony video (YouTube link) covers these processes.

If you have an existing Avatar inside Marvelous Designer, with clothing on it that is fitted perfectly, you may want to “fit” the items to a MetaHuman body. There are various ways to do it, but a special way that MAYA EXPERT uses is shown in his video series here. (Basically, if the existing Avatar in Marvelous Designer is CLOSE in size and proportion to the MetaHuman size you want, then you can use a “morph” process. It involves adjusting a proper MetaHuman body in Maya so that it matches the Avatar body, then importing that newly adjusted MetaHuman body into Marvelous Designer as a ‘morph’.)

 

 

 





LATEST UPDATES






© Seabridge Films 2024. No warranties are made for the accuracy of content on this website. For educational purposes only. Please do not reproduce, in whole or in part, any resources in this website without express written permission.

Use of code from this website, including scripts and Python-based plugins, is at your own risk.