Introduction
Installation
Interface
Quick Start
Misc

Fiber 2.03 Interface settings

Basic Operation:

* Select one or more meshes (one must have primary focus where it is highlighted a lighter pink). 



* Place your cursor into the text window and press Alt-P to run the GUI. (Note: You can also run the script by choosing the option from Scripts>Mesh>Fiber Script v2.03 if you followed the instructions in the Installation section.

*Adjust the values in the interface and press the "Create" button (Alternatively, you can load Presets with .fib extensions).


*WARNING - Focus will be shifted to the fibers after you run the script for the first time- It's not fun to run the fiber generator on fibers, you'll end up generating so many faces that it might take minutes or hours to complete! Remember that you can halt the script in progress if it's taking too long by bringing up the console window and pressing Ctrl-C .
Fiber 2.03 GUI



Additional information about the following GUI buttons and associated features can be found via the links below:

Use VCol
Allows vertex color to modify gravity, length, and density.
Use Wind
Allows fibers to be affected by wind.
Use Guides
Allows "guide" fibers to influence the path of the fibers.
Estimate Faces
Estimates the number of faces produced in the generated fibers.
Presets
Allows Fiber script settings to be saved to/loaded from a .fib text file.
Animation
Describes the various animation features which may be used with the fibers.
Auto UV for fibers
Describes UV texture application for the fibers.
Mac Users
Discusses issues relevant to Mac Users.
Other
Miscellaneous Fiber script issues.



Density
This parameter controls the density of fibers per face. See also "Use VCol" where Blue affects density. Does not create fibers where vertex paint contains no blue. Refer to the following link: Density for more information.

5.0
SD=1
25.0
D=25.0
50.0
SD=0


Segments
Sets the number of segments per fiber. The more segments you choose, the longer the fiber will be.

1
S=1
2
S=2
3
S=3


Length of Segment
Sets the length of each segment on all fibers. The longer the segments, the longer the fibers will be. The "Length of Segment" is also affected by Green VCol.   (See also "Segments" and "Fiber Guides").

1.0
SL=1.0
5.0
SL=5.0
10.0
SL=10.0


Randomize Length %
Randomizes segment lengths across all fibers.
?? Obsolete / redundant parameter ?? - Use Green vertex colors instead to vary fiber segment lengths, and enable the 'Use VCol' button.


0.000
Random Length = 0
0.500
Random Length = 0.5
1.000
Random Length = 1.00


Width
Sets the width of all fibers.

1.00
Width = 1.00
10.00
Width = 10.00
20.00
Width = 20.00


Gravity
Sets a gravitational force for all fibers in the negative Z direction. Results in each successive segment of the fiber being angled "downwards" slightly more than the previous segment.  Note that it is normally best to keep the 'Gravity' parameter relatively low (< 5.0) to prevent the fiber strand from becoming inverted on "horizontal" mesh faces. Gravity is also affected by Red VCol.

0.00
Gravity = 0.00
1.00
Gravity = 1.00
2.00
Gravity = 2.00


Initial Gravity
Applies an initial amount of Gravity which is constant for each segment of the fiber.
(The angle of each segment in the fiber strand is equal).


0.00
Initial Gravity = 0.00
15.00
Initial Gravity = 15.0
30.00
Initial Gravity = 30.0


Randomize Direction
Sets a random direction that fibers will be generated relative to the face normal.

0.00
Randomize Direction = 0.00
10.00
Randomize Direction = 10.0
25.00
Randomize Direction = 25.0


Frizziness
Affects the amount that the angle varies between each succesive segment of the fiber, causing the fiber to bend in a zig-zag fashion.   Note: It is normally best to keep the 'Frizziness' parameter less than 50 to avoid the tendancy of the faces to fold up on themselves at higher values.

0.00
Frizziness = 0.00
10.00
Frizziness = 10.00
25.00
Frizziness = 25.00


Normals / Clumpiness
Works in conjunction with Fiber Guides. Sets the degree to which the fibers clump around the face normals from which the Guide is generated. The higher the value the stronger the clumping effect.

0.000
Clumpiness = 0.000
0.500
Clumpiness = 0.500
1.000
Clumpiness = 1.000


Clumpiness Falloff
Spreads the effect of clumping along the length of the fibers relative to the Fiber Guides. The higher the value, the more effect it will have on clumping. (With "Normals/Clumpiness" set to 1.000 and "Clumpiness Falloff" set to 0.000 the fibers will ignore the Fiber Guides. With "Clumpiness Falloff" set to 10.00 or higher the Fiber guides will have maximum effect.

( N/C = 1.000 )       0.000
Clumpiness Falloff = 0.000
( N/C = 1.000 )      5.000
Clumpiness Falloff = 5.000
( N/C = 1.000 )      10.00
Clumpiness Falloff = 10.00


Fiber Guides
Mesh loops that the fibers in neighbouring faces will follow when the "Use Guides" button is on. Though each Guide is a Mesh Object the fibers will follow them much the same way mesh geometry follows a Bezier Curve and the 2 "Clumpiness" functions will set the weights of the nodes (in a manner of speaking).

3
Fiber Guides = 3
10
Fiber Guides = 10
25
Fiber Guides = 25


Fiber Guide Segments
Number of segments in each guide. All Guides generated with the "Make" button will have equal number of segments. The length and shape and position of each guide can be edited in edit mode and all the modeling tools apply (for each guide seperately, or for the whole Guide mesh as a whole).

3
FGS = 3
4
FGS = 4


Pointed
Toggles the final segment of each individual fiber between square and pointed tips for all fibers.

OFF
Pointed = OFF
ON
Pointed = ON





Additional Notes/Tips

Density

RipSting: (Quote)

If you notice on a UV sphere the quads become tris at the polar regions and the area of each individual face lessens dramatically. The script thinks there's not enough surface area for even a single fiber. There are two solutions to this:
1)Use an ico-sphere instead with evenly-sized faces. or
2)Increase the density so much that it will draw some fibers up there (and make sure you're using bright blue vertex paint), and then vertex paint the rest of the sphere with .05 blue or something like that. 



Fligh: (Quote)

Tip 1) Duplicate, seperate or split that part of the mesh you want hair on (scalp) and use it rather than the whole mesh. Then put it under the scalp of the head.

