Maya hair follicle curves?

879 views
Skip to first unread message

Derek Flood

unread,
Jul 29, 2013, 10:47:39 PM7/29/13
to alembic-d...@googlegroups.com
We would like to export follicle curves for a Maya nHair system to Alembic, but when we do the curves are getting shortened. Reading through the forums here it seems this has to do with Alembic converting the curve from NURBS to a renderman curve and thus losing the end points. As a result when we convert the Alembic curves to follicles and attach the Hair, it looks wrong. Shortened curves=shortened hair=wrong hair cut.

Here's our workflow:
1) export hair follicles to Alembic in world space
2) import Alembic curves
3) attach hair system

My questions is:
 is there a way to fix the curves so they do not get changed/shortened/broken by Alembic?

thanks!

Lucas Miller

unread,
Jul 29, 2013, 10:53:25 PM7/29/13
to alembic-d...@googlegroups.com

Are you using the Autodesk supplied ones or are you building it yourself?  Later versions of the plugin duplicate endpoints when appropriate so that they are hopefully not shortened.

Derek Flood

unread,
Jul 29, 2013, 11:11:11 PM7/29/13
to alembic-d...@googlegroups.com
The Autodesk one. I would not know how to build it myself. Is there a build that you nice folks might be able to share?

Tom Price

unread,
Jul 30, 2013, 8:29:50 AM7/30/13
to alembic-d...@googlegroups.com
We had this problem, on versions before the fix we just extended the curves. However the newer Alembic does indeed create the entire curve.
Adding the end points to keep curve shape regardless of degree adds another problem however as attached hair systems using this curve as a base evaluate strangely from having duplicate points in the same position.
I wrote a script to clean out the hair curves of their duplicate points.

If you cache out the curves using the later alembic plugins, you can use this to remove the duplicate points to keep the shape correct once the abcimport being into the scenes

http://pastebin.com/CkeP45Mb

supply the function with a group containing the curves for cleaning.

Regards,

TomP







--
You received this message because you are subscribed to the Google Groups "alembic-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alembic-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


BAFTA Independent Production Company of the Year - 2012 Children's BAFTAs
twitter.com/blue_zoo | facebook.com/bluezooanimation | vimeo.com/bluezoo

blue-zoo, Chesterfield House, 385 Euston Road, London NW1 3AU
t. 020 7434 4111

Derek Flood

unread,
Jul 30, 2013, 11:21:58 AM7/30/13
to alembic-d...@googlegroups.com
Thanks Tom. You wrote "we just extended the curves" can you explain how you did this? That might be the simplest solution at this point.


On Tuesday, July 30, 2013 5:29:50 AM UTC-7, Tom Price wrote:
We had this problem, on versions before the fix we just extended the curves. However the newer Alembic does indeed create the entire curve.
Adding the end points to keep curve shape regardless of degree adds another problem however as attached hair systems using this curve as a base evaluate strangely from having duplicate points in the same position.
I wrote a script to clean out the hair curves of their duplicate points.

If you cache out the curves using the later alembic plugins, you can use this to remove the duplicate points to keep the shape correct once the abcimport being into the scenes

http://pastebin.com/CkeP45Mb

supply the function with a group containing the curves for cleaning.

Regards,

TomP






On 30 July 2013 03:47, Derek Flood <dere...@gmail.com> wrote:
We would like to export follicle curves for a Maya nHair system to Alembic, but when we do the curves are getting shortened. Reading through the forums here it seems this has to do with Alembic converting the curve from NURBS to a renderman curve and thus losing the end points. As a result when we convert the Alembic curves to follicles and attach the Hair, it looks wrong. Shortened curves=shortened hair=wrong hair cut.

Here's our workflow:
1) export hair follicles to Alembic in world space
2) import Alembic curves
3) attach hair system

My questions is:
 is there a way to fix the curves so they do not get changed/shortened/broken by Alembic?

thanks!

--
You received this message because you are subscribed to the Google Groups "alembic-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alembic-discussion+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Tom Price

unread,
Jul 30, 2013, 11:23:54 AM7/30/13
to alembic-d...@googlegroups.com
nothing very glamorous, just extruition and increasing the density of the curves. I would recommend the later version as this works perfectly. What platform are you requiring ?

To unsubscribe from this group and stop receiving emails from it, send an email to alembic-discuss...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Derek Flood

unread,
Jul 30, 2013, 11:42:28 AM7/30/13
to alembic-d...@googlegroups.com
"What platform are you requiring"

I'm on a PC (Windows7). Is that what you were wanting to know?


"just extruition and increasing the density of the curves. I would recommend the later version as this works perfectly."

Sorry if I'm being dense here, just want to understand what you're saying :):
1) I assume you meant "extrusion" right? I don't think Maya has a function to extrude a curve does it? It does have  Edit Curves > Extend > Extend Curve is that what you are referring to?
2) By "increasing the density of the curves" do you mean Edit Curves > Rebuild Curve perhaps?
3) Finally when you say
"I would recommend the later version as this works perfectly" do you mean only increasing the density of the curve, but not extruding it? I would think this would keep the curve the same short length and just add more points in it, no?
Again, thanks!




On Tuesday, July 30, 2013 8:23:54 AM UTC-7, Tom Price wrote:
nothing very glamorous, just extruition and increasing the density of the curves. I would recommend the later version as this works perfectly. What platform are you requiring ?

On 30 July 2013 16:21, Derek Flood <dere...@gmail.com> wrote:
Thanks Tom. You wrote "we just extended the curves" can you explain how you did this? That might be the simplest solution at this point.


