[sectionBegin," The Fiber Brush ",0,"ZScript Primer (Press to expand this section)",
	[varDef,zbPrimerTempOpenFB][varDef,zbInitDocSavedFB,0][varDef,zbInitSavedDocFB,""]
	[iPress,7442]
	[if,(zbPrimerTempOpenFB),
		[iKeyPress,'N',[iPress,document:newdocument]]
	, // else
		[if,[messageYesNo,"OK to clear all customized tools, lights and materials?","DOCUMENT MUST BE CLEARED BEFORE PROCEEDING..."],
			[if,[isEnabled,document:save],
				[if,[messageYesno,"Would you like to save this document before proceeding?","Document has not been saved."],
					[iPress,document:saveas]
					[varSet,zbInitSavedDocFB,[fileNameGetLastUsed]]
					[varSet,zbInitDocSavedFB,1]
				] // end if (user saves)
			] // end if (save enabled)
			[Note,"One moment please...",,2]
			[iKeyPress,13,[iReset]]
			[varSet,zbPrimerTempOpenFB,1]
		, // else (user won't reset)
			[iUnPress,0][exit]
		] // end if (wanna reset?)
	] // end if PrimerTemp
	[Note,"This primer describes the Fiber Brush: a powerful painting tool that creates hair, grass, carpeting, mildew, or anything else that is made up of many strands.",tool:fiberbrush,-1]
	[Note,"\n\n\C909090(Click to continue)\Cc0c0c0",,0]
] // end sectionBegin
[pd][paintBackSliver,2,40,40,40][pd]
The [buttonPress,tool:fiberbrush,"Fiber Brush"] is a powerful painting tool that creates hair, grass, carpeting, mildew, or anything else that is made up of many strands. You can paint fiber on the canvas or on other painted elements, and the Fiber Brush "knows" how to orient the fiber so it appears to be protruding from them. [iButton,"Show me","Show the Fiber Brush in action",
	[routineCall,zbPrimerFiberInit]
	[iColorSet,200,110,0]
	[CanvasStrokes,zbPrimerHairStrokes1a]
	[CanvasStrokes,zbPrimerHairStrokes1b]
]. // end iButton
[pd]
The length of the fiber is determined by two factors: [FontSetSizeMedium]([PenMove,4])[PenMove,-15,6][FontSetSizeSmall]1[PenMove,5,-6][FontSetSizeMedium] The [buttonFind,draw:drawsize,"Draw Size"]: increasing the Draw Size also increases the length of the fiber [iButton,"show me","Increase the Draw Size",
	[routineCall,zbPrimerFiberInit]
	[iSet,draw:drawsize,96]
	[CanvasStrokes,zbPrimerHairStrokes1a]
	[iSet,draw:drawsize,24]
	[CanvasStrokes,zbPrimerHairStrokes1b]
]; // end iButton
and [FontSetSizeMedium]([PenMove,4])[PenMove,-15,6][FontSetSizeSmall]2[PenMove,5,-6][FontSetSizeMedium] The [buttonFind,draw:depth,"Depth slider"], which controls the length of the fiber independent of other dimensions [iButton,"show me","Increase the Depth Slider value",
	[routineCall,zbPrimerFiberInit]
	[iSet,draw:depth,.3]
	[CanvasStrokes,zbPrimerHairStrokes1a]
	[iSet,draw:depth,7]
	[CanvasStrokes,zbPrimerHairStrokes1b]
	[iSet,draw:depth,2]
]. // end iButton
[pd]
You can paint using any of the [buttonFind,28501,Materials], but it's usually best to choose [buttonFind,material:flatcolor,"Flat Color"] or [buttonFind,material:fastshader,"Fast Shader"] so that ZBrush doesn't waste time adding complex lighting attributes to each strand of fiber.

The actions of the Fiber Brush are subject to [buttonFind,draw:rgbintensity,"RGB Intensity"] and [buttonFind,draw:zintensity,"Z Intensity"] controls. Setting these to low numbers can give you the effect of translucent fiber, or help create the illusion that the fiber is very thin.

The Fiber Brush contains several [buttonFind,tool:modifiers,modifiers] that control various aspects of painting.

