Professional Documents
Culture Documents
Hair is Particles
I am going to prove that during this MC.
As well as for particles Hair has Double Nature dynamic curves and visualized curves. For particles there are several Render Types. For Hair there are several Render Ways. These ways depend on you goals and you favorite Render Engine.
The main condition for successful Hair creation is good UV-mapping on the target surface. Good means not only non-overlapped, but also normalized. Select head mesh and try to create default Hair: Hair=>Create Hair. You will see strange bunch of clumps on the right side of head. Check UV-mapping on the mesh. Select head and open Window=>UV Texture Editor.
As you can see the UVs are perfect but not located in [0,1] region.
As you can see Hair is now non-uniformly covers entire mesh. Always check UV-mapping on target surface. Otherwise you will get strange surprises, especially during Hair painting.
Hint. You can compensate non-uniform parameterization or UV-mapping with different Follicle Density values. Hint. If you are not going to make heavy Hair set Output=NURBS Curves for initial setup. It always possible to add Paint Effects Brush to Hair curves later. During painting look at the symmetry line (potential parting location) and see that follicles are not sitting on the central line.
Undo all painting and go to Script Editor and set following variable
optionVar -intValue createHairMaxDensity 101;
Try again and check the symmetry. Why 101? By default painting is applied on the 100x100 grid. If you want to have row or columns of follicles exactly at the middle of grid you need to set size if the grid to odd values, like 101. Note. Try to create simple nurbs-plane and play with painting follicles on it. Set U/V Density to 4 then compare result of painting (or flooding) with createHairMaxDensity=100 and
createHairMaxDensity=101.
Paint Hair everywhere you think it should be. Do not worry about extra or unnecessary follicles. Do not waste your time for deletion these follicles. We will remove them later.
Quit the Paint Hair Tool and save scene. This scene saved as 2_headPainted.ma Now we need to remove unnecessary follicles. As long as you are already familiar with Maya Fur, you know that a good way to do this is attribute map. We are going to take file texture and keep only those follicles that are in the dark area of surfaces (black area used for better visualization only, you can easily modify process to use white area as a mask). Texture is already here. Switch to textured view. Uncommon name of texture is file1.
Small script can be used to sample color under each follicle and remove follicle if the color is not black. Select hairSystem1 and execute following script.
string $texture = "file1"; // converting selection to follicles convertHairSelection "follicles"; // list of follicles string $list[] = `ls -sl`; string $it; // for each follicle for ($it in $list) { // get UV-position float $u = `getAttr ($it+".parameterU")`; float $v = `getAttr ($it+".parameterV")`; // get color at point on surface under follicle float $col[] = `colorAtPoint -o RGB -u $u -v $v $texture `; // delete follicle and its curve if red channel is white if($col[0]>0.5) delete (`listConnections -t "nurbsCurve" $it`) $it (`listTransforms $it`); }
You can create this baldness-texture using your favorite method of texturing. This texture is extremely useful not only for creation process. It can be used for many purposes during hair setup. You will see that later.
There are some ways to make fake stiffness for Hair. First of all, keep the number of CVs low for current curves. You can set it during creation or tweak it later with Sample Density attribute on follicles. To smooth the visual (not computed) shape of curves the subSegments attribute can be used later. High Damp values (above 100) can be used sometimes to simulate rigid behavior. Rest curves is very flexible way to make fake stiffness. They work in conjunction with stiffness attribute and allow to freeze Hair. Using constraints applied to whole Hair system can be used to fasten Hair around some fixed position. Creating several constraints with Point Method=U Parameter helps fix Hair along length. These constraints can parented to head model. In Maya 7 there is new and very useful attributes Start Curve Attract for Hair system. It makes start curves a goal for current curves and control the amount of attraction to start curves. To make Hair stiff you need now only save current shape as start curves and set Start Curve Attract to large enough values. Value of 1 means full attraction. In our case stiffness is not an issue, but I keep number of CVs low for making further styling easier.
Another way is particle emitting from surface and converting their trajectories to dynamic curves. I will go for it later. Now we will use main manual method with saving initial state of simulated curves. But before doing any changes and simulations it is very important to setup collisions. Since Hair is Particles it can be collided with surfaces. It is really important to do this at the beginning because some curves can penetrate surface during simulation. After saving initial state and creating collisions these curves will be blocked inside the surface or jumped up.
New spherical object appears inside the head. Move and scale it to fit the shape of head model. scale = 5.0; 4.8; 6.3
It is good idea to save scene before manual tweaking of start curves, because Undo does not work for editing length locked curves. This stage is saved as 3_headCollisionSetup.ma
V. Symmetry Tricks
If your model has symmetry plane you can save some time by instancing half a Hair and use only half of the curves to make initial styling. Our Hair is symmetrical. This might be important if you want to make parting in the middle. Now go to Front view and select all follicles and curves on the right side of head (exclude hairConstraint1 from selection).
Delete them. Now select all current curves (not follicles!) except central row. Duplicate them as instances.
For easier selecting it later parent the group to world: Edit=>Unparent. Play animation. Frame rate is almost doubled with this trick and will be more noticeable on heavy scenes. File saved as 4_headInstancedHair.ma
Switch to Scale Tool, Press Insert and move pivot back, out of curves end. Press Insert again. Check the position of pivot from Top view.
Press l key to lock curves length and scale down selected CVs.
If your hand falters there are is no way to undo. You need to open saved scene and try again. It is also very important to move and scale only with one continuous mouse move. You can edit not only end CVs, press arrows key to select any inner row of curve CVs. Remember that you can only edit start or rest curves, not current ones. Scene is saved as 4_headManualStyling.ma
If all follicles are still selected go to Channel Box and set Start Direction=Start Curve Base. Until you are not using Interactive Playback it is better to do all attributes changing at start frame of simulation. Now curves are falling better but look weak-willed. Some volume or airiness is needed. Select hairSystem1 and set Stiffness=0.3. Play animation. Look at shape of Hair.
bclark 6/29/05 10:48 AM
Deleted: a
You can also improve volume of Hair with editing Stiffness Scale attribute directly during the animation playback.
While playing back animation set Iteration=8 for hairSystem1. Hair starts to be more stiff. Set Iterations back to 4. It is no need to increase it. It is always necessary to compensate increasing Iterations with decreasing Stiffness attribute. If you double Iteration, you need to halve the Stiffness. Try to adjust Iterations first and do not change it later. It is time to save current position of Hair as initial state. Since Hair is Particle, it has Initial State and this state is saved at start curves. Play animation from start to frame 500. Stop it. Select hairSystem1 and run Hair=>Convert Selection=>to Follicles. Save Initial State of Hair with Hair=>Set Start Position=>from Current.
Play animation from start, expecting no movement. But Hair starts to become longer and fall down like spaghetti. What happens? This is the result of setting Sample Density=3. When we set start position from current, start curves inherited CVs of current curves and become three times denser. But Sample Density keeps the old value of 3. So new current curves become three times denser than new start curves and nine(!) times denser than old start curves. That is why they start to be so flexible. Always check Sample Density for all follicles just after saving current position at start curves! Go to start frame. Select hairSystem1 and run Hair=>Convert Selection=>to Follicles. Go to Channel Box and set Sample Density=1 for all current curves. Play animation. Next trick is to make Hair longer after dynamic styling, not before. It saves time and make initial setup much easier. To scale existing simulated Hair we use the following extreme method: extending start curves.
Select hairSystem1, then use Hair=>Convert Selection=>to Start Curves, to select all start curves. Open Option Box for Edit Curves=>Extend=>Extend Curves. Set Extension Type=Extrapolate, Distance=10, and press Extend. Play animation. Do not forget to switch to displaying current curves, not start ones.
Note. If you have rest curves already created, you should do Hair=>Set Rest Position=>from Start immediately after extending start curves or extend rest curves the same way. Again, play animation until curves stop moving and do Hair=>Set Start Position=>from Current for all follicles.
Play animation until curves stop moving and do Hair=>Set Start Position=>from Current for all follicles again. Now, after rewinding to start frame Hair doesnt move at all. Hint. Save scene at start frame of simulation. This file is saved as 6_headDynamicStyling.ma.
IX. Visualizations
Now it is time to make first render tests to check density of follicles. To enable PFX rendering we need to apply brush to current curves. Select hairSystem1 and run Hair=>Assign Paint Effects Brush to Hair. Oops. Instances curve didnt get pfx-clumps!
For test purposes you can duplicate pfxHair1 node as instance and set scaleX=-1 for it.
Create key light, (directionaLight: rotate=-10; 10; 0; Intencity=1.4) and fill light, pointLight: translate=15; 5; 5; Intencity=0.5). Note that there is new brush node in the Attribute Editor. If you want to render regular Hair you can just delete it. But if you want to give Hair some exotic look with complex pfxbrushes you need keep in mind some details about relations between this brush node and hairSystem attributes. Width of brush is overridden by Hair Width. Most of brush shading attributes (Color1, Specular Color, Specular Power, Translucence) also are overridden by hairSystems ones. For example, select hairSystem1 and set Hair Per Clump=20; Sub Segments=1; Clump With=1 and Hair Width=0.1;. Select brush associated with pfxHair1 and go to Texturing section of Attribute Editor. Turn on Map Color and Map Opacity. Set Texture Type=File. For Image Name use bubble.iff from brushImages folder of your Maya location. Do not forget to set RepeatU=40. Disconnect file1 texture from Lambert1 and make test Render.
Look how color specified in hairSystem1 influences final color of bubbles. File is saved as 7_headPFXbrush.ma For returning to regular Hair just delete brush node. Set back Hair Width=0.01.
Render it.
It still works with symmetrical fakes but density of follicles is not enough to cover the gaps.
Duplicate selected curves with default options (not as instances). Run the following command at Script Editor to mirror start curves to another side.
scale -p 0 0 0 -r -1 1 1;
Use Freeze Transformations to remove negative scale. The most simple way to add new dynamic curves to existing Hair system is to make selected curves dynamic then assign existing Hair system to them and set necessary attributes for new follicles. These new follicles can be then parented to head model. But in this case new follicles will not be attached to surface and their U/V parameter values will be zero. Another issue is lost connection to constraints. All these issues resolved by semi-intensive scripting. Fortunately Hair system consists of only two or three types of nodes. And working with Hair with MEL is question of establishing necessary connections. If duplicated curves are selected add head surface to selection and run MEL-script called landCurves. Note. For Maya 6.5 you need to have closestPointOnMesh.mll. It is included in BonusPack for Maya.
Just press the button and see new follicles landed on the head. These new follicles have the same attribute values as old ones and are connected to collision constraint. Play the animation. Look at non-symmetrical shape.
We have lost dynamic symmetry because we did not recreate rest curves for new duplicated curves. Do it now. Select all follicles and do Hair=>Set Rest Positions=>from Start. But why does Hair is jumping again? We changed Hair Clump Width, collisions are sensitive to this attribute. It is really not good. Because we are going to adjust Hair Clump Width many times for rendering, but our dynamic styling will be destroyed by this.
Fortunately it is additional Collision Width Offset attribute which can be used to compensate changes in Hair Clump Width. Go to Attribute Editor for hairSystem1 and set simple expression for Collision Width Offset
hairSystemShape1.collideWidthOffset=0.35-hairSystemShape1.clumpWidth
This will keep effective collision distance almost independent on Hair Clump Width. You can change Hair Clump Width during animation and see minimal changes in the shape of Hair. Now it is possible to adjust Hair Clump Width without destroying simulation. Set Hair Clump Width to 0.4. Note. You can add also Hair Width compensation in this expression. File is saved as 8_headDuplicatedStartCurves.ma
file1`;
// delete follicle and its curve if red channel is white if($col[0]>0.5) delete (`listConnections -t "nurbsCurve" $it`) $it (`listTransforms $it`); }
Take a look for strange spacing between follicles. As mentioned above painting is performed on 101x101 grid. Positions of follicles painted with different U/V density values can differ from each other. Note. To guarantee coincidence of follicle positions in our example you can set
optionVar -intValue createHairMaxDensity 81;
if you not going to paint with more then 80x80 grid. You can also use 161 value, but this will slow down painting. And you must do it before first painting. If you change createHairMaxDensity between paintings you can get error with creating follicles. Render image (Hair Per Clump=20; Sub Segments=1; Clump Width=0.4).
Set Display Quality to 10 or hide strokes from view. To increase density exactly on the border of Hair area you can use some tricks.
More intelligent method is based on drawing border curve and land passive follicles to the closest points on surface. For example you can sample this curve with 40 steps and create 40 follicles closest to curves samples. More fake way is to render Hair border area with pretty large hair per clump value and then use this image as patch-texture under Hair. (Use perspective projection and converting to solid texture).
Adding some noise especially near the base can help to make fake density. Shadowing provides effects of extra volume and density. File saves as 9_headPassiveFill.ma
XIII. Shadowing
Set Clump Width=0.25 and Hair Width = 0.005 to male Hair more intelligent. Set Hair Per Clump=50. Go to Shading section. Set Specular Color about 0.5 and make hard specular: Specular Power=10. Select directionalLight1 and turn on Use Dmap Shadows. Paint Effects strokes are not surfaces and you can not use Use Mid Dist Dmap option for them. Turn it off. To get good shadows from thin Hair we need to use high shadow map resolution: Dmap Resolution=2048. Do not use black Shadow Color, make dark grey. Render it.
See shadows artifacts on surface. We need to set shadow offset from surfaces in case of not using Mid Dist Dmap. Set Dmap Bias=0.1.
Note. It should be at least one surface casting shadows inside light area. You can not shadow the Hair without shadowing a piece of geometry for given light. Look at strange light border at the middle of Hair. We need to adjust shadows map focus manually.
Select directionalLight1 and turn off Dmap Auto Focus. Set Dmap Width Focus=35 to define the area for shadow generation. For making better look of Hair tips the Thining attribute is very useful. Set it to 0.5.
Also by default Hair Clumps are thinner close to tips. But in case of dry and clean Hair it is better to edit Clump Width Scale to make clumps wider.
Do not forget to set high anti-aliasing quality for Hair. Open Render Global. Go to Maya Software tab open section Paint Effects Rendering Options. Turn on Oversample and Oversample Post Filter.
Render it.
Scene saved as 9a_headShadowed.ma You can add curl or noise displacements to Hair to get more dirty look.
Before making cut you need to be sure that ALL follicles have start curves (some passive follicles may have not). Go to first frame and make Set Start Position=>From Current for all follicles. Select all start curves (Convert Selection=>to Start Curves) then select created curve. Open Option Box for Edit Curves=>Cut Curves. Set Find Intersections=In 2D and 3D and Cut=Using Last Curve.
Make cut and delete all ends (Use Outlines for easy selecting cuts).
Swith to current positions and play animation. If the Hair starts to lengthen select all follicles and set Rest Pose=Same as Start in Channel Box. It will fix the problem.
Attribute maps
We already used baldness texture for deleting unnecessary follicles. This scripting method can be used for modifying almost any follicles attributes according to textures. Moreover if you have some textures used for Fur Attribute Maps you can reuse them for Hair. For example if you have Color Map texture you can sample color value using UV from follicle and assign this color to follicle clump. Create or load any texture (Create ramp1 for this example). Select hairSystem, then go to Script Editor and run the following script.
string $texture = "ramp1"; // converting selection to follicles convertHairSelection "follicles"; // list of follicles string $list[] = `ls -sl`; string $it; // for each follicle for ($it in $list) { // get UV-position float $u = `getAttr ($it+".parameterU")`; float $v = `getAttr ($it+".parameterV")`; // get color at point on surface under follicle float $col[] = `colorAtPoint -o RGB -u $u -v $v $texture `; // set color setAttr ($it+".color") -type double3 ($col[0]) ($col[1]) ($col[2]); // set full blend from clump setAttr ($it+".colorBlend") 1;
You can use this method for mapping follicles with textures or making more manipulations according to color or alpha values from maps.
Close-ups
If you need to be close to Hair border you may need extra follicles to make dense hence of follicles to cover the gaps between existing follicles. You can draw border curve and land passive follicles to the closest points on surface. Of course it needs some scripting.
Load the file 9d_headCloseUp.ma or create curve near the Hair border. Select borderCurve AND head surface then run script
passiveFolliclesFromCurve
Set Number of follicles=100 and create passive follicles from selected curve. Follicles are created on the surface at positions closest to curve samples.
Open Option Box for Create BlendShape command and set Origin=World. Create blend shapes. MAYA will be smart enough to parse groups into individual curves and to make proper blending. Now you can hide hairSystem1Follicles and hairSystem1OutputCurves groups to make first Hair system invisible. Select blendshape node (or select any start curve from second Hair system) and change Weight attribute to 1. Look at pfx-shapes blending. You can do some interesting effects with this trick. One can animate blendshaping and force or decrease simulating. Values more than 1 for blend weight can be used for exaggerate simulation.
You can also apply any deformers or tweaks to the start curves of second Hair system. This allows you to make additional manual styling after simulating and even caching.
Start curves of second system define shape of Hair. Shading is defined by hairSystem2 attributes. But dynamic simulation inherited from first Hair system. BlendShape node is the connection between to Hair systems.
Flying Hair
Similar method can be used to make Hair fly from one object to another or to any destination. Open 9e_headTwoHeads.ma file. It contains two similar Hair systems (I just imported scene to itself with no name spacing, it is important). Again, second Hair system is Static and used only for visualization. First one has simulated and cached animation on it (but it is not necessary to cache in this case). The idea is to take start curves from second Hair system, make them soft and then use current curves of first Hair system as goals for these particles. First make start curves soft. Select second__hairSystem1 and convert selection to start curves. Run Soft/Rigid Bodies=>Make Soft Body (Duplicate, Make Original Soft; Hide NonSoft=On; Make Non-Soft a Goal, Weight=0).
It makes easier to select them later. Now it is necessary to make current curves from first Hair system a goals for particles. One by one. Two lines of scripting can help. As long as all soft curves are selected go to Script Editor and run the command $soft=`ls sl`; Then select all current curves from first Hair system: open hairSystem1OutputCurves group and select all children. Go to Script Editor and run the command $goal=`ls sl`; Then run goal command for lists for ($i=0; $i<size($soft); $i++) goal -w 0.5 -utr 0 -g $goal[$i] $soft[$i]; Play animation.
Hide hairSystem1Follicles and hairSystem1OutputCurves groups to remove first Hair system output. You can manage you particles to fly more sophisticated way, using you particle experience. For easy selecting all particle objects in this scene you can you select "*Particle"; command or you can select all soft body curves from Outliner then press down arrow on keyboard and then right arrow key. Once particle are selected use Channel Box to edit attributes or use following commands to create or edit particle expressions for all soft bodies. $soft=`ls -sl`; for ($i=0; $i<size($soft); $i++) dynExpression -s "goalPP = rand(.5, 1.4);" -rbd $soft[$i]; You can animate goal weights of all particles to push them toward new goal or return them back to original positions. To make them fly like snakes use following command for selected particle objects $soft=`ls -sl`; for ($i=0; $i<size($soft); $i++) dynExpression -s "goalPP = 1.-0.3*id/count;" -rbd $soft[$i]; You can even collide particles with head surface. At the end of animation flying curves move with the rest of simulated dynamics for first Hair system. And you can merge flying animation with real Hair dynamics.
This will create one-point curve for each particle on creation . Add Runtime Expression
vector $p = position; curve -p ($p.x) ($p.y) ($p.z) -a ("traj"+int(id));
This will add new point to already created trajectories for each particle at every frame. To remove all trajectories at first frame create simple (not particle) expression: if(frame==1) delete traj*; Play animation. Look at growing paths.
Be sure that initial animation frame is 1. Otherwise change last expression. Be also sure that no other objects in scene are or will be named with traj* prefix. It is also better to set Undo Queue Size to 50 or to other finite number to prevent memory leaks. If there will be a lot of particles playback speed will be slow down by curves updating. We can change expressions to draw particles not for every particle but only for some.
Good idea is to add two attributes to particle object and use them in expression. Add two attributes to particle1: everyId and everyFrame (integer, default=1).
Change expressions to draw curves only for Nth particle and only for Nth frame. Creation expression:
if(id%particle1.everyId==0) { vector $p = particleShape1.position;
Runtime expression:
if(id%particle1.everyId==0 && frame%particle1.everyFrame==0) { vector $p = particleShape1.position;
Play with added attributes and see the result. These three expressions allow to grow curves from surfaces and control the shape of curves with dynamic fields, collisions, goal etc. We can add surface emission to the head model. We also can use textures to control rate and areas of emission.
Open 9x2_ParticleHair.ma.
There are two radial fields driving particles. You can also use textures to emit particles from specific areas. Play animation. You can add turbulence or other dynamic controls to change particle motion. Select hairParticles. Set LOD_P=1 to draw every curve from particles path. You can select emitter and set tessellationFactor=2000 for geoConnector1 node to improve randomization across emitting surface. Play 150 frames of animation. Delete expression1 to save life of curves. (use delete expression1 command for example). You can also export created curves into separate file. Delete particles, radial fields and emitter to clear scene. Select all curves from groupTrj group. Make them dynamic: Hair=>Make Selected Curve Dynamic. For created Hair system set Simulation Method=Static. If you want add dynamics to the curves do not forget to release curve tips and make them stiff enough. Add transform (or other) constraint to the root of bunch to keep Hair together. Delete hairSystem1OutputCurves group to save memory. Select hairSystem and add pfx brush to it for visualization. Set Hair per Clump=25; Clump Width=0.2; Hair Width=0.05, Sub Segments=1. Adjust shading attributes and render.
Surface styling
Looking on some hair styles you can notice that in makes sense use curve from surfaces because Hair seems belonging (or touching) to invisible surfaces. One approach is making surface(s), then duplicate isoparms or other surface curves and make these curves dynamic. As long as history will be on start Hair curves can be edited with surface deformation. But looking at typical Hair you can imagine that curves grow from one (source) surface and are attracted (or aligned) to another surface (target). To realize this approach small plugin was written. Go to Plugin Manager and load hairStyler plugin. Do not forget to put AEhairStylerTemplate.mel to your script folder.
Open 9x3_SurfaceHairStart.ma There are two additional surfaces: Source and Target. Hair is to be grown from Source and attracted to Tartget.
This plugin provides special node (hairStyler) representing Hair grid. Attributes of this node allow to control direction of growth and attraction. Select Source and Target surfaces. Press down arrow to select their shapes. Open Connection Editor and load selection to left side. Go to Script Editor and run command: createNode hairStyler Load created hairStyler1 object to right side of Connection Editor. Connect WorldSpace attribute of SourceShape to SourceSurface of hairStyler1.
Select transform1 at Outliner and go Attribute Editor. Look at attributes of new node and Hair grid on the screen.
At hairStyler1 tab turn on Swap TargetUV checkbox to eliminate Hair crossing due to different surface directions.
Setting Target Inclination N to zero means full aligning of Hair ends to target surface. U and V Inclinations control directions along surface. Inclination N controls direction perpendicular to surface.
You can also control shape along Hair with Tension attribute.
To get symmetrical shape you can select Styler object and duplicate it as Instance with ScaleX=-1.
Play with attributes of hairStyler node and shape of target surface. For example scale down target surface.
You can use baldness maps with growMap attribute (use full path to iff-texture file).
Set U and V capacity for hairStyler1 node to 10. To convert grid curves to normal ones use simple script:
int $i; int $count = `getAttr hairStyler1.uCapacity`*`getAttr hairStyler1.uCapacity`; string $name = "gridCurves"; for($i=0; $i<$count; $i++) { createNode -s "nurbsCurve" -n ($name+$i); connectAttr -f hairStyler1.curves[$i] (($name+$i+".create")); if( `getAttr ($name+$i+".spans")` < 1) delete (listTransforms($name+$i)); }
Hide grid curves (Show=>Locators) and look at created Nurbs curves. You can make them dynamics or use landCurves script to connect them to head model. Then you can use Hair dynamics for further adjustments of initially styled Hair. Look at 9x3_SurfaceHairTemplate.ma for more example.
Hair visualization
By now there are many ways to visualize Hair. As long as Hair is very complex and heavy object Paint Effects Renderer is fastest option. Also you can use Mental Ray for Maya to render Hair. Version 7 has Hair support including all raytracing features.
There are also interesting plugins for Hair and Pfx rendering with Mental Ray. They are called MR_hairSystem and MR_pfxBrush and provides geometry shader for Mental Ray (www.provide3d.com).
Renderman for Maya support MAYA Hair seamlessly. You need only set Pixel Samples values high enough to get good antialiasing quality for thin Hair. Nice Deep Shadows feature provides excellent shading.
Another option is Fur Renderer. In Maya 7 you can use Hair curves as attractors for Fur system. Therefore you can make Fur as long as you need and then apply your Hair styling as attractor set for Fur. If you have libraries or presets for Fur looks they can be reused, including attribute maps, shading attributes, density values etc.
Above these superphotohyperrealistic methods of rendering there is an interesting way to visualize Hair with non-photorealistic way. Instead if Mental Ray or Prman render engines one can use Painter software as NPR render engine. Painter has similar concept as Paint Effects: strokes and brushes. It also has scripting features which allow to read strokes data from text file. Semi-simple MEL script can be written to export Hair segments data from MAYA to text file. pfxStrokes command is an easy way to do it with minimal efforts. Open 9x4_headPainter.ma file. Select pfxHair1 node and run hairToPainter script. Select file for output data and wait for Done message. Open Painter application. Create new 640x480 image. Import script from text file created by Maya. On Scripts pulldown menu select Playback Script
Push Import button and select text file with data from Maya.
This technique can be extended to render not only Hair objects but any curves from MAYA. One need only make selected curves dynamic and assign them brush. Created pfxHair node can be exported with hairToPainter script and rendered with Painter.