Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

How to separate stray hairs from clumps in XGen

Anonymous

How to separate stray hairs from clumps in XGen

Anonymous
Not applicable

Howdy,

 

I was wondering if anyone had an idea on how to stop Clump modifiers from affecting stray hairs in XGen. I currently have an expression in the Length attribute that multiplies the hair length by a certain factor so that stray hairs grow longer.

 

The issue I'm running into is that clumping seems to be applied after XGen calculates the length of the hairs, so that the long strays are pulling into the clumps as well. I tried to use the "stray()? 0 : 1" expression on the Mask and Clump inputs of the clump modifier, but it doesn't seem to completely free the stray hair from being moved by the modifier.

 

A workaround I'm using right now is to create a Noise modifier that only affects the stray hairs, and let that change the stray hairs' shape and length instead of the actual Length attribute. It seems to work well since the Noise modifier applies after Clumping, but I feel like I'd have more control if I could adjust how much clumping affects the stray hairs.

 

Does anyone know how I could set up the Clump modifiers so that they don't move stray hairs?

Thanks!

0 Likes
Reply
Accepted solutions (1)
6,279 Views
4 Replies
Replies (4)

sean.heasley
Alumni
Alumni

Hi @Anonymous and welcome to the community!

 

This video should help you a lot! It goes over a few different ways on controlling strands via noise like you mentioned but also masks.

 

 

Please let me know if this helps or if you need any more assistance!

 

 

If one or more of these posts helped answer your question, please click Accept as Solution on the posts that helped you so others in the community can find them easily.

 

 

 

Kudos are greatly appreciated. Everyone likes a thumbs up!

 

 

0 Likes

Michael_Todd
Alumni
Alumni
Accepted solution

With a set stray percentage of 10, this expression:

$a=0.9200;#0.05,5.0 

$b=1.5600; #1.0,3.0

stray() ? $b:$a

will give 90% or the primitives a length of 0.92 amd 10% will 1.56 long.

 

To prevent the longer hairs from being clumped, an expression like this:

 

$a=0.0000;

$b=1.0000;

stray() ? $a:$b

will clump the shorter hairs, but not the rest. 

 

 

 



Michael Todd

XGen Product Owner and Designer

sean.heasley
Alumni
Alumni

Hi @Anonymous

 

I'm just checking in to see if you need more help with this. Did the suggestions that @Michael_Todd and I provided work for you?

If so, please click Accept as Solution on the posts that helped you so others in the community can find them easily.

 

 

0 Likes

Anonymous
Not applicable

Hey Michael,

 

Thanks for the feedback! I had tried using the stray()? function on the mask before, but it seemed to still move the strays (or viceversa). I just gave it another try and I must have messed something up on the first try, because it's working fine now.

 

Thanks!