[buttonFind,tool:modifiers:density,Density] determines how thickly the fiber is applied [iButton,"show me","Paint with different Density values",
	[routineCall,zbPrimerFiberInit]
	[iSet,tool:modifiers:density,2]
	[CanvasStrokes,zbPrimerHairStrokes1a]
	[iSet,tool:modifiers:density,90]
	[CanvasStrokes,zbPrimerHairStrokes1b]
	[iSet,tool:modifiers:density,50]
]. // end iButton
0 is very sparse, and 100 is very dense.

[buttonFind,tool:modifiers:gravity,Gravity] determines whether the ends of the strands are pulled downward by gravity, and by how much [iButton,"show me","Paint with different Gravity values",
	[routineCall,zbPrimerFiberInit]
	[iSet,tool:modifiers:density,12]
	[iSet,tool:modifiers:gravity,99]
	[CanvasStrokes,zbPrimerHairStrokes1a]
	[iSet,tool:modifiers:gravity,-99]
	[CanvasStrokes,zbPrimerHairStrokes1b]
	[iSet,tool:modifiers:gravity,20]
	[iSet,tool:modifiers:density,50]
]. // end iButton
Setting this slider to a negative number pulls the strands upward, and setting this slider to 0 means no pulling is done.

[buttonFind,tool:modifiers:grooming,Grooming] determines whether the fiber points in the direction of your brush strokes, and by how much [iButton,"show me","Paint with different Grooming values",
	[routineCall,zbPrimerFiberInit]
	[iSet,tool:modifiers:grooming,0]
	[CanvasStrokes,zbPrimerHairStrokes1a]
	[iSet,tool:modifiers:grooming,99]
	[CanvasStrokes,zbPrimerHairStrokes1b]
	[iSet,tool:modifiers:grooming,35]
]. // end iButton
This effect is sort of like running a comb through hair while creating it.

[buttonFind,tool:modifiers:turbulence,Turbulence] determines how wavy each strand is [iButton,"show me","Paint with different Turbulence values",
	[routineCall,zbPrimerFiberInit]
	[iSet,tool:modifiers:density,6]
	[iSet,tool:modifiers:grooming,0]
	[iSet,tool:modifiers:turbulence,0]
	[CanvasStrokes,zbPrimerHairStrokes1a]
	[iSet,tool:modifiers:turbulence,85]
	[CanvasStrokes,zbPrimerHairStrokes1b]
	[iSet,tool:modifiers:turbulence,0]
	[iSet,tool:modifiers:density,50]
	[iSet,tool:modifiers:grooming,35]
]. // end iButton
0 is none, each strand is straight; 100 is waviest, each strand is wildly kinked and bent in random directions.

There are several options for determining the color of the fiber. By default, each strand is drawn with one color at the base, graduating to another color at the tip. You can specify both of these colors, and specify how they are applied.

[buttonFind,tool:modifiers:flatcolor,"Flat Color"] is simple: paint the entire strand, base and tip, with the [buttonFind,color:maincolor,"Foreground Color"] without shading attributes [iButton,"show me","Paint with Flat Color selected",
	[routineCall,zbPrimerFiberInit]
	[iPress,tool:modifiers:flatcolor]
	[CanvasStrokes,zbPrimerHairStrokes2]
]. // end iButton
[pd][pd]
[buttonFind,tool:modifiers:backgroundcolor,"Back Color"] paints the base with the [buttonFind,color:secondarycolor,"Background Color"], and the tip with the [buttonFind,color:maincolor,"Foreground Color"] [iButton,"show me","Paint with Back Color selected",
	[routineCall,zbPrimerFiberInit]
	[iPress,tool:modifiers:backgroundcolor]
	[CanvasStrokes,zbPrimerHairStrokes2]
]. // end iButton
[pd][pd]
[buttonFind,tool:modifiers:sourcecolor,"Source Color"] paints the base with the color of the element underneath, and the tip with the [buttonFind,color:maincolor,"Foreground Color"] [iButton,"show me","Paint with Source Color selected",
	[routineCall,zbPrimerFiberInit]
	[iPress,tool:modifiers:sourcecolor]
	[CanvasStrokes,zbPrimerHairStrokes2]
]. // end iButton
[pd][pd]
For an interesting effect, you can paint the entire strand with the source color by selecting [buttonFind,picker:continuouscolor,"Continuous Color"] in the Picker palette [iButton,"show me","Paint with Continuous Color selected in the Picker palette",
	[routineCall,zbPrimerFiberInit]
	[iPress,tool:modifiers:backgroundcolor]
	[iPress,picker:continuouscolor]
	[CanvasStrokes,zbPrimerHairStrokes2]
	[iPress,picker:selectedcolor]
]. // end iButton
[pd]
[buttonFind,tool:modifiers:rgbantialiasing,"RGB Antialiasing"] creates a smoothing effect for the fiber and should normally be left pressed.