On Tuesday, July 30, 2013 5:29:50 AM UTC-7, Tom Price wrote:
We had this problem, on versions before the fix we just extended the curves. However the newer Alembic does indeed create the entire curve.
Adding the end points to keep curve shape regardless of degree adds another problem however as attached hair systems using this curve as a base evaluate strangely from having duplicate points in the same position.
I wrote a script to clean out the hair curves of their duplicate points.

If you cache out the curves using the later alembic plugins, you can use this to remove the duplicate points to keep the shape correct once the abcimport being into the scenes

http://pastebin.com/CkeP45Mb

supply the function with a group containing the curves for cleaning.

Regards,

TomP






On 30 July 2013 03:47, Derek Flood <dere...@gmail.com> wrote:
We would like to export follicle curves for a Maya nHair system to Alembic, but when we do the curves are getting shortened. Reading through the forums here it seems this has to do with Alembic converting the curve from NURBS to a renderman curve and thus losing the end points. As a result when we convert the Alembic curves to follicles and attach the Hair, it looks wrong. Shortened curves=shortened hair=wrong hair cut.

Here's our workflow:
1) export hair follicles to Alembic in world space
2) import Alembic curves
3) attach hair system

My questions is:
 is there a way to fix the curves so they do not get changed/shortened/broken by Alembic?

thanks!

--
You received this message because you are subscribed to the Google Groups "alembic-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alembic-discussion+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 
BAFTA Independent Production Company of the Year - 2012 Children's BAFTAs
twitter.com/blue_zoo | facebook.com/bluezooanimation | vimeo.com/bluezoo

blue-zoo, Chesterfield House, 385 Euston Road, London NW1 3AU
t. 020 7434 4111

--
You received this message because you are subscribed to the Google Groups "alembic-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alembic-discussion+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Tom Price

unread,
Jul 30, 2013, 12:04:09 PM7/30/13
to alembic-d...@googlegroups.com
1) No, for the issue in question I extended the curve below the surface(just a manual move of cvs but i used a collision script)
2) Rebuilt curves at a higher density (the amount of trimming relates to the cv density of the curve. )

This was early in production however.
3) sorry, I meant we used a later alembic version after this issue was resolved. I ll PM it to you, the later version keeps the curve proportions intact. You may find the extra cv annoying (we did, it messed up curve rendering), the script I provided will remove the extra cvs but keep proportions correct, use after the abcimport.
To unsubscribe from this group and stop receiving emails from it, send an email to alembic-discuss...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Derek Flood

unread,
Jul 30, 2013, 1:59:07 PM7/30/13
to alembic-d...@googlegroups.com
Thanks Tom, you are a prince among men! I'll give this a go.
One question about the Alemic version you sent: Yours says it is 1.1.3. I think the version that ships with Maya 2013 is 1.0.4 and the current version of Alembic here is 1.5.0. So that would mean yours is a version inbetween those two which has the update for the curves (creating double points at the end to fix the Rman/NURBS curve issue). Your script then removes that second end point. So the use of Alembic 1.1.3 + your curve script provides correct curve data. Is that correct?

Tom Price

unread,
Jul 31, 2013, 6:16:54 AM7/31/13
to alembic-d...@googlegroups.com
I can t verify what happens with the version 1.5.0, I did nt realise they had released this version. This is possiby OGAWA. Our production is stable so I have not moved to later versions. but the plugin sent works correctly but with the extra points. My script will remove the extra point. if required you could re write for specific curves, I wrote mine to clean a whole group.

Hope this helps,
TomP

To unsubscribe from this group and stop receiving emails from it, send an email to alembic-discuss...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Lucas Miller

unread,
Jul 31, 2013, 11:10:12 AM7/31/13
to alembic-d...@googlegroups.com

The AbcExport of curves work the same way in 1.5.0

Derek

unread,
Aug 1, 2013, 7:38:40 PM8/1/13
to alembic-d...@googlegroups.com
Okay so I got things pretty much working. Just one hitch: The new Alembic plugin does not load the UI menu for some reason and so you need to manually run the mel command "AlembicCreateUI" in Maya to get it to show up. I tried putting this into the userSetup.mel so it will run at startup, but it's not working. I think this is because the abcplugin is being read in by pymel after the user userSetup.mel is read. In my script editor I can see this:

updateRendererUI;
# pymel.core : Updating pymel with pre-loaded plugins: Fur, OpenEXRLoader, AbcImport,  AbcExport,

Does anyone know a way to get it to evalaute the "AlembicCreateUI" mel command after it loads the plugin?

Rob Pieke

unread,
Aug 2, 2013, 4:05:27 AM8/2/13
to alembic-d...@googlegroups.com
Are you building Alembic from source?

If so, and if you have a recent version of Maya, look at ${MAYA_LOCATION}/devkit/plug-ins/AbcExport/AbcExport.cpp, which is Autodesk's lightly-modified version of the plugin. In particular, look at initializePlugin() and uninitializePlugin() where they make calls to create/delete the UI.

- Rob




From: Derek [dere...@gmail.com]
Sent: 02 August 2013 00:38
To: alembic-d...@googlegroups.com
Subject: [alembic-discussion] Re: Maya hair follicle curves?

Derek

unread,
Aug 3, 2013, 12:52:55 AM8/3/13
to alembic-d...@googlegroups.com
Thanks, got it working. Woot! Thanks for everyone's help!
To unsubscribe from this group and stop receiving emails from it, send an email to alembic-discussion+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages