Fiber Working Thread

You can add to this and I’ll update it when convenient. Most of it is from RipSting, quoted from the Readme.

Download From:

http://www.orst.edu/~dennisa/Blender/Fiber2
For example images, head over to
http://oregonstate.edu/~dennisa/Blender/Fiber2/gallery.html

Blender/Python versions:

If you’re using Blender 2.23 to 2.32, you must install
Eeshlo’s dynoise module (included in .zip) in the same
directory as Blender’s executable.
If you’re using Blender version 2.25 or below, move the
dynoise.dll (windows) or dynoise.so(Linux) from the root
directory of this zip archive to your Blender directory.
If you’re using Blender version 2.26 or higher, use the
dynoise.dll (windows only) from the “2.26 to 2.32” directory
If you’re using any version of Blender on OSX, or 2.26 or
higher on Linux, you’ll need to use the dynoise.py module
(slower, sorry)
If you’re using 2.33 or above, the dynoise functionality is
now part of Blender, so you don’t need to worry about this.
I have included the neccessary Python library files in the
zip files, but you may still need to download Python from

CREATE A REFERENCE TO PYTHON-
Read the thread “How to set your PYTHONPATH 101” at
https://blenderartists.org/forum/viewtopic.php?t=7723
Please read all the instructions in the README in the zip
before running the script.

BASIC OPERATION-

Select 1 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
*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

Density:

Sets the density of fibers per face. See also “Use VCol for
Mesh” where blue affects density.

RipSting:

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:

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.

Segments:

Sets the number of segments per fiber. The more segments
you choose to use the longer the fibers will be.

Length of Segments:

Sets the length of each segment on all fibers. The longer the segments
the longer the fibers will be. (See also “Segments” and “Fiber Guides”)

Randomize Length %:

Randomizes segment lengths across all fibers

Width:

Sets the width of all fibers

Gravity:

Sets a gravitational force for all fibers in the negative Z
direction. Gravity is also affected by Red VCol.

Initial Gravity:

Augments (or fine tunes) the “Gravity” value.

Randomize Direction:

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

Frizziness:

Frizziness of fibers based on number of segments

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.

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.

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).

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).

Estimate Faces:

Estimates the number of faces produced in the generated fibers.

Pointed:

Toggles between pointed and square tips for all fibers.

Use VColor for Mesh:

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)
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.
    Run the script and watch the results!

Harkeyman:

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:

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 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 “Make”.

RipSting:

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:

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. (I
think these are the right key commands).
By the way, segment length doesn’t effect fibers that follow
guides.

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.

Use Wind:

Uses an empty “Wind” to animate the fibers as though wind
were blowing thru 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.

Auto UV for Fibers:

Auto UV makes texturing easier, also has support for
transparency, bumpmapping, ect.
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.

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”.

Mac Users:

Bishcoptef:

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

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.

Updates:
May 27 2004
May 31 2004
June 22 2004

%<

wow, :o

impressive basic documentation. Thanks for this thread, Fligh %. I’ll contribute one or many short tutorials on the use of Fiber in order to complement this base documentation: I’ll put them in this thread, of course! I’ll try do make at least one before the end of this week-end.

OlivS

Thanks Fligh %
This answers many questions for me.

Thanks very much for starting this doc thread.

Are there any known issues with Fiber 2.03/Blender2.33 and OS X?

It’s only a few days old so we’ll have to wait and see what the Mac users say.

%<

Thanks Fligh%. This script needed this. Is there anyway that this can be posted as a text file somewhere. Wait I have webspace that I am not using I could do it myself. Although it would not be a automagic link from elysiun. The viewer would have to cut and paste the link in the address bar and it may crap out after so many download. But hey its something I cna do to help.

SHABA1

Is there anyway that this can be posted as a text file somewhere.

The idea of this thread is that it will be added to by those who use the script. Therefor I don’t consider it finished yet and publishing it is a little premature. There are still functions that I’m unsure of (like initial gravity, so my description or definition might well be wrong) and though I’ve used the wind function and rendered the animation successfully I have still not yet used wind with Fiber Guides or used RVK’s. Once we have all our ducks in a row I think it would be best to send it to RipSting to put on the download page, in the text window, or otherwise use or discard as he sees fit

%<

Thanks for even doing this. It helps a lot to have all the tips and things that are not obivious in one place.

I’d like to make a request for ‘success’ stories.

If anyone has any luck animating fibers on a mesh animated with RVKs, I would be very interested in seeing the blend.

I think the whole community would benefit, as I have not seen any such examples yet. I’ve had zero luck getting this to work, and I’ve not seen any animation examples other than grass blowing in the wind. (windy grass is cool, just not what I need. :smiley: )

TIA

You’ll have to explain better. Is this still your ‘Eyebrow Project’?

There are 2 ways to generate a small mesh (of lets say eyebrows) on a mesh.

  1. Split a section of the mesh (the shape of the eyebrow, like you did with bilbo’s feet) and generate the hair without using the “Use VCol” button. This will use density, gravity, length etc from the settings in the GUI only, and will generate from all faces.
  2. Vertex paint the main mesh where the eyebrows will be. (All ripstings example files in the Fiber.blend are done that way) This will generate hair only from the faces that have Blue in their RGB values and will use UVCol and GUI settings.

