The following section contains tips you can use in your XGen workflows.
Sometimes when you use attribute compensation the faces in the model do not align properly. For example, you can set Tilt V=1 (OffU when used in an expression) and all of your primitives will not point in the same direction. This misalignment is due XGen using intrinsic parameterization of the model, which is derived from the CV winding order.
To compensate for misaligned faces:
float upOrDown: (abs(dot(norm($dPdv),[0,1,0]))>0.6 || abs(dot(norm($dPdu),[0,1,0]))>0.6)? 1 : 0 float flipY: (abs(dot(norm($dPdu),[0,1,0]))>0.6)? 90 : 0 float flipZ: (abs(dot(norm($dPdu),[0,0,1]))>0.6)? 90 : 0
twist: upOrDown() ? flipY() :flipZ()
To make primitives only around the normal rotate to face the camera, do the following:
To make primitives rotate to face the camera:
length: 0.3 width: 1.0 offV: 1.0 aboutN: $eye=norm($cam-$P);$ang=acosd(dot( $eye,[0,0,1])); $axis=cross([0,0,1],$eye); dot($axis,$N)>0 ? $ang : -$ang
length: 0.3 width: 1.0 bendV[0]: 1.0 aboutN: $eye=norm($cam-$P);$ang=acosd(dot( $eye,[0,0,1])); $axis=cross([0,0,1],$eye); dot($axis,$N)>0 ? $ang : -$ang
When grooming large grassy areas, set Control using to Attribute to control noise at each segment of the primitive. Create an attribute-driven Description without the need to create guides, which also sets the default expressions so that they will not need guides.