xgen SeExpr – different lengths features at once

Ever found yourself grooming a character, that has an specific hair feature both short and long?
For ie, a complex character like a bison, might have short dreadlocks and long dreadlocks.
Controlling this features the usual ways is cumbersome, where you need several modifiers for each area of short and long hairs, and carefully crafted blending maps.
Wouldn’t it be great to, lets say: Have a single mask map to define the dreadlocks area, and be able to control features on short and long hairs at the same time?
Dream no more, use the expression below:

$minLength=1.0000;
$maxLength=10.0000;
$minValue=0.0000;
$maxValue=0.1500;
$gammaCurve=0.6000;
$value=linearstep($cLength, $minLength, $maxLength);
$value=gamma($value,$gammaCurve);
$remappedValue=compress($value,$minValue,$maxValue);
$remappedValue

The expression will expose this parameters:
Min Value: Value for the modifier, at the hair min length
Max Value: Value for the modifier, at the hair max length
Min Length: Hair minimum length
Max Length: Hair maximum length
Gamma curve: Controls the step between min and max. 1.0 is a linear blend, where a lower value will keep the min value for slightly longer hairs.

For ie: if you have an area with dreadlocks, that have short and long ones, add this expr to the clump value. Set the clump min value at the min hair length, and the max value at the max hair length.

Previous
Previous

RHEL/CentOS 7.3 nvidia-prime setup

Next
Next

xrandr, nvidia prime & cvt – how to add custom screen resolution