Pluralsight: Creating Dynamic Fur with XGen in Maya

I went through the following tutorial on Puralsight to learn the basics of using XGen. I then experimented with this to try and create a soft fleecy body for the Octaves. Learning a new system and trying to apply it in time for a deadline was quite challenging. University projects were good preparation for this but I found that there was an extra level of stress involved in the workplace.

Creating Dynamic Fur with XGen in Maya

An important note that wasn’t explained in the tutorial is about file paths. XGen likes to create folders for each modification that is applied to the groom. If any of the file paths to these folders are wrong then the groom will disappear. I found that XGen would sometimes make errors and save folders to the wrong collection directory. It’s therefore important to check that the initial folder creation is where you want it to be. I also found it helpful when working across multiple computers to make sure that all the file paths are relative. Instead of having the full path directory, start the file path with “$DESC/” so that the ‘description’ folder will be searched from whatever collection the XGen is set to.

XGen also seemed to have a bug for me. Whenever I imported a collection into a scene, two ‘description’ folders would be created within the ‘collection’ folder. One of these folders would contain all the information needed but would be ignored by XGen while the other folder would be read by XGen but contained an empty setup. This was fixed by a simple cut and paste. Maybe there was a reason for this?

My notes from the tutorial:

  • The grooming tab shapes the guide hairs. The primitives tab produces geometry from this.
  • Xgen uses ptex but you might need UVs to convert xgen.
  • An alembic file is used as it’s set up for minimal impact on Maya’s performance. You want to have a light scene for anything to do with dynamics.
  • Have a look at the presets in the xgen library.
  • Open the xgen editor.
  • A collection is e.g. bigFoot_Fur and a description is a subset of this collection.
  • Make sure that your geometry is at a decent scale for creating descriptions upon.
  • Choose the type of creation e.g. groomable splines.
  • Xgen creates instances across a surface.
  • don’t start with too low of a density as this will not translate into higher densities all that well. Use the ‘interp’ or ‘nearest’ method.
  • Create a mask under the geometry tab to tell xgen where to generate fur. If you’re not using ptex painting such as in mudbox, then use a workaround.
  • beside mask>create map.
  • Paint something onto the file. Areas that have seams will be difficult to paint out, so finish the painting in another program.
  • Replace the texture map with the file painted in another software such as zbrush.
  • Hit save after you load your new mask and then refresh the preview.
  • Look through the grooming tools tab. Use orient to start setting the direction of your fur.
  • Your undo does not work.
  • If too dense, set the mask to a lower percentage.
  • Use a large brush to get the initial direction correct.
  • Use elevation to lift fur that hasn’t detected collisions.
  • Flip from left/right.
  • Use the length brush in plus or minus increments
  • Smooth averages out areas
  • The noise can affect specific areas of the hair.
  • You can mask an area and then choose to affect within or outside this with a mask.
  • Use noise to add noise to the direction and twist of the hairs.
  • Attract can pinch to an area.
  • Repel is like a blowdryer.
  • The primitives are what get rendered, not the guide lines/cards.
  • Turn off ‘sync’ in the grooming.
  • Turn down the density of the primitives (unsynced to groom) so that they’re easier to work with when adjusting the appearance.
  • You can set the eye to update the preview automatically or when pressed.
  • Small polygons can be given less density or density can be distributed evenly,
  • Clumping
  • The grooming tab shapes the guide hairs. The primitives tab produces geometry from this.
  • To randomise things like length, use the modifiers tab,
  • Clumping cut and noise are suggested to look at.
  • Maya always prioritises clumping first.
  • Add a clumping modifier and >setup maps.
  • >generate. The yellow lines signify where the clumps will be.
  • The mask is like the opacity of the modifier layer.
  • Play with the clump mask, clump, and clump scale.
  • Add a clump on top of a clump for various clump sizes.
  • Cut and noise modifiers.
  • Any more modifiers will be effected in the order that you add them.
  • The cut effect shortens hair with a random expression.
  • Add a noise modifier.
  • >A higher frequency will make the hairs more curly.
  • >The magnitude is like the strength of the effect.
  • Add a coil modifier. Set the mask low to create a slight twist.
  • You can hide the guides and turn on the preview of the primitives.
  • The density of the preview will determine the viewport speed.
  • Try 80 to 120 density and test performance.
  • Fur renders differently than it appears in the viewport.
  • Paint a colour map for the xgen shader.
  • >You can paint a seprate map for the roots and the tips.
  • >Under the previwe/output tab, select the ‘create map’ button.
  • >Paint a scribble on the surface so that you have something to save and then hit the save button which creates a pTex map.
  • >Go to the hypershade and find the texture which was created.
  • The colour is been controlled through the xgen shader colour node.
  • >Instead of using this, setup colour through the custom shader parameter instead. this is uder the preview/output tab.
  • You can create multiple layers here with the plus button.
  • Click on the expressions button and convert this to map_ptex or map_3dpaint.
  • Modify the name of th expression to something more unique.
  • Turn the hair into nHair and then use this to drive the existing fur.
  • >Add the anim wires modifier.
  • The control map is where the animated hairs will be created.
  • Each hair map controls the surrounding hairs so make the map dense enough.
  • >Use lower densities for efficiency.
  • Look into nHair dynamics tutorials.
  • For the nHair dynamics, set the nucleus to simulate at the correct time.
  • We first need to fine tune the movements of the dynamic fur and then attach the xgen to this.
  • >use the ‘attach hair system’ button when ready,
  • Turn off viewport 2.0 if there are performance issues.
  • Turn up the stretch resistance and turn up the input curve attract so that it returns to the original shape.
  • Turning the body into a collider will slow down the scene.
  • You can edit the nHair dynamics under the shape node.
  • Select the hairSystem output and ‘attach hair system’/ set the ‘fre wires frame’ to the same start frame as the nucleus.
  • Adjust the magnitude and the interpolation of the magnitude scale to adjust how much the nhair reacts to movements.
  • You can cash the ‘hairsystem’ as an nObject.
  • You can add a wind modifier for some quick animation.
  • Once we are happy with the fur, save the fur to an external file. Use the groom bake modifier.
  • >Set the directory and hit ‘bake xdp groom’.
  • >Change the generate primitives option to ‘from xdp file’.
  • You can select you animation curves>cache>alembic cache>export selection to alembic.
  • Once cached out you can hid the hair curves and turn off the nucleus.
  • >you can also set the simulation method to ‘off’ under the hairShape
  • Under the animWires modifier you can turn off ‘live mode’ and set the wires file to read from the created .abc file.
  • export patchres for batch render
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s