Is it possible to export Maya hair?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  12 December 2013
Is it possible to export Maya hair?

I have some hair/fur in maya that I'm animating with various dynamics... It's a string that is all "frizzed" out at the end and it's reacting to wind and dynamic motion.

I would like to somehow "export" this for rendering in modo along with the rest of my animation. I tried exporting as FBX but the hair system didn't come out properly.

I need to somehow "bake" both the hair and the motion.

Is this even possible?
  12 December 2013
I have never done this with hair. I do know it is possible, and I was wating for someone to respond. You can convert hair to a paint effects brush and from there to polygons. I am not sure how you export the curves, or curves as animation, or even animate the polygons as I have not worked all of that out yet. I think you'd have to do some kind of geo cache on the polygons. Also isn't Modo a little limited on the type of cache files it can import? Last I checked it would not take mdd. Not sure what the current status is on that. So it would take research on both ends to see where it all meets.

On he Maya end you'll likely find the answers in the docs. I have run across it a few times but never needed it.
Richard Culver
Protfolio Facebook WIP1 WIP2
  12 December 2013
I've never used Modo but I think I remember hearing it supports Alembic, which should work for this I'd imagine.
You can definitely export dynamic curves from Maya to other apps using Alembic in any case as I've done it between Maya and C4D.

  12 December 2013
Well, I found out that there is no direct export of Maya hair to anything else, like FBX etc...

Exporting hair might still be a possibility using something like @cineartist describes...

Modo supports FBX, mdd, and alembic.
  12 December 2013
Can't you convert it to polys and export that via Alembic?

  12 December 2013
Yeah I believe that is what you have to do.

@NwSkipper - I think the issue comes in when you have used the nHair node to adjust things like clump width, hairs per clump, used fall off curves to adjust these along the length and so on. Then of course any other attributes like transparency along the length, curls, shading etc.

None of those settings will transfer with the curves and would depend on setting up similar things in Modo which may or may not exist.

However all of the dynamics you have set up for the curves will come across.

If you want to use the Nhair node settings you can select the pfxhair and use Modify/Convert/paint effects to polygons.

Assuming you already have pfx output on the hair. Which you can do with nHair/Assign Paint Effects output to hair.

This will transfer the attributes of the nHair node to the polygons including shading (using a hairTubeShader). Not sure what the limitations it has as I have not played with it much.

A tip here is to make the nhair a little thicker as it seems to transfer thinner to the polys.

But getting the shading into Modo is another matter. I think you'd have to bake to a texture.

I think what you have to do in that case is use the curve animation to drive the poly hair. I have not worked out how to do that yet.

But one thing I know you can do is drive a joint chain from a dynamic curve. In your case with it being a string, one curve I presume, that might be an option to then drive the polygons with them skinned to the joints.

I have done this and found the instructions here:

Quote: Create a straight skeleton with the number of joints and spacing that correspond to the number of objects you want to attach and their spacing.
Go to Skeleton > IK Spline Handle Tool > □ and in the options uncheck Auto create curve. With the IK Spline Handle Tool click on the first joint, last joint, and the dynamic curve. This will mount the joints on the curve.

Where he says spacing that correspond to the number of objects you want to attach instead place them one at each cv of the curve. Because in this case you do not want to place objects you just want the joints to follow the curve exactly.

This would transfer over even with FBX assuming you bake the joints animation first.

Here is the section in the manual that describes some of these processes I had mentioned reading about before regarding conversion to polygons: r=d30e530403

Quote: Consider outputting nHair to Paint Effects if you want to:

render with the Maya Software renderer
  • convert the Paint Effects hair to polygons and render in any renderer
Consider outputting nHair to NURBS curves if you want to:

  • use the curves for output to another renderer that directly supports curve rendering.
  • select a few Current Position curves and loft a surface through them with construction history.
  • extrude a circle down the curve to create a tube.
  • use the curves as path or control curves for any standard Paint Effects brush, such as feathers or vines. These brushes behave differently than the default built-in Paint Effects as the curves are not the hairs, but controls that interpolate and affect Paint Effects. This scenario is slower to update and takes a bit of time to set up. Alternatively, you could just assign a Paint Effects brush to a hair system (you don’t need NURBS Curves output for this).
Consider outputting Hair to both NURBS curves and Paint Effects if you want to:

  • use both the curves (for example, as particle emitters to simulate spray flying off wet hair) and render using the integrated Paint Effects either directly or by converting to polygons.
Quote: Paint Effects hair can be rendered using the Maya Software renderer. You can also convert Paint Effects hair to polygons and render in another renderer, such as NVIDIA® mental ray®. Or you can output just the dynamic NURBS curves to an external renderer, such as Pixar® RenderMan®.

I think however if you want the best shading on the hair, curves and using modo's hair shading might be better. Polys requires shading them with a normal shader and it depends on what you want to do.
Richard Culver
Protfolio Facebook WIP1 WIP2

Last edited by cineartist : 12 December 2013 at 11:26 PM.
  12 December 2013
@cineartist - Thank you SO much for your help! Your explanation was precise, and more than just a find it our yourself type... Since I'm not that familiar with Maya, it was just what I needed.

My pipeline is working perfect now!
  12 December 2013
Great. I am actually curious which method you wound up using.
Richard Culver
Protfolio Facebook WIP1 WIP2
  12 December 2013
Originally Posted by cineartist: Great. I am actually curious which method you wound up using.

I ended up using PaintFX to polygons, outputting via Alembic, and then shading in modo...

It works like a charm!

Thanks again
  12 December 2013
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 10:44 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.