Convert BigBuckBunny's Hair to Maya Curves


#1

You’ll probably all ignore me because I’m a Maya user, but here’s hoping.

There’s a Big Buck Bunny rig for Maya and the rigger never bothered with the hair.

Is there a way of converting Blender particle hair to curves?

I’ve tried this so far:

  1. Export curves to .OBJ and import into Maya, but the file size is too small so that means it didn’t export properly. Settings?

  2. Extrude the curves a little to create polygons.
    Export as .OBJ.
    Import into Maya.
    Welding / Merge close vertices doesn’t work. (I was attempting to use the function Convert Edges to Curves).

  3. 3dsmax does a similar thing.

I have access to Silo and Modo.

Can I use any of these programs to take the extrude polygon OBJ version and re-create the original curves?

Any ideas?

Thanks.


#2

re-hair-ing the hare (i.e. starting with a bald BBB) might take less time.

but i guess it’s a good skill do learn, doing hare hair imports that is.


#3

:slight_smile:

Funny.

I’ll think I’ll take the long road and extract a good bulk of the polygon’s edges. Shave and a haircut can do the rest. I’ll do that next week if all else fails.

But until then… any blender geniuses out there that have any ideas?


#4

Hi SandraK,

Interesting problem… I’ve been wondering about it too, since Shave for Maya and I don’t get along well and Blender’s hair styling system is solid.

I don’t think you’ll have much luck trying to export the curves as geo. The best thing to do would be to systematically go through each hair and write out the points on the curves to a file in worldspace, then rebuild the curves one by one in Maya using Python or MEL. Probably as cubic curves.

If you can figure out how to get the points on the curve hairs in Blender, you could write a function that writes another Python function (this time Maya python) to a file, run once for each hair. (I have code write code all the time.) Then run that function in Maya and go.

Harder, I think, would be getting the fur attached to BBB in Maya. I recommend against using a sparse collection of curves as curve attractors on a Maya Fur system. Depending on how good you get with choosing the guide curves, you can do wonders using Maya Hair + follicles + PaintFX for rendering. Rendering-wise, PaintFX + 3Delight is a good combination.

If you get any code going I’d be curious to see it.

All that said, I think your best bet would to just use stock Maya Fur and work on some good attribute maps. Once you get them set up, you can apply them in nearly one click after animation is finished.


#5

Just had a look, and I think this is the path you need in RNA (if you select the mesh):

bpy.context.active_object.particle_systems[0].particles[??].hair

That hair is another array of ParticleHairKey objects. Each ParticleHairKey ob has a .location and a .location_hairspace that you could use. Running a quick test, it seems the default number of segments creates six ParticleHairKeys per particle.

So it should be pretty trivial to get the locations and write them out to disk. I hope someone corrects me if I’m off my rocker.


#6

Thank you so much. I think Shave is fairly solid. It’s just the back-facing and symmetry problem that sucks. But if you lock hairs along the way its pretty easy.

But, “the long way is the fastest way.”

I used the extruded meshes as visual guides when shaping the shave native hair guides. I didn’t use the"use curves as guides" method. I don’t need it to be exact. It’s just a nice starting point. I’m using Renderman Studio and the scene is starting to look beautiful, so I’m happy.

Thank you again


#7

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.