[buttonFind,tool:modifiers:thickness,Thickness] determines the thickness of each strand [iButton,"show me","Paint with different Thickness values",
	[routineCall,zbPrimerFiberInit]
	[iSet,tool:modifiers:density,18]
	[iSet,tool:modifiers:thickness,1]
	[CanvasStrokes,zbPrimerHairStrokes1a]
	[iSet,tool:modifiers:thickness,16]
	[CanvasStrokes,zbPrimerHairStrokes1b]
]. // end iButton
1 is very thin, and 16 is very thick, and creates fiber that looks like a bunch of french fries.

The fiber is normally square, that is, if you viewed a strand from one end its width and height would be the same. [buttonFind,tool:modifiers:shape,Shape] changes these dimensions [iButton,"show me","Paint with different Shape values",
	[routineCall,zbPrimerFiberInit]
	[iSet,tool:modifiers:density,18]
	[iSet,tool:modifiers:thickness,16]
	[iSet,tool:modifiers:shape,-88]
	[CanvasStrokes,zbPrimerHairStrokes1a]
	[iSet,tool:modifiers:shape,88]
	[CanvasStrokes,zbPrimerHairStrokes1b]
]. // end iButton
Negative values create strands that are taller, and positive values create strands that are wider.

You'll probably find the Fiber Brush one of your most-often-used tools, because the number of applications is huge. Have some fun and experiment with it.
[pd]
[iButton," Return to your original (saved) document ","Return to your original file",
	[fileNameSetNext,zbInitSavedDocFB]
	[if,[isEnabled,document:save],
		[iKeyPress,'N',[iPress,document:open]]
	, // else nothing to save
		[iPress,document:open]
	] // end if
	[varSet,zbInitSavedDocFB,""]
	[varSet,zbInitDocSavedFB,0]
	[varSet,zbPrimerTempOpenFB,0]
] // end iButton

[routineDef,zbPrimerFiberInit,
	[iUnPress,transform:editobject]
	[iPress,transform:drawpointer]
	[iPress,layer:modifiers:clear]
	[iPress,tool:sphere3d]
	[iSet,texture:itemInfo,43]
	[iSet,material:itemInfo,1]
	[canvasClick,320,240,320,250]
	[transformSet,320,240,0,180,180,180,60,25,0]
	[iSet,tool:itemInfo,6]	
	[iSet,draw:drawsize,64]
	[iSet,draw:depth,2]
] // end routine