For 2 above, you can either Join or Vertex-Parent the hair mesh to the model. When you animate the face the hair will follow the eyebrows.

For 1 above, you can dispose of the Generator mesh and use only the hair mesh, again Joined or Vertex-Parented and the same will happen.

If you mean animate as in the hair mesh bends when the model raises his eyebrows in surprise you can use RVK’s on the hair mesh like any other mesh.

If you mean that you want the hair to blow and move in the wind then set “Use Wind” before you generate the hair mesh and use the empty to control the animation.

If the eyelashes are long and you want them to ‘droop’ with the movement of the head (like a horses mane when it walks) then use a lattice.

Those are about the only animatable things I can think of.

%<

If you mean animate as in the hair mesh bends when the model raises his eyebrows in surprise you can use RVK’s on the hair mesh like any other mesh.

Thats what I need.

I was under the impression that I could deform my generator mesh with RVKs, and the fibers would recalc and move on the fly.

Now I see I must do a bit of manual work, which is fine. I just didn’t want to start working hard when there was an easy way! :wink:

Thanks for clearing that up.

They do, I finally got it to work. You have to load the FiberAnim.py file into a text window, then it can be entered as a script link.

Ripsting told me I had to load it into the blend; for some reason I didn’t realize what he meant. :expressionless:

Here’s a simple clip of it working, no vertex parents just Fiber.

I’m so happy this works now! :smiley:

Hi.

Borrowed an idea (as well as some html Table text) from Leon.
I hope he doesn’t mind.

This is still a wip, but I thought I would post it so someone else doesn’t spend their time doing the same thing, and also to get some feedback.

There’s a few items missing, and the links don’t work yet, so don’t click them unless you want to see a 404 page.

I hope this helps. Let me know if there are any errors or things to improve…

http://www.telusplanet.net/public/kugyelka/blender/tutorials/fiber/interface.html

gimble: Great, very quick presentaation of what the settings do!
I did not really like the code, I believe it would workj easier with parsed xml:


&lt;xml&gt;
 &lt;setting type="density"&gt;
  &lt;title&gt;Density&lt;/title&gt;
  &lt;description&gt;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.&lt;description&gt;
  &lt;example nr="1"&gt;
    &lt;value&gt;5.0&lt;/value&gt;
    &lt;image src="density_5.png" alt="few fibers" /&gt;
  &lt;/example&gt;
  &lt;example nr="2"&gt;
    &lt;value&gt;25.0&lt;/value&gt;
    &lt;image src="density_25.png" alt="some fibers"/&gt;
  &lt;/example&gt;
  &lt;example nr="3"&gt;
    &lt;value&gt;50.0&lt;/value&gt;
    &lt;image src="density_50.png" alt="many fibers"/&gt;
  &lt;/example&gt;
 &lt;/setting&gt;
&lt;/xml&gt;

Then you would be able to try different layouts easier.
And I would also use speacial settings for the screenshots. Without the grid, white(or transparent) background and black lines, that would look much bett in my opinion.

Gabio? Who’s Gabio? :smiley:

Thanks for the comments Sebastian. I don’t know XML, so that would take a while, but I like the sounds of that ‘easier’ part. :wink:

As for the images, I think the grid helps a bit to show things like segment length and width comparisons. Do you have any samples of your suggestion?

Also, I had a question with regards to ‘Randomize Length %’ :

With ‘Use VCol’ de-activated, all segment lengths were equal, and changing this parameter had no effect.
With ‘Use VCol’ activated, the segment lengths varied due to the variations in the Green vertex color, but changing ‘Randomize Length %’ from 0 to 1 appeared to have no effect as well.

What exactly should I be seeing? I’ve only run simple tests so far, maybe that’s the reason…

Anyways, a small update (still not finished :expressionless: ) :
*Update: ‘Installation’ link works now.

http://www.telusplanet.net/public/kugyelka/blender/tutorials/fiber/interface.html

If you see any information which is misleading or just plain wrong, let me know.

I don’t know what he’s talking about…

b01c

hi, I just tried to use this script for creacting some underwater plants, but it doesnt work… I just loaded the fiber203.blend file, (every other file out of archive is in the same directory) … then I enter alt+p in the script window. He tolds me sth like : “error:python script error, check console”… I take some look there and see: traceback “fiber2gui.py”, line 35, in?
importError: Bad magic number in usr/people/***/blender-2.33a/os.pyc"

nothing more. What did I do wrong? Os: Sgi Irix.
Just installed python before and set up the Path to $PYTHONPATH

Regards,
Chris

hmm…it still won’t work… I setted up the pythopn path correctly (followed the sticky tutorial) but nothing works.
Here comes the newest error:

-bash-2.05b$ blender
Traceback (most recent call last):
File “Fiber2GUI.py”, line 41, in ?
File “/usr/people/chris/files/blender-2.33a-irix-6.5-mips/Fiber2.py”, line 9, in ?
from math import pow
ImportError: No module named math
Traceback (most recent call last):
File “FiberGUI”, line 45, in ?
ImportError: No module named Fiber13


help!
otherways, is there any other alternative to create plants easily (underwater plants)

from math import pow
ImportError: No module named math

Do you have python installed on you’re box? Coz the math module is part of the standard python install.
KS