This technique, to seperate the part of the mesh object for which no fibers were generated and then running the fiber script on the seperated object, is illustrated in the sequence of images below:

Figures 1, 2. Seperating the fiber-less portion

Figure 3. Seperated Section (Retains VCol)

Figure 4. Run Fiber Script

Figure 5. Final Result




Fligh: (Quote)

Sometimes all or some faces are too small (in global space) to generate fibers (although they are included in the "Estimate Faces" value. A workaround is to scale the object bigger in object mode, estimate faces again, generate the mesh and then scale the generated fiber mesh back down to size.




Use VCol

When you use this button, the "Estimate Faces" function will only consider those faces that are painted and the Density, Length of Segments and Gravity settings will be combined with color information for VCol faces only (unpainted faces will be ignored). If you do not use this button all faces of the selected mesh will be calculated and Density, Length and Gravity will rely on the relevant slider values and the effect of the Fiber Guides if used.
Use VCol OFF = Fibers generated from all faces on selected mesh(es)
Use VCol ON = Fibers generated only from VCol painted faces  



VERTEX PAINTING PROPERTIES- Select your base mesh and press V. This brings you into vertex paint mode. Go into the paint buttons window (The icon of the paint brush)
*Note: In Blender version 2.33a, the Vertex Paint controls ('Paint' panel) is located in the Edit Buttons Window [F9].
Adjust the color that you're going to paint with
Red = Gravity effect
Green = length
Blue = Density
Does not draw fibers where vertex paint contains no blue.


You can combine the multiple colors as well (Red [Gravity] + Green[Length] = Yellow [Gravity & Length])
Paint on your base mesh
Once finished, press V to exit paint mode
Press 'Make' next to 'Vert Col' in the Mesh tab in Edit buttons.
*Note: In Blender version 2.33a, 'VertCol' is automatically activated upon entering Vertex Paint mode.
Vertex colors may be deleted by pressing the 'Delete' button next to the 'VCol' name in the Edit Buttons Window [F9].
Adjust the color that you're going to paint with
Run the script and watch the results!



Harkeyman: (Quote)

I seem to be having trouble getting the script to recognize my vertex colors. I'm painting them in in Vertex Painting mode. I can render the base mesh with the colors in it, so I know that's working. The problem is, when I turn on the VCol button in the script's gui, it makes no difference to the script. The provided sample blends work fine. Importing one of the base meshes from the sample file into my own blend file and using the provided sample fib works. Applying that same fib to my own mesh with vertex colors does not work. What gives? Any ideas?



edit: when I even slightly modify the vertex painting on the imported sample mesh that works correctly, it makes the VCol feature fail. I'm using Blender 2.3. I'm off to try it in 2.28.


update: workaround found... When this occurs, I create a new object (icosphere). I vertex paint this new mesh - just a dab. Run Fiber script. Works fine. I join my non-functioning mesh to this new one. Run Fiber. Creates fibers on the whole mesh utilizing vcols! Edit mesh, remove icosphere dummy object. Run fiber - still works. Vertex paint this mesh some more. Now Fiber fails.


At this point, you can repeat the add object... join... procedure herein described and it will work again.


JarellSmith: (Quote)

It's always best not to have the script running while you are adjusting the vertex colors (seems to be a bug with Blender 2.32 - see my post in the Questions forum) and/or assigning a material to the new mesh.



Use Wind

Uses an Empty "Wind" to animate the fibers as though wind were blowing through a field of grass.

In the GUI press the "Use Wind" button. If you don't already have an empty named "Wind", it will create one for you. If not then add an Empty, go into Edit Buttons and in the 'Link and Materials' panel change the OB: name to "Wind" (upper case W)

Wind moves in relation to the origin. So moving the empty to the south west will have the wind blow to the south west.

The size of the Empty relates to how large each 'gust' is.

Moving the Empty on the Z-axis adjusts how powerfull the wind is.

Moving the Empty closer to the object center slows the animation, moving it further away speeds it up.



Use Guides

Forces the fibers, when generated, to follow the "Fiber Guides".
The length of the Guides will override the original lengths of the fibers.

In the GUI, select the number of Fiber Guides you want to generate (This can be updated manually later).
Select 3 or 4 segments (3 is faster, but doesn't give you as much flexability as 4).
*This will be updated soon so you can have up to 100 segments*

Be sure to select the base mesh and press the "Make" button.
Select the Fiber Guides and go into edit mode. Move the verts around so that they go in the direction you want them to.
You can delete Fiber Guides, but you must have at least 3 per base mesh. You can also add new Fiber Guides by pressing Ctrl+Left-mouse-click.
Make sure you have "Use Guides" selected in the GUI and press "Create".



RipSting: (Quote)

The Make Guides button should do all the work for you, all you should have to do is move around the verts.
Make sure that if you decide to delete a guide, that you select all the verts in the strand. The L-key comes in handy for this.
Also, if you create a new guide, you can't just copy-paste an existing one. make sure no verts are selected and use ctrl-Click to build a new guide. The number of verts in the guide has to match the number of verts that you specify in the script's interface.

Finally, make sure the "Use Guides" toggle is selected.



RipSting: (Quote)

You're creating the fiber guides from scratch, right? If you do it this way, you must create each fiber guide using the ctrl-click method. You CANNOT create one strand, and Shift-D to duplicate it while in edit mode. When you do it this way it doesn't keep the order that the verts were created in. You CAN create one guide, exit edit mode, duplicate with Shift-D, and then re-join it to the original mesh using Ctrl-J.
By the way, segment length doesn't effect fibers that follow guides.



Estimate Faces

This button produces an estimation of the number of faces generated in the fibers prior to pressing the 'Create' button.

If the value is too low, increment the 'Density' property (Absolute maximum setting of 1000), increase the blue vertex color of the generating mesh (when using the 'Use VCol' option) and/or temporarily scale up the generating mesh.
If the face count is higher than desired, do the opposite of the above mentioned options.


Presets

The 2.03 zip comes with presets with .fib extension; Dreadlocks, PonyTail, Grass and Wheat.

Either type in the path or browse to the .fib file with the "Select" button and then press "Load Preset" which will set all the fields for you.

If you find a setting which you would like to keep then type in a filepath (or modify the existing one) with a unique name and press "Save Preset".


Animation

MAKING AN ANIMATION-

The code has not yet been added to handle Armatures. This will be in the next release (2.50).

However, you can use Relative Vertex Keys to do animation, as well as regular location, rotation, and size keyframes.

Click the Script Window button (Just to the left of the Display Buttons) and press the "New" button.
Make sure "FrameChanged" is selected and type in "FiberAnim" or "FiberAnim.py".

Now, whenever you change your frame, the fibers will be recalculated and be effected by gravity, wind, control fibers, etc.


Auto UV for Fibers

Auto UV makes texturing easier, also has support for transparency, bumpmapping, etc.
When fibers are created, they automatically generate UV texture coordinates. This allows you to use 1 texture across multiple fibers. For example, you have 1 texture of a single wheat stalk, this will let you make each fiber have that wheat texture.

In your material settings, add a new texture. Back in material settings, select the green 'UV' button instead of the 'Orco' button.

You may set up multiple textures this way (for example, 1 being the color map, another being the transparency, another being bump, etc)

Note that if you use Alpha(transparency) maps, this will increase rendering time.



Mac Users:

Bischofftep: (Quote)

I am using this script without a problem on OS X 10.2.6, Blender 2.28a.

A few things to check:

* Are you running as an Admin user? If not, you may not be able to create the "compiled" version of the .py files that Fiber uses.

* Are you sure that you copied ALL of the .py files from the 2.02 distribution to the same place as the main file, INCLUDING __init__.py?

* Do you have dynoise.py INSIDE the Blender package in the MacOS folder?



Other

Once the Fiber Mesh (ME:Plane_Fiber.X) has been generated it can be treated like any other mesh.
You can G, R, S, proportionally Edit, Alt-S, join, duplicate, decimate, export, append....

RipSting: (Quote)

The only time you'd get a ZeroDivisionError is if you have 2 or more verts right on top of each other and they're creating a face. If you try and calculate the area of it, you'd get this error. And even then it's a rare case. I don't know what would be causing this after previously successful tries, but try removing doubles on your base mesh.