[varSet,zbPrimerHairStrokes1a,(ZObjStrokesV01n1=S(ZObjStrokeV01n75x3=H556V59P.007H556V59P.007H557V56P.018H555V56P.092H554V57P.166H553V57P.354H552V58P.412H551V58P.417H549V59P.421H545V60P.423H543V62P.426H537V64P.429H535V66P.430H529V69P.432H522V72P.432H519V74P.432H512V78P.434H504V82P.435H500V84P.439H486V91P.440H477V95P.441H472V97P.444H463V102P.447H454V107P.450H450V109P.452H446V111P.454H437V115P.455H421V124P.456H416V127P.456H399V137P.456H395V139P.456H391V142P.457H373V154P.456H368V157P.457H359V163P.458H346V171P.461H337V177P.464H332V180P.467H314V192P.470H309V195P.473H298V201P.474H284V211P.476H279V214P.478H270V220P.479H260V226P.480H246V235P.481H241V238P.480H224V249P.48H219V252P.480H210V259P.481H196V269P.484H182V279P.489H173V286P.493H161V295P.495H153V301P.498H149V304P.501H138V313P.503H132V319P.504H125V324P.506H115V332P.507H112V335P.509H107V340P.511H98V347P.513H93V351P.516H90V353P.519H85V357P.523H79V363P.523H75V367P.523H68V372P.524H64V375P.524H62V376P.525H57V380P.519H55V381P.488H52V382P.424H51V382P.212))]
[varSet,zbPrimerHairStrokes1b,(ZObjStrokesV01n1=S(ZObjStrokeV01n60x3=H43V38P.027H43V38P.027H46V40P.420H50V41P.423H52V41P.427H57V43P.433H60V44P.440H71V47P.444H75V48P.448H82V51P.451H86V52P.453H103V59P.455H107V61P.457H115V65P.459H124V69P.461H128V72P.462H141V80P.463H150V85P.465H155V88P.467H163V93P.470H171V99P.472H182V107P.474H186V110P.478H193V116P.481H200V122P.483H211V131P.486H215V134P.490H229V146P.493H240V155P.495H246V162P.497H250V165P.498H262V174P.500H273V185P.506H280V191P.511H292V202P.516H303V213P.520H319V228P.524H323V232P.531H335V243P.535H343V250P.540H355V262P.542H363V270P.545H376V282P.549H387V295P.555H395V302P.559H405V315P.563H415V327P.566H419V331P.569H430V347P.575H437V359P.581H444V371P.586H448V378P.589H457V395P.592H461V403P.596H463V407P.598H466V411P.593H468V413P.585H471V417P.577H472V419P.572H473V422P.536))]
[varSet,zbPrimerHairStrokes2,(ZObjStrokesV01n1=S(ZObjStrokeV01n351x3=H318V68P.038H318V68P.038H315V67P.463H314V67P.461H312V67P.459H311V67P.459H309V68P.459H306V68P.460H304V68P.461H302V68P.462H299V68P.463H297V68P.464H296V68P.465H294V68P.467H291V68P.468H290V68P.468H288V69P.469H285V69P.470H282V69P.470H281V69P.470H280V70P.470H277V71P.470H274V71P.471H272V72P.470H269V73P.470H265V74P.471H262V75P.470H257V77P.470H255V77P.470H250V79P.471H246V80P.473H244V81P.475H239V82P.477H238V83P.477H234V84P.478H232V85P.479H228V87P.481H224V88P.484H223V89P.485H219V91P.487H218V92P.488H215V94P.489H211V97P.490H209V99P.492H207V100P.494H206V102P.495H205V103P.497H202V105P.499H199V108P.5H198V109P.501H195V112P.501H193V115P.502H190V120P.503H189V121P.504H186V125P.505H184V129P.509H183V131P.512H181V135P.514H180V136P.517H178V140P.520H175V145P.523H174V148P.525H173V150P.525H172V153P.525H170V158P.526H170V160P.527H168V164P.527H167V167P.528H166V172P.529H166V174P.530H165V178P.531H164V182P.531H162V187P.531H162V191P.531H161V192P.530H161V196P.529H160V201P.529H160V206P.529H160V208P.529H159V212P.531H159V219P.533
H159V221P.535H159V224P.536H158V228P.537H158V234P.537H158V236P.538H159V240P.539H160V245P.540H161V249P.541H162V254P.542H162V258P.544H163V263P.547H164V268P.547H165V274P.548H166V278P.549H168V284P.549H170V291P.550H172V294P.551H172V296P.551H175V302P.553H176V306P.555H179V313P.557H181V317P.559H181V319P.561H184V326P.563H186V330P.565H189V336P.569H191V339P.572H194V345P.572H197V349P.574H199V353P.577H202V357P.581H205V360P.585H206V361P.589H210V366P.592H216V371P.593H217V372P.595H220V374P.596H225V377P.597H227V378P.598H233V382P.599H235V383P.600H241V387P.601H246V389P.602H248V390P.602H255V393P.604H257V393P.606H263V395P.608H267V397P.609H272V398P.610H278V400P.612H281V401P.613H287V402P.614H291V402P.616H297V403P.618H302V404P.619H306V404P.621H311V405P.621H314V405P.622H319V406P.624H320V406P.625H325V406P.625H331V405P.627H332V405P.627H337V404P.626H344V403P.625H346V403P.625H353V401P.626H356V400P.626H360V399P.626H366V397P.627H373V395P.627H378V393P.628H383V391P.629H385V390P.630H388V387P.631H392V385P.634H394V384P.635H405V375P.637H413V370P.637
H415V369P.638H421V364P.640H422V363P.642H425V359P.643H427V356P.644H432V352P.646H436V348P.647H439V346P.647H442V342P.649H444V339P.649H446V336P.649H448V332P.649H449V330P.649H452V325P.649H453V324P.652H455V321P.655H457V317P.658H458V316P.661H460V311P.665H460V310P.668H461V307P.671H461V305P.672H462V302P.674H463V299P.677H464V295P.680H465V292P.682H466V289P.684H467V285P.687H467V282P.689H467V279P.691H468V273P.695H468V272P.698H468V267P.701H468V262P.703H468V261P.706H468V255P.707H468V251P.709H468V250P.710H468V246P.709H467V241P.709H466V239P.708H465V236P.708H464V230P.708H463V226P.709H462V223P.710H461V220P.712H460V215P.714H459V212P.715H457V207P.717H456V202P.719H454V198P.721H452V193P.723H450V189P.724H448V186P.726H446V182P.727H444V179P.728H442V175P.729H439V171P.731H437V168P.733H435V164P.734H432V161P.736H431V158P.737H428V155P.739H425V152P.739H423V150P.740H421V147P.740H420V147P.741H415V143P.739H413V141P.739H410V139P.738H408V138P.738H406V136P.737H403V134P.736H401V133P.735H396V131P.735H395V131P.734H388V128P.734H383V127P.737H381V126P.738
H374V125P.740H368V124P.740H365V124P.741H360V123P.742H353V123P.742H351V123P.742H345V123P.742H344V123P.742H341V123P.742H337V123P.741H336V123P.735H334V124P.734H331V125P.733H330V126P.732H327V127P.731H323V129P.73H319V131P.728H316V133P.728H309V136P.728H307V137P.728H302V139P.728H298V141P.729H296V143P.729H292V146P.729H289V148P.729H285V151P.729H281V154P.729H278V156P.729H275V160P.728H271V165P.728H268V168P.728H264V173P.728H262V174P.727H257V181P.726H256V183P.727H253V188P.726H252V189P.725H251V193P.725H250V195P.725H249V200P.725H248V203P.725H248V208P.725H248V213P.724H248V217P.724H248V222P.725H248V224P.725H248V230P.723H249V238P.724H250V240P.724H250V245P.724H251V249P.724H252V255P.725H252V259P.725H254V265P.725H255V270P.724H257V274P.724H259V279P.723H261V283P.723H264V288P.723H268V293P.723H270V296P.725H274V301P.725H278V305P.726H279V307P.727H287V312P.729H293V314P.730H299V316P.731H305V317P.733H314V318P.734H316V318P.736H321V318P.737H329V318P.738H335V316P.737H338V315P.737H342V314P.738H347V311P.737H348V311P.737H356V307P.737H360V304P.737
H363V302P.737H368V298P.738H372V294P.739H373V293P.739H376V288P.741H378V285P.743H380V280P.745H382V275P.746H383V272P.748H384V267P.751H385V262P.753H385V259P.755H385V253P.756H385V252P.757H384V246P.759H382V242P.761H382V241P.762H380V234P.763H378V229P.763H375V225P.765H374V224P.765H369V220P.766H366V218P.766H363V217P.767H361V216P.767H358V214P.767H357V214P.766H355V214P.765H353V214P.762H351V214P.758H349V215P.752H347V216P.741H344V219P.680))]

[pd][pd][paintBackSliver,2,40,40,40][pd][sectionEnd] // end of Fiber Brush
