Professional Services
Order outsourcing

Luna: Cloth Simulation and Hair Setup with XGen

Anda Deng talked about his project Luna: sweater simulation in Marvelous Designer and fabric shader, hair creation, and lighting. 

About the Author

Known as a versatile and prolific VFX Artist, Mr. Anda Deng has supported and contributed significantly to the work of projects in many different fields of design and entertainment. Mr. Deng’s particular expertise in 3D and VR Design has led to projects with leading studios including roles as a Digital Artist at Pinscreen and Character Artist at Survios, whose game “Raw Data” became the first VR game to reach #1 on Steam’s global top seller list and broke the record for gaining $1M in sales in its first month on Steam alone. As he is sought after for his expertise, he has collaborated with many company leaders and creative directors such as Pinscreen CEO Hao Li, Distinguished Fellow at UC Berkeley, Former Director of the USC Institute for Creative Technologies, Former Associate Professor at USC, and academic scholar with more than 6,000 citations. He has also worked alongside Damon Woods, Principal Character Artist at Respawn Entertainment; Jennifer Francis, Founder and CEO at Tiered World Studios, and Enrique Torres, Creative Director at BOND. Among his awards and industry recognition, Anda won the 3D Total Excellence Award for his animation “Luna” and the CG Society Featured Award for his personal work “Burning Desire”. Mr. Deng’s work has been featured by leading industry publications and the most popular trade magazines in the design and animation world, including 80 Level,  ArtStation, ZBrush Central, ZBrushtuts, CG Society, and 3D World Magazine. 

1 of 2

Luna: Goals

“Luna” is a small project that I designed on my own with inspirations from multiple references. I started this portrait for a few reasons. First, I always wanted to try something new so I could learn new things. As I was searching for ideas to get inspired, I came across some Barbie dolls. Then I figured that it would be a cool idea to make a character that feels like a doll but doesn't lack realism. Furthermore, I wanted to learn and discover how to make the hair with gradient by setting up the Arnold hair shader. On top of that, I also wanted to see if I can set up the shader attributes in Arnold for the realistic fabric instead of using normal generated from high poly or Substance.

Clothes SImulation

  • I made some simple patterns to fit the A pose model in Marvelous first.
  • Then comes the most important part which is to set up the animation for simulation later on in Marvelous. In Maya, let’s bring in the neutral pose and the posed models. First, click on the source model which is the neutral one, then shift-click on the target model which is the posed one. Then Deform - Blendshape like this:

Then set the keys in the animation slide by pressing S, like this:

Eventually, select the model with the animation, click Cache - Geometry Cache - Export Cache.

  • The final step is to import the animation MC file in Marvelous:

Usually most of the time, you will need to attach your clothing to the model because the clothing might slip away, something like this:

Finally, in Marvelous, go to the animation viewport. Hit the record button and it will generate the garment in the animation editor, like this:

Most likely, you will have to go back to the simulation viewport and fix the shape by pulling and pushing the clothing accordingly to get the desired look.

Sweater Shader

Here’s an overview of the sweater shader setup:

(This is my improved version based on the fabric shader setup from the xyz website, for more details explanation, please visit texturing.xyz).

Hair Setup

There are already a lot of tutorials online about creating hair and I’m not going to share how to make hair here. But I have done a lot of hair in my career and I will share some tips from what I learned.

First thing first, the most important thing to remember is to place guides layer by layer.

There’re basically two ways of how I place guides.

The first way is what I used for this project. As you can see I painted different colors for different guide layers. Here’s an example, basically 3 cannot exceed 2, 2 cannot exceed 1, that’s it!

1 of 2

The second way is to place guides group by group.

This way works with hair like this where you can see the hair group by group: 

Then the next step is to add modifier for the hair details:

Here’s the overview of what I have:

Here’s a list of xgen expressions I often use:



rand() < $percentStray/100.0 ? 1: 0

Random (min,max):


Random Based on the Hair Length:


There’re a lot more xgen expressions algorithm, please refer to Maya’s documentation for more examples. 

Here’s also another often used function for noise modifier (you can also try using it for other things to see how it looks).

Click on the right side triangle thing - Load Expression - samples - XGen - WaterRelatedExpressions - Noise - noise_smoothstep.

Basically it gives you a map like this:

Nothing is better than just trying it on your own. Try giving them different values and you will understand it immediately.

And here’s how I made the hair with gradient color and also with some random hair colors just like the realistic dyed hair:


For the lighting in this project, I tried out a bunch of lighting setups before I eventually got the lighting similar to this reference here.

Basically, I set up three lights plus a dome light (HDRI light).

Let’s break it down!

The first step is to set up an HDR light in order to determine the overall visual feeling of the scene. The best way to judge if it looks good is to see if there’s a shadow line.

With only HDR light:

The second step is to set up a key light s to officially determine the shadow line. Make sure there’s no overexposed area.

With only key light:

The third step is to add a fill light to fill the areas that need a bit more attention. I also made the fill light a bit bluish to make a contrast for primary and secondary visions.

With only fill light:

The last step is to add a rim light to serve the purpose of highlighting the outline. It’s already good enough as long as you can see it. Don’t make the rim light too strong!

With only rim light:

Eventually, turn on all the lights and do some minor adjustments for the overall look.


If you're interested in more tutorials from me, please check out “Female Character Creation Guide".

Anda Deng, Character Artist

Interview conducted by Arti Sergeev

Keep reading

You may find this article interesting

Join discussion

Comments 0

    You might also like

    We need your consent

